Modes of operation and random numbers Flashcards

1
Q

What is the purpose of having multiple modes of operation for block ciphers?

A

The different modes can provide different things. Some modes can be designed to provide confidentiality for data, authentication (and integrity) or both.

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

What is one thing that confidentiality modes normally must include?

A

Randomisation

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

What does randomised encryption schemes want to prevent?

A

The same plaintext block being encrypted to the same ciphertext block every time

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

How can randomisation be achieved in block ciphers?

A

Using an initialisation vector. This needs to be unique or random.

Can be achieved by including a variable state which is updated with each block.

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

What are some other features of modes?

A

Can allow parallel processing, enc and/or dec in parallel.

Error propagation: error in C result in multiple bit-errors in P after decryption

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

Why is padding used in some modes?

A

Some modes require plaintext to consist of complete blocks

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

What is ciphertext stealing?

A

An alternative to padding.

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

What is the ECB mode?

A

Enc:
Ct = E(Pt, K), plaintext block Pt

Dec:
Pt = D(Ct, K)

Blocks are appended to each other to make the message.

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

Why is ECB mode normally not used for bulk encryption?

A

Because it is deterministic

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

What are the properties of ECB?

A

Randomised: No
Padding: Required
Error propagation: Within block
IV: Not used
Parallel encryption: Yes
Parallel decryption: Yes

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

Describe the CBC mode

A

Random IV, sent together with the ciphertext

Enc:
Ct = E(Pt XOR Ct-1, K)
C0 = IV

Dec:
Pf = D(Ct, K) XOR Ct-1
C0 = IV

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

How does error propagate through CBC?

A

An bit error in block n result in a plaintext error for the block n, and a flipped bit in block n + 1,

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

What are the properties of CBC?

A

Randomised: Yes

Padding: Required

Error propagation: Within block, and into specific bits of next block

IV: Must be random

Parallel Enc: No

Parallel Dec: Yes

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

Describe CTR mode

A

Synchronous stream cipher.

Keystream generated by enc successive values of a ‘counter’ initialised using a nonce N.

The nonce and C-blocks are sent

Ot = E(Tt, K)
Tt: Concatination of nonce and block number t

Enc:
Ct = Ot XOR Pt

Dec:
Pt = Ot XOR Ct

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

What is a nonce in CTR mode?

A

A randomly chosen value

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

How is error propagated in CTR mode?

A

A one-bit change in C block n, produces a one-bit error in the plaintext at the same location

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

What are the properties of CTR mode?

A

Randomised: Yes

Padding: Not required

Error propagation: Error occur in specific bits of current block

IV: Nonce must be unique

Parallel Enc: Yes

Parallel Dec: Yes

18
Q

When can using CTR mode be useful?

A

For access to specific P blocks without decrypting the whole stream

19
Q

Where is CTR mode used today?

A

Basis for authenticated encryption in TLS 1.3 and 1.3

20
Q

What is a TRNG?

A

True random number generator.

A physical process which outputs each valid string independently, with equal probability

21
Q

What is a PRNG?

A

Pseudo random number generator

Deterministic algorithm which approximates TRNG

22
Q

How can PRNG and TRNG be combined?

A

May use TRNG to provide a seed for a PRNG

23
Q

What is DRBG?

A

Deterministic Random Bit Generators. These are PRNG algorithms

Based on:
Hash functions
A specific MAC known as HMAC
Block ciphers in counter mode

24
Q

How does PRNGs work?

A

Each generator takes a seed as input and outputs a bit string. Then its state is updated.

Seed should be updated after a number of calls

Seed can be obtained from TRNG

25
What are entropy sources?
Framework for design and validation of TRNGs Includes physical noise source, digitalization process, and post-processing stages Outputs any number of bits
26
What are the functions of DRBGs?
Instantiate: Sets initial state of DRBG using seed Generate: Provides output bit string Reseed: Input new seed and update DRBG state Test: Checks correct operation of the other functions Uninstantiate: Deletes the state of the DRGB
27
How is security defined for DRBGs?
Ability to destinguish reliably between its output and a truly random string. 2 properties: Backtracking resistance and forward prediction resistanse
28
What is backtracking resistance?
If we have the current state, should not be able to distinguish between the output of earlier calls to the DRBG generate function, and random strings
29
What is forward prediction resistance?
If we have the current state, should not be able to distinguish between the later outputs and random strings
30
What is CTR_DRBG?
Uses block with CTR (AES-128 recommended) Seed length is block-length + key length Key and state (counter) is defived from high entropy seed. No separate nonce is used Counter mode enc is run iteratively with no Plaintext added and output blocks form the output
31
Define the update function in CTR_DRBG
Used in initialise, generate and reseed functions to generate new key and state. Input: K and V (state/counter) and optional data input D Output: K' and V' Computation for block size = key size: - Generate new block O1 = E(V,K) - Increment V - O2 = E(V, K) - K' || V' = (O1 || O2) XOR D
32
How does the instantiate function work in CTR_DRBG?
Calls update with D equial to high entroy seed, K and V are zero strings
33
How does the generate function work in CTR_DRBG?
Computes up to 2^19 bits by running CTR mode output from current state. Update is then called with D empty
34
How does the reseed function work in CTR_DRBG?
Update with D as high entropy input, K and V in current state
35
How many calls can be made to Generate before Reseed must be called, according to the standard for CTR_DRBG?
2^48
36
In CTR_DRBG what provides backtracking resistance?
Update and Reseed
37
In CTR_DRBG what provides forward prediction resistance?
Reseed
38
What is Dual_EC_DRBG?
Older standard Based on elliptic curve discrete logarithm problem Slower than other DRBGs No security proof exist,
39
What are Cryptographically-secure pseudorandom number generators (CSPRNGs)?
Algorithms, that given an unpredictable input, a much larger stream of unpredictable outputs are generated.
40