Page 1 of 1

PHP source code for Serpent algorithm?

Posted: Wed Nov 24, 2010 4:39 pm
by mecha_godzilla
Hi,

I realise this is a bit 'niche' but I'm interesting in learning how the Serpent encryption algorithm works and haven't been able to find any PHP implementations of it to look at. I know that (lib)mcrypt uses it and I thought about downloading the source code but it's obviously going to be in C or C++ so won't be much help to me (me and C don't get on).

Thanks,

Mecha Godzilla

Re: PHP source code for Serpent algorithm?

Posted: Wed Nov 24, 2010 8:35 pm
by Weirdan
Chances are that C implementation is simpler than a PHP one would be, simply because of better defined control over what gets stored in what format.

Re: PHP source code for Serpent algorithm?

Posted: Thu Nov 25, 2010 4:05 pm
by mecha_godzilla
Ok, thanks for that - that makes sense. I never really got on with C that well because it seems so...sparse? I realise this is what makes it so portable (in some respects at least) but I got a bit fed up with the lack of core functionality in it - by this I mean that whenever I wanted to do something fairly simple, I had to rely on some poorly-documented function in a header file to achieve it. However, I have found a C implementation of Serpent already so I might give it another look - and maybe even attempt a PHP implementation of it :D

Thanks,

M_G