symmetric cryptography Flashcards

1
Q

symmetric encryption system

A

the same key is used to encrypt and decrypt

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

stream cipher

A

takes a short key as input (often combined with the initialisation vector)
the key is converted into a continuous key stream
one bit at a time the plaintext is mixed with the keystream

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

what are 3 positives of stream ciphers

A

no error propagation
on the fly encryption so good for realtime services
fast and easy to implement esp in hardware

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

what is a negative of stream ciphers

A

require sender and receiver synchronisation

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

what is a block cipher

A

takes a key and block of plaintext as input and outputs a block of cipher text

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

what are two things that a good cipher text should do

A

confusion and diffusion

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

block cipher confusion

A

hides the relationship between the plaintext and ciphertext

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

block cipher diffusion

A

spreads the statistics of the plaintext through the ciphertext
e.g. should have the avalanche effect; obscuring the statistical structure of the plaintext

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

why is it good that block ciphers have diffusion

A

prevents frequency analysis attacks

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

pseudorandom permutation

A

a function that shuffles data in a way that looks random but is actually done deterministically via a computer algorithm and secret key

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

in which case can a block cipher provide protection against chosen plaintext attacks

A

if it behaves like a pseudorandom permutation
even if an attacker encrypts many plaintexts the ciphers will still look random and unpredictable

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

what are some examples of block ciphers

A

data encryption standard (des) + triple des (3des)
advanced encryption standard (aes)
camellia
international data encryption algorithm (idea)

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

how does the advanced encryption standard work

A

it is a round function that operates on 16 bytes of inputs
for each round, a round key is derived from the secret key and applied for that round which increases security

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

how do you decrypt the aes (advanced encryption standard)

A

perform the encryption steps in reverse

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

what are two benefits of the aes

A

v fast
supports key sizes of 128 192 256

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

initialisation vector

A

a random or unique value used to add randomness to encryption

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

what are modes of operation in block ciphers

A

define how encryption is applied to multiple blocks of plaintext to handle messages larger than a single block

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

what are the 4 modes of operation

A

electronic code book (ebc)
cipher block chaining (cbc)
cipher feedback (cfb)
counter (ctr)

19
Q

electronic code book (ebc)

A

each plaintext block is encrypted independently using the same key

20
Q

what are negatives of electronic code book (ebc)

A

not secure for structured data
identical plaintext blocks will produce the same cipher making patterns visible

21
Q

cipher block chaining (cbc)

A

each plaintext block is XORed with the previous cipher text block before encryption using the initialisation vector for the first block

22
Q

what are positives of cipher block chaining (cbc)

A

identical plaintext blocks will produce different ciphertexts if a unique iv is used
stronger security than ebc

23
Q

what are negatives of cipher block chaining (cbc)

A

requires padding for messages that arent a multiple of the block size
encryption must be done in order therefore it isnt parallelizable

24
Q

cipher feedback (cfb)

A

converts a block cipher into a stream cipher
instead of encryption the plaintext directly the prev cipher is encrypted then XORed with the plaintext

25
what are positives of cipher feedback (cfb)
doesnt require padding localized error propagation — If a bit gets corrupted in one block, it affects only the current and next block, making the system more resilient to isolated errors.
26
what are negatives of cipher feedback (cfb)
errors in transmission affect multiple blocks
27
counter (ctr)
instead of chaining a counter value is encrypted then XORed with the plaintext
28
what are positives of counter (ctr)
highly parallelisable as each block is independent no padding needed fast encryption and decryption
29
what are negatives of counter (ctr)
if the same counter and key are reused then the encryption is broken
30
padding
extends the plaintext to be a multiple of the block sizes as many block ciphers require this
31
what are the three positives of block ciphers
versatility adaptability compatibility
32
negatives of block ciphers (3)
error propagation need for padding speed in hardware
33
what do message authentication codes (mac) do and how
provide data integrity and origin authentication secret symmetric keys means the mac cannot be changed if the dta changes therefore any changes are detectable
34
what do macs NOT provide
non-repudiation
35
encrypt-then-mac
encrypt the plaintext then compute the mac for the cipher
36
what does encrypt-then-mac provide
protection against chosen ciphertext attacks
37
how do macs get developed
creates a fixed length tag by applying the secret key to the message via a cryptographic function which is then attached to the message only someone with the same secret key can generate the correct mac thus verifying that the message hasnt been tampered with
38
what are two examples of macs
hmac and cbc-mac
39
how does hmac work
can be constructed from any hash function needs two keys the tag is created by hashing a concatenation of the second key and the message that is then concatenated with the first key and hashed again 𝑡𝑎𝑔 = 𝐻(𝑘1 ∥ 𝐻(𝑘2 ∥ 𝑚))
40
in hmac what happens if the keys are longer than the block size of the hash function
hash them first
41
in hmac what happens if the keys are shorter than the block size of the hash function
pad with 0s
42
why does hmac use double hashing
more secure
43
cbc-mac
uses counter block chaining mode of operation the cipher starts with the initiation vector (usually all 0s) each message block is XORed with the previous ciphertext block, then encrypted. the final ciphertext block is used as the authentication tag (MAC).