Stratos Ally

Serpent

Introduction 

In cryptography, symmetric key block ciphers are essential for securing sensitive information. An algorithm such as Serpent — -block cipher provides the highest security level and works effectively at the same time. Serpent, the algorithm, was created by Ross Anderson, Eli Biham, and Lars Knudsen in 1998 and was one of the five AES contenders, of which only Rijndael made it to the standard. 

Overview of Serpent 

Serpent stands as a symmetric key block cipher that made it to the final round of the Advanced Encryption Standard (AES) competition. People know it for its strong security features, and its creators built it to be a reliable encryption algorithm that works well in both hardware and software implementations. 

  • Block Size: 128-bit blocks. 
  • Key Lengths: Supports key sizes of 128, 192, and 256 bits. 
  • Rounds: Uses 32 rounds of encryption to provide strong security against various cryptographic attacks. 
  • Security Focus: Designed with an emphasis on maximum security, making it resistant to differential and linear cryptanalysis. 

 A flowchart of how serpent encryption works: 

In this algorithm, a 128-bit block is ciphered by using a key of length 256 bits in 32 different rounds.  

The first 31 rounds are identical, consisting of the same sequence of elementary operations, while the last round differs only in the key schedule. Instead of mixing a single key like in the first 31 rounds, an additional key is mixed in the last round. Hence, 33 round keys are required in the whole process, which are generated from the external key. 

The algorithm consists of three basic functions:  

  • Initial permutation(IP) 
  • 32 Round function  
  • Final permutation (FP) 

Here is a stepwise explanation of functions: 

Initial Permutation (IP): 

 Perform the following modulo operation for the plaintext: [(i * 32) mod 127]. This shifts around the bits of the plain text. We get the original block of data B0. 

Rounding Function (32 times iterated): 

For i = 0 to 30: 

  • XOR the current data block Bi with the subkey Ki: (Bi ⊕ Ki) 
  • Take the result through S-box S(i mod 8) 
  • Linear Transformation (LT) is applied to the output of the S-box. 
  • The output is the subsequent block of data, Bi+1 


Final Round: (32nd) 

  • XOR B31 with K31 
  • Pass the result through S-box S7 
  • XOR the result with K32 (remark: this replaces the LT from the last round) 
  • The result is B32.  


Final Permutation (FP): 

Apply FP to B32 according to the following relationship: [(i * 4) mod 127] This gives the final cipher text C. 

In mathematical notation: 

  • B0 = IP(p) where p is the plain-text 
  • For i = 0 to 30: Bi+1 = LT(S(i mod 8)(Bi ⊕ Ki)) 
  • B32 = S7(B31 ⊕ K31) ⊕ K32 
  • C = FP(B32) 

Serpent compared to AES: 

AES is the most widely used encryption standard in the world. Like Serpent, AES is a symmetric-key block cipher with some key differences. AES runs through 10, 12, or 14 rounds of SPN operations based on the key size. The key can be 128, 192, or 256 bits long. AES always uses a 128-bit block size, no matter the key size.  

Developers designed AES to work well in both software and hardware implementations. It has a lower security margin than Serpent. Experts see AES as very secure, but it has faced more attacks and analysis than Serpent. 

Pros and Cons of Serpent: 

Serpent is believed to be one of the most secure low-performance encryption algorithms. Of course, its advantages and disadvantages depend on the context and requirements of the user. 

The advantages of Serpent include: 

  1. A very high security margin against a great number of attacks 
  2. variable block size for better diffusion and confusion, and  
  3. simple and elegant design-understandable at first sight. 

There are some disadvantages:  

  1. Serpent runs slower than other block ciphers, such as AES, with its more intricate key schedule leading to longer processing times.  
  2. It also uses more memory and tends to be less energy-efficient, which makes it a poor fit for devices with limited resources.
  3. What’s more, its lack of widespread use means it has fewer optimizations in both software and hardware.

 Conclusion

In conclusion, SERPENT remains a highly secure and reliable symmetric key block cipher with a conservative design and high cryptographic attack resistance. The reason this algorithm was not adopted as the AES was that it has 32 rounds, and while optimizing for security, it often does not prioritize performance, thus making it a perfect choice for applications that need a lot of security. Due to its flexibility in terms of its ability to work with different key sizes and its high reliability, SERPENT remains relevant in modern cryptographic research and practice, especially in cases where protection against attacks is valued more than data processing speed. 

 

 

more Related articles