PHP source code for Serpent algorithm?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

PHP source code for Serpent algorithm?

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PHP source code for Serpent algorithm?

Post 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.
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

Re: PHP source code for Serpent algorithm?

Post 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
Post Reply