RC4 Flashcards

1
Q

Which kind of cypher is RC4?

A

Stream cypher

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

What are the main characteristics of a stream cipher?

A
  • Emulate one-time pad
  • process message bit by bit (as stream)
  • have a pseudo-random keystream
  • combined (XOR) with plain text bit by bit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which is the main goal of the stream cyphers?

A

The main goal is the randomness of stream key completely destroys statistical properties in message

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

What can cause security issues in a bad stream cipher implementation?

A

If the implementation reuses the stream key, it can compromise the implementation. Whenever the stream key is reused, we can recovery messages (using book cipher, for example).

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

In which mode is RC4 operated?

A

RC4 is operated in the output feedback mode (OFB)

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

How does RC4 work?

A
  1. The encryption algorithm generates a pseudo-random sequence RC4(IV, K) that depends only on the key K and an initialization vector IV
  2. The plain text is then XORed with the pseudo-random sequence to obtain the cipher text and vice versa.
    C1 = P1 XOR RC4(IV1, K)
    P1 = C1 XOR RC4(IV1, K)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the keystream?

A

It is the pseudo-random sequence generated by RC4 based on IV (initialization vector) and K (the key).

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

What is crucial to the security of the RC4 algorithm?

A

It is crucial to the security of the RC4 algorithm that the keystream is never reused, otherwise we would have two IV (initialization vectors) in which holds that IV1 = IV2 with the same key and then the XOR of two plain text can be obtained.
C1 XOR C2 = P1 XOR RC4(IV,K) XOR P2 XOR RC4(IV, K) = P1 XOR P2

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

What is the key length of the RC4 algorithm?

A

Since the key is used only as a seed, the key length is variable up to 2048 bit.

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

Explain in details how does RC4 work.

A

RC4 uses two byte arrays of 256 elements: S[0,255], K[0,255].

Step1: Initialize the arrays
     for all elements of S:
           S[i] = i;
     j := 0
     for i from 0 to 255
         j := (j + S[i] + key[i mod keylength]) mod 256
         swap values of S[i] and S[j]
     endfor
Step 2: generate the key stream
     i := 0
     j := 0
     while GeneratingOutput:
         i := (i + 1) mod 256
         j := (j + S[i]) mod 256
         swap values of S[i] and S[j]
         K := S[(S[i] + S[j]) mod 256]
         output K
     endwhile

Step 3: XOR the keystream with the plain text or the cipher text

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

How is the security of RC4 regarding to brute force attacks?

A

Trying every possible key using bruteforce:

  • the variable key length of up to 2048 bit allows to make this kind of attack impractical.
  • By reducing the key length can also be made arbitrarily insecure.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is the security of RC4 regarding to differential and linear cryptanalysis attacks?

A

RSA claims that RC4 is immune to differential and linear cryptanalysis, and no small cycles are known.

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

Is a 40bit key length secure enough?

A

NO! It is not secure against brute force attacks

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

Which transfer protocol uses RC4 with a key length of 40bit?

A

SSL, which lacks security then.

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

There are any known weaknesses of RC4?

A

Yes, depending on the details of the key scheduling method it leads to severe vulnerabilities.

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

There is any recommendation to turn RC4 more secure?

A

Yes, to discard the first 3072 bits of the keystream.