Serpent is an open source symmetric key block cipher that encrypts a 128 bit block of plaintext using a 256 bit key. The algorithm was developed in 1998 by 3 researches, Ross Anderson, Lars Knudsen and Eli Biham. It was a finalist in the Advanced Encryption Standard (AES) contest, where it came second to Rijndael. Serpent and Rijndael are somewhat similar; the main difference is that Rijndael is faster (having fewer rounds) but Serpent is more secure.
Serpent uses 32 rounds or 32 reiterations of the same algorithm using mathematical permutations and substitutions. The encrypting and decrypting phase have the same level of complexity. The decryption operations are exactly the inverted transformations used to encrypt the message but in opposite order. Different mathematical substitutions “S-boxes” are used with a 4 bit entrance and a 4 bit exit. Every encryption phase uses an S-box that work collaterally for the 32 times.
Serpent was designed to provide users with the highest practical level of assurance that no shortcut attack will be found. To achieve this, the designers limited themselves to well understood mechanisms, so that they could rely on the existing experience of block cipher cryptanalysis. Also, twice as many rounds as are sufficient to block all currently known shortcut attacks are used. This is believed to be prudent practice for a cipher that might have a service life of a century or more.