You can find the basics of the agorithm here:
http:<slashslash>gobittest.appspot.com/VanityAll
On this site your can combine both private and public key to generate new results.
It show you raw private/public keys as well as the generated bitcoin addresses.
It supports both addition and multiplication of the private keys.
Vanitygen only uses the additions methode because public keys can only be added.
Thanks so much.
I have used this site and it's really helpful, but unfortunately doesn't answer my questions around exactly how Vanitygen calculates the address and the PrivkeyPart. The actual nuts and bolts of it.
With regards to combining keys there is nothing more to it then can be found on the website.
The Vanitygen c-code itself just makes use of library functions to work with the generated keys.
The calls are all based on EC (Eliptic Curve) mathematics, where bitcoin just uses the specs according to SECP256k1.
https:<slashslash>en.wikipedia.org/wiki/Elliptic_curve.
Transforming a public key to a bitcoin address can be found here:
https:<slashslash>en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses.
But I guess I probably do not understand your questions.
Are you looking for more information on how Vanitygen 'searches' for the BitcoinPrefix?