Monday, September 14, 2015

What is Symmetric Key Encryption ?


If not redirected, please click here https://www.thesecuritybuddy.com/encryption/what-is-symmetric-encryption-and-how-does-it-work/

Symmetric key cryptography is cryptography in which same cryptographic key is used for both encryption and decryption. The requirement for this cryptography is, both the parties have access to the cryptographic key. And the cryptographic key is called symmetric key.







There are basically two types of symmetric key cryptography:


  • Stream Ciphers 
  • Block Ciphers


Stream Ciphers


In case of stream ciphers encrypts the digits of a message one at a time. Typically, when the message or plaintext comes in quantities of unknowable length, like in case of secured wireless connection, stream cipher is used.

In a stream cipher, each digit of the plaintext is encrypted one at a time, with some corresponding digit of the keystream. After each digit, the state of the keystream changes and the next digit of the plaintext gets encrypted. Normally, the initial value of the keystream or seed is kept in a shift register, and after each digit of encryption, the state of the shift register changes. Hence, this cipher is also called state cipher.

Normally, in each state, one bit of the plaintext gets encrypted and the operation that is performed with corresponding bit of the keystream is XOR. In each state, value of the keystream changes using a Linear Feedback Shift Register or LFSR. If the value of the keystream is independent of the plaintext or ciphertext, the stream cipher is called synchronous stream cipher. And if the previous digits of the ciphertext is used to compute the next value of the keystream, it is called self-synchronozing stream cipher or asynchronous stream cipher.



Block Ciphers


In block cipher, on the other hand, the symmetric key operates on some fixed number of bits of the message or plaintext and creates the ciphertext. The fixed number of bits is called block. The size of the symmetric key may not be necessarily of the same length of that of the plaintext block.

Block cipher operates on a single data block of the plaintext. If the message is of variable length, then the last block is extended by padding. To prevent the pattern of plaintext message from becoming evident in the ciphertext, sometimes block cipher modes of operation is used. In this mode, at each encryption operation, one Initialization Vector is operated on the block of data to ensure different ciphertext is produced even when same plaintext is encrypted multiple times with the same key. Value of this Initialization Vector is randomized after each operation.

Data Encryption Standard or DES and Advanced Encryption Standard or AES are examples of block cipher.


No comments:

Post a Comment