Secret Key Algorithms In Cryptography

Sangeevan Siventhirarajah
3 min readJul 29, 2020

--

Secret key algorithms in cryptography

Secret key algorithms in cryptography use same key for both encryption of plain text and decryption of cipher text. There are lots of symmetric algorithms, lets analyze some of them.

TEA

Tiny encryption algorithm (TEA) developed at Cambridge university. Encryption function programmed in C.

TAE encryption function
TAE encryption function

TAE algorithm uses rounds of integer addition, XOR and bit wise logical shifts to achieve diffusion and confusion of bit patterns in plain text. Plain text is a 64 bit block represented as two 32 bit integers in vector text[]. Key is 128 bits long, represented as four 32 bit integers. On each of 32 rounds, two halves of text are repeatedly combined with shifted portions of the key and each other in lines 5 and 6. Use of XOR and shifted pointers of text provides confusion, and the shifting and swapping of two portions of text provides diffusion. Non repeating constant delta is combined with each portion of text on each cycle to obscure key in case it might be revealed by a section of text that does not vary. Decryption function is inverse of that for encryption.

TEA decryption function
TEA decryption function

This short program provides secure and reasonably fast secret key encryption. It’s some what faster than DES algorithm, and conciseness of program lends itself to optimization and hardware implementation. 128 bit key is secure against brute force attacks.

DES

Data encryption standard (DES) was developed by IBM and subsequently adopted as a US national standard for government and business applications. In this standard, encryption function maps a 64 bit plain text input into 64 bit encrypted output using a 56 bit key. Algorithm has 16 key dependent stages known as rounds, in which data to be encrypted is bit rotated by a number of bits determined by key and three key independent transpositions. Algorithm was time consuming to perform in software on computers of 1970s and 1980s, but it was implemented in fast VLSI hardware and can easily be incorporated into network interface and other communication chips.

IDEA

International data encryption algorithm (IDEA) was developed in early 1990 as a successor to DES. Like TEA, it uses 128 bit key to encrypt 64 bit blocks. Its algorithm is based on the algebra of groups and has eight rounds of XOR, addition modulo 2¹⁶ and multiplication. For both DES and IDEA, same function is used for encryption and decryption, a useful property for algorithms that are to be implemented in hardware. Strength of IDEA has been extensively analyzed, and no significant weaknesses have been found. It performs encryption and decryption at approximately three times speed of DES.

RC4

RC4 is a stream cipher developed by Ronald Rivest. Keys can be of length of any length up to 256 bytes. RC4 is easy to implement and performs encryption and decryption about 10 times as fast as DES. It was therefor widely adopted in applications including IEEE 802.11 WiFi networks, but a weakness was subsequently discovered by Fluhrer et al. That enabled attackers to crack some keys. This led to a redesign of 802.11 security.

AES

Rijndael algorithm selected to become advance encryption standard algorithm by NIST was developed by Joan Daemen and Vincent Rijmen. Cipher has a variable block length and key length, with specifications for keys with a long of 128, 192 or 256 bits to encrypt blocks with a length of 128, 192 or 256 bits. Both block length and key length can be extended by multiples of 32 bits. Number of rounds in algorithm varies from 9 to 13 depending on key and block sizes. Rijndael can be implemented efficiently on a wide range of processors and in hardware.

--

--

No responses yet