Chapter 8ii: Secure Channel Flashcards

1
Q

Authenticated Encryption With Associated Data (AEAD)

  • In order to establish a secure channel, quite a lot has to be considered:
A
  • Encryption (selection of the right cipher and mode of operation, IV, sequence numbers, key, . . . )
  • Integrity protection/authentication (selection of the right MAC construction, key, feed the right parameters
    (IV, sequence numbers, ciphertext, …) into the function, . . .
  • Using the crypto primitives in the right order (Enc-then-Mac)

All in one solution:Authenticated Encryption With Associated Data (AEAD)

  • Possible problems:
  • Design and/or implementation errors
  • Performance: in our toy example, the data, i.e., first the plaintext, then the ciphertext, had to be processed
    in two separate steps. It would be desirable to have a “one pass” solution!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Authenticated Encryption With Associated Data (AEAD)

Definition:
* One pass encryption and MAC calculation for payload including “associated data”-

Specify benefits and examples.

A
  • Associated data (AD): Additional non-encrypted but authenticated (header) data, e.g.
  • Sequence numbers,
  • IV
  • information necessary for message routing,

  • Benefits:
  • Security: AEAD algorithms correctly combine message encryption and authentication and are standardized;
    errors by inexperienced programmers can be avoided
  • Performance: AEAD algorithms only need one pass over the data
  • Examples:
  • Galois/Counter Mode (GCM)
  • Offset Codebook Mode (OCB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A

Combines concept of Counter Mode for encryption with Galois Field Multiplication to compute MAC on the cipher-
text

  • Authenticated Data is data not to be encrypted. GCM generates check value by XOR and GF multiplication with
    H for each block.
  • For the MAC, this process continues on the ciphertext and a length field in the end.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What to note here?

A
  • Note: Example authenticates 1 AD block and encrypts and authenticates 2 plaintext blocks
  • Counter 0 = IV, Auth Tag = MAC
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
  • However, block-dependent offsets mask plaintext blocks to avoid ECB problems like determinism!
  • AD is not encrypted but authenticated
  • For example: Unencrypted header data
  • Checksum = XOR over plaintext, length- and key-dependent variables
  • MAC = (Encryption of checksum with shared key k) XOR (hash(k,AD))
  • Note: hash() is specific for OCB and also part of the standard
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Offset Codebook Mode (OCB)

A
  • L’s are used to compute offsets for different inputs:
  • Lntz(i) → P1, P2, …Pm (first m plain text blocks)
  • L⋆ → P⋆ (last block)
  • L$ → checksum

  • Note:
  • Only few Li are needed (for a fixed K)
  • They can be pre-computed and stored in a Lookup table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

OCB Initialization

  • Offset0 is computed by a
  • “It is crucial that, as one encrypts, one does not repeat a nonce.” [RFC 7253, §5.1]
    Otherwise (same ciphertext, same MAC)
  • Nonce may not be random, e.g. a counter works fine
  • A new nonce for
A

specific function depending on the key and a nonce
identical messages would be processed identically
every authenticated encryption API call is needed!

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

Offset Codebook Mode (OCB)

  • Question: XOR plaintext and then encrypt, that sounds like the weak MAC example from slide 6.19. Why is OCB secure?
A
  • The attack on 6.19 was possible, as the attacker knows m and can easily forge the “magic” block yo, which does not depend on any secret.
  • With OCB, the attacker cannot apply the same trick as they neiter know or can compute
  • Offset* and
  • Ls,
  • and lastly, the attacker does not know m, as it is encrypted.

  • “OCB enjoys provable security: the mode of operation is secure assuming that the underlying blockcipher is secure. As with most modes of operation, security degrades as the number of blocks processed gets large” [RFC 72531]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Attacks against a Secure Channel (Stream Cipher)

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

The assumption is, we generate a password and then we test it.

  • The assumption is that we can check each character individually for correctness.
  • For each character it is N/2 (avg) and N (worst case)
  • So, overall L ∗ N/2 (avg)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

MAC-then-Encrypt-Issues

Operation & Consequence

  • Operation: P and MAC are encrypted and hidden in the ciphertext. What happens with the receiver?

What are the consequences?

A
  • Decrypts P
  • Decrypts MAC
  • Computes and checks MAC→MAC error or success
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

MAC-then-Encode-then-Encrypt

If we use a block cipher, we have to ensure that the message encoding fits to the blocksize of the cipher. How does Mac-Encode-Encrypt work?

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

Oracles and Side Channels: Avant, people asked oracles for guidance.

  • In computer science, oracles are functions that give cheap access to information that would otherwise be hard to compute.

What happens in cryptography?

A
  • E.g. O(1) cost to ask specific NP-complete question → polynomial hierarchy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Fill in the blanks.

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

Concept of Padding Oracle Attack (against CBC)

A

To decrypt the ciphertext, the attacker modifies C and sends it to Bob.

It is unlikely that the MAC and padding are correct. So, Bob will send an error back to Alice (and the attacker).

17
Q

What is shown below?

A

CBC Encrypt(above) Decrypt(below)

Padding Oracle Attack - CBC mode decryption (revisited)

18
Q

Padding Oracle Attack against CBC

Assumptions, Approach, Goal

Goal: Decrypt the complete ciphertext using the oracle.

A
  • Assumptions:
  • Attacker got hold of a ciphertext C (n blocks, N bytes per block)
  • C was protected with Encryption in CBC mode used in MAC-then-Encode-then-Encrypt mode.
  • For padding PKCS7 was used (padding of 1 byte: pad = 1, padding 2 bytes: pad = 2 2, …)
  • An oracle replies to sent ciphertexts with error messages:
  • Padding error if padding doesn’t match (checked before MAC).
  • MAC error if padding fits but MAC is wrong.
19
Q

Padding Oracle attack vs CBC

How does it work?

A
  • The attack was against CBC mode used in MAC-then-Encode-then-Encrypt mode.
  • Padding Oracle attack known long in cryptography.
  • Mode still used in SSL / TLS. Hacks have utilized that. However, defenses have been added.
  • CBC with Encode-then-Encrypt-then-MAC does not have this vulnerability.
  • Because MAC check would fail first, process would be aborted, and padding problems would then not be leaked.