Lecture 5 Flashcards

1
Q

How do we encrypt a message larger than the block size of the cipher?

A

Divide the message into multiple blocks, and pad the last block if necessary. Then use an encryption mode on the various blocks.

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

What are some examples of encryption modes?

A
  1. Electronic Code Block (ECB)
    Each block is encrypted separately using the block cipher.
  2. Cipher Block Chaining (CBC)
    Where each block is the encrypted XOR of the previous block.
  3. Counter Mode (CTR)
    Uses a counter.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What restrictions in terms of length do block ciphers require?

A

The length of the message must be a multiple of the block length.

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

How does PKCS padding function?

A

PKCS padding involves adding bytes to data to fit a block cipher’s block size. If the data is 5 bytes and the block size is 8, 3 bytes of 03 are added. If the data length is already a multiple of the block size, a full block of padding is added, each byte equal to the block size. For example, for 16-byte data with an 8-byte block size, an 8-byte 08 padding is added.

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