Symmetric-key cryptography

boru 25th April 2019 at 3:59pm
Public

Block ciphers

Definition

  • encrypt only data in blocks of fixed size
  • the data is separated in larger chunks and the cipher encrypts a block at a time (usually a block size is at least 64 bits and can be up to 128 or 256 bits)

Moded of operation

Examples

  • DES (8-byte blocks)
  • AES (16-byte blocks)

Stream ciphers

Definition

  • principle of the one-time-pad
  • use of PRNG (pseudo random number generators)
    • use a seed to generate a larger keystream
  • consists of a stream of data and the cipher can encrypt small chunks at a time (usually 1 byte at a time)

Security implications

  • never use the same keystream multiple times
  • key length is important

Usage

  • Stream ciphers are often used for their speed and simplicity of implementation in hardware, and in applications where plaintext comes in quantities of unknowable length like a secure wireless connection
  • Another advantage of stream ciphers in military cryptography is that the cipher stream can be generated in a separate box that is subject to strict security measures and fed to other devices such as a radio set, which will perform the xor operation as part of their function

Examples

  • RC4
    • Vulnerable to several attacks
  • A5/1
  • A5/2
  • ChaCha20

Get Shit Done v2

Some random thoughts.