Cryptography

  1. ECB
  2. CBC
  3. CFB
  4. OFB
  5. CTR
  6. 3DES
  7. Cipher notation
  8. HMAC

ECB

  • electronic code book
  • does not use IV ⇒ same data + single key ≡ same cryptoblocks ⇒ statistically vulnerable
  • suitable for small data: PIN, challenge-response, keys
  • can be implemented concurrently
  • independent blocks ⇒ suitable for DB encryption
  • does not spread error in encrypting/decrypting

CBC

  • cipher block chaining
  • uses IV to increase entropy for the 1st block
  • not suitable for streaming

CFB

  • cipher feedback
  • emulates stream cipher with block cipher

OFB

  • output feedback
  • does not spread error ⇒ can be used for audio/video

CTR

  • counter
  • OFB-like, but uses counter instead of Oi
  • no chaining ⇒ can be implemented concurrently
  • useful for encrypting data that might be out of order
    • ATM cell
    • IPsec packet
    • 802.11i frame

3DES

  • modes
    1. EEE3: 3 different keys, 3 encryptions
    2. EDE3: 3 different keys, encrypt-decrypt-encrypt
    3. EEE2: 2 different keys, I and III are equal
    4. EDE2

Cipher notation

cipher–block/rounds/key

RC5-32/12/16:

  • 32 words = 64bit block
  • 12 rounds
  • 16 bytes key

HMAC

  • origin authC because of key (not provided by hash)