pixelDepth wrote:What do you need to be able to create an algorithm like Sha256, or even any of the md's (md4, md5 etc)?
To make a PHP version of one or create your own, name-in-lights? A PHP version requires reading, understanding and implementing the specification for the algorithm. It involves a lot of complex math and only gets more complex the more secure and larger the hash becomes. To create your own (that would be accepted at large) requires a cryptographic background, publishing papers and being open to the scrutiny and crazy math or the cryptographic community. It takes quite some time for a hashing function to be considered strong as they are initially all considered weak until their math and strength can be proven.
pixelDepth wrote:I've taught myself the bitwise operators, I know how they work, but I have yet to write my own version of any algorithm out there (md5 for example). I know there are scripts out there already, but it's more of a learning thing then anything else, just want to better my knowledge in this area.
The cryptographic specification papers on the various algorithms come with sample hashes and often include the register states for the entire hash to get that result so it's fairly easy to test once you get the algorithm in a processing state.
For SHA256 there were no other pure PHP solutions at the time (as far as anyone on the board could find at least) so I had no example versions to base mine off of. The Javascript version found uses operators PHP does not have, so the PHP version requires a bit more work to do the job. In the end, I ditched trying to even copy an existing version from another language and went right to the NSA source paper.
pixelDepth wrote:Do you need some Math degree? If so, i'm out :p
I do not have a math degree as of right now.
pixelDepth wrote:thanks for your Sha256 script

My pleasure. It was my little contribution to it.. I hope to release v2 of it at some point relatively soon (being within six months or so.) SHA512 and SHA1024 are in the cards too, I just haven't gotten around to them just yet.