Chapter 4: Symmetric Encryption Flashcards

1
Q

Symmetric encryption uses a shared secret symmetric key k. What are some implicit assumptions?

A
  • k is shared between two (Alice and Bob) or more (group) participants
  • Besides these participants, nobody else knows k → k is secret
  • k is used to encrypt and decrypt → k is symmetric
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • Terminology
  • Plaintext m: The message itself
  • Ciphertext c: The encrypted plaintext
  • Operators:
  • Encryption: c = Enck (m)
  • Decryption: m = Deck (c)
  • Basic correctness requirement for Symmetric Encryption:
A

Deck (Enck (m)) = m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • Why is len(c) >= len(m)? What security goals are fulfilled? Explain. (Symmetric Encryption)
A
  • The second block of m is padded with extra data to have a full block of 16 Byte

Confidentiality.

NOT Authenticity: An attacker could modify c . Deck (c) will most probably yield garbled text. Receiver can only assume that the message was modified but not prove it!

NOT Integrity. Attacker could just send some random c and spoof Alice’s IP address.
Deck (c) will yield garbled text. Receiver can only assume that the message is not authentic but not prove it!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Example for Enc and Dec: One-Time-Pad (OTP)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Kerckhoffs’s principle
“The cipher method must not be required to be secret, and it must be able to fall into the hands of the enemy without inconvenience.”

Explain the consequences and benefits.

A

Consequences* The cipher, i.e., the encryption algorithm, can be public. (In fact it should be!). If the cipher is public, security depends on the key, which must be kept secret.

Benefits: * If security would depend on the cipher’s obscurity and the cipher leaks we would need to build a new one
You don’t have to come up with a new cipher for each communication partner; selecting a new key is sufficient
* If the cipher does not need to be hidden, we can perform review procedures that increase confidence in the cipher

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Examples of secure real-world symmetric ciphers
* AES (block cipher)
* 3DES (block cipher)
* ChaCha20 (stream cipher)
* One-Time-Pad (stream cipher)
* Why can we trust them?

A
  • The ciphers are published,
  • and they have been publicly reviewed/analyzed by cryptographers.
  • They are standardized.
  • Well-tested/optimized implementations are available in the library of your favorite programming language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the Dos of crypto?

A
  • Do use standardized ciphers from your library
  • Be aware of the dangers:
  • Unlikely: A well-established cipher is broken or backdoored
  • Likely: Wrong usage of the cipher (maybe in conjunction with other cryptographic algorithms) compromises security (RTFM)!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the DONTS of Crypto?

A
  • Don’t implement your own cipher.
    “Any person can invent a security system so clever that he or she can’t imagine a way of breaking it.”
    (Schneier’s law)
  • Don’t claim “it’s encrypted, it is secure”.
    Encryption ↑= Security
    Forgetting integrity and authenticity may be worse than any information leakage! → Padding Oracle attack
  • Key management (key exchange, rekeying, etc.) is difficult and highly important and shouldn’t be neglected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Attacking Symmetric Ciphers
* Goal: given c, learn something about m and/or k
* If something about k (e.g. some bits) can be learned, the attack is already successful. Why?
* We can repeat the attack and learn more about k
* Knowing a couple of bits of k might allow us to brute-force the rest

Explain the attack scenarios.

A

Cipher-text only attack, Known-Plaintext attack, Chosen Plain-text or chosen-ciphertext attack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Attacking Symmetric Ciphers Security of Ciphers
* A cipher is secure if the best known attack is brute-forcing all keys.2
* Brute-Force: exhaustively testing all keys by decrypting c with the k-candidate;
We assume to have found the “right” key when decryption result “looks reasonable”. Exemplify.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

One-Time-Pad: A Perfect Cipher
* Reminder: Encotp (m) = m XOR otp, Decotp (c) = c XOR otp, otp is random. Cover the attack scenarios.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Drawbacks of One-Time Pad

A
  • Necessary key length in bits: length(otp) = length(m)
  • otp must not be reused
  • Key generation and key distribution is difficult
  • Applicability in many real-world use cases difficult (Think: encrypted web-traffic between server and clients)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Wish list for practical ciphers

  • length(k ) &laquo_space;length(m)
  • Key reusable for several messages
  • Unavoidable implication (for length(m)&raquo_space; length(k )):
  • Cipher is still secure (when…)
A

Key of fixed length, e.g. 128 bit

  • k can be brute-forced
  • Brute force attack succeeds when a k is found which decrypts c to an “reasonable” m.
  • If m is not perfectly random, c cannot be perfectly random

key size is sufficient!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Example of iCry– insecure Cryptographic cipher

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Block and Stream Ciphers: differentiate( Assume: shared symmetric k of fixed length)

  • Block cipher
  • Encrypts and decrypts inputs of length n to outputs of length n
  • Block length n
  • Examples: AES, DES, 3DES, Blowfish, Twofish, ……
A
  • Stream cipher
  • Generates a random bit stream, called key stream
  • c = keystream ↗ m
  • Examples: ChaCha20, RC4 (broken!)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Interlude: Which Symmetric Cipher should I use?
* Probably AES
* Reasons to use AES:

A
  • Fast: 200 MBit/s in software and > 2 GB/s with Intel AES-NI
  • Hardware implementations for embedded devices available
  • A well-tested implementation is available in your library
  • Secure (attacks exist, but AES is practically secure)
  • AES seems to be the best we have, and it is among the most researched algorithms