Secret Key Algorithms in Cryptography

SENG 41283 — Distributed and Cloud Computing

Nipun Thennakoon
The Startup
5 min readJul 29, 2020

--

Cryptography

The practice and the study of techniques for secure communication in the presence of third parties is known as cryptography. Secure communication means that when two parties communicate, they don’t want third parties to eavesdrop on their communication and/or alter them. confidentiality, data integrity, authentication, and non-repudiation[4] are central components of modern cryptography.

Secrete Key Algorithms

Secrete key algorithms, otherwise known as symmetric key algorithms use a single key for both encryption and decryption of the message. So the both sending party and receiving party should have shared the key beforehand. These algorithms are very fast because they are based on simple mathematical operations.

Symmetric Key Encryption/Decryption

Here are some of the common secrete key algorithms that are used for encryption and decryption.

Data Encryption Standard (DES)

DES is one of the most popular symmetric encryption algorithms out there. It is a block cipher that was developed by IBM in the early 1970s. DES encrypts blocks 64 bits of plaintext to ciphertext using a 56 bit key. DES operations can be done in two ways.

Electronic Code Book(ECB) serially encrypts every 64 bit plaintext using the same 56 bit key. Because of this, if two identical plaintext blocks are encrypted using the same key, the resulting ciphertext blocks are the same. Therefore, an attacker could identify similar or identical traffic flowing through a communications channel.

Cipher block chaining (CBC) on the other hand, bitwise XORs previous ciphertext block with the current plaintext block and then encrypts it using the DES key to make the current ciphertext block. So, the encryption of each block is dependent on the previous block, and encryption of identical plaintext blocks will result in different ciphertext blocks.

However, due to its small key size, DES vulnerable to modern brute force attacks, differential cryptanalysis (DC), linear cryptanalysis (LC), and Davies’ attack. Because of this, many former systems that used DES now use 3DES which is 256 times more secure than DES.

DES Characteristics

Triple DES (3DES or TDES)

3DES is an adapted version of DES which uses the same algorithm to produce more secure encryption. It does this by applying the DES encryption algorithm three times for each 64 bit data block in the plaintext. 3DES uses a key bundle that has three 56 bit keys and encrypts a data block with the first key, decrypts it with the second key, and encrypts again with the third key. Decryption is done in the reverse order. It requires more processing time than DES because of the two additional operations.

If the keys in the key bundle are K1,K2 and K3, 3DES defines three keying options.

  1. All three keys are independent. It is known as triple-length keys.This is the strongest form with 3 x 56 = 168 independent key bits.
  2. K1 and K2 are independent and K1 = K3. It is known as double-length keys. It provides a shorter key length of 112 bits. This was deprecated in 2016.
  3. All three keys are identical (K1 = K2 = K3). This is the same as DES as two operations cancels out.
3DES Characteristics

Advanced Encryption Standard (AES)

1997, the AES initiative was announced, and the public was invited to propose encryption schemes to replace DES. After five year process of standardization in which 15 competing designs were presented an evaluated, Rijndael block cipher was selected as the AES algorithm by U.S. National Institute of Standards and Technology (NIST).

AES is a variant of Rijndael, which has a fixed block size of 128 bits, but can have three different key sizes : 128, 192 and 256 bits. By contrast, original Rijndael is specified with block sizes and key sizes that may be any multiple of 32 bits, with a minimum of 128 and a maximum of 256 bits.

AES have few distinct advantages when compared to DES and 3DES:

  • It is much stronger than DES because of it’s key lengths.
  • It runs much faster than 3DES on comparable hardware.
  • It is more efficient than DES and 3DES on comparable hardware, usually by a factor of five if compared to DES.
  • AES is more suitable for high-throughput, low-latency environments, especially if pure software encryption is used.

However, AES is a relatively young algorithm and cryptographic community tends to trust mature algorithms than the younger ones.

AES Process

Rivest Cipher 6 (RC6)

RC6 is a symmetric key block cipher which was derived from its predecessor RC5, to meet the requirements of the Advanced Encryption Standard(AES). Infact, it was one of the five finalists in the AES competition and was submitted to the NESSIE and CRYPTREC projects. RC6 is a proprietary algorithm, which was patented by RSA Security.

RC6 has a block size of 128 bits and supports key sizes of 128, 192 and 256 bits and then up to 2040. RC6 includes four working registers instead of two like in RC5, and includes integer multiplication as an additional primitive operation. This inclusion of multiplication allows for greater security, fewer rounds and increased throughput.

Encryption with RC6

That’s it for this article. If you found this interesting, stay tuned for my next article on public key algorithms in cryptography. See you on the next one! 😊

--

--