Lecture 12: Public Key Cryptography Part 1 Flashcards

1
Q

What is a one-way function?

A

A function is one-way if f(x) = y is easily computed given x, but f^(-1)(f) = x is computationally hard to compute given y

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

What are two functions that are believe to be one-way?

A

1) Multiplication of large primes: the inverse function is integer factorisation
2) Exponentiation: the inverse function takes discrete logarithms

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

What is a trapdoor one-way function?

A

function f is a one-way function s.t. f^(-1)(y) is earliy computed given additional information, called trapdoor

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

Explain how modular squaring is a trapdoor one-way function

A

Given n = pq where p, q are 2 large primes, f(x) = x^2 mod n

If an algorithm takes square roots (i.e. computes f^(-1)) then it can be used to factorise n

The trapdoor is the factorisation of n

If the trapdoor is known the an efficient algorithm finds the square root

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

What is a public key cryptosystem design by using?

A

A trapdoor one-way function where the trapdoor is the decryption key

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

What are public key cryptosystems also know as?

A

asymmetric cryptography

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

Define what asymmetric means in asymmetric cryptography

A

encryption and decryption keys are different

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

Who knows the encryption key in asymmetric cryptography?

A

Known by anybody

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

What is the encryption key also called in asymmetric cryptography?

A

public key

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

Who knows the decryption key in asymmetric cryptography?

A

known ONLY to its owner

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

What is the decryption key also called in asymmetric cryptography?

A

private key

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

Comment on the needed hardness of finding the private key from the knowledge of the public key

A

MUST be a computationally hard problem

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

What are the pros of public key cryptography (in comparison to shared keys/symmetric cryptograpgy)

A

1) key management is simplified
- -> keys do not need to be transported confidentially

2) digital signatures can be obtained

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

In a public cipher, can encryption keys be made public?

A

yes

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

In practice, where does Alice store her public keys? What are the consequences of this?

A

Stores keys in public directory

–> anyone can obtain her public key and use it to form an encrypted message to Alice

–> since Alice has the private key (associated with her public key), she can decrypt and recover the message

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

What are RSA algorithms based on?

A

integer factorization problem

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

At a high level, what is RSA?

A

public key cryptosystem and digital signature scheme

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

Explain key generation for RSA algorithms

A

See slide 13, set 12

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

What is the encryption process for RSA?

A

See slide 14, set 12

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

What is the decryption process for RSA?

A

See slide 14, set 12

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

Explain the numerical example of key generation, encryption and decryption for RSA on slide 15 of set 38

A

See slide 15, set 12

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

Eplain the RSA proof of encryption correctness on slides 16-19 in set 12

A

See slide 16-19, set 12

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

What are four of the applications of RSA?

A

1) message encryption
2) digital signatures
3) distributed of a shared key for symmetric key encryption (hybrid encryption)
4) user authentication by proving knowledge of the private key corresponding to an authenticated public key

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

What are some challenges with RSA in terms of trying to optimise it?

A

key generation
–> generating large primes p, q and choice of e

encryption and decryption
–> fast exponentiation and faster decryption using CTR

data formatting
–> padding

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

What is the requirements for primes p, q i.t.o RSA?

A

should be random of a chosen length –> one at least 1024 bits

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

What is the simple algorithm for generating large primes p,q for RSA?

A

1) select a random odd number r of the required length

2) check whether r is prime:
- > if so, the output r and halt
- > otherwise, increment r by 2 and go to step 2

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

What is a fast way to check primality?

A

Miller-Rabin test

28
Q

How should public exponent e for RSA be chosen?

A

chosen at random for best security

29
Q

What kind of value for e is used in practice for the public exponent i.t.o RSA?

A

small e value

30
Q

Why must the public exponent e be small in practice i.t.o RSA?

A

has large effect on efficiency

31
Q

What is the smallest possible value of e public exponent i.t.o RSA?

A

e = 3

–> sometimes used by has security problems!

32
Q

What is a popular choice for the public exponent e i.t.o RSA?

A

e = 2^(16) + 1

33
Q

What is an alternative to having a small public exponent e i.t.o RSA?

A

a smaller than average value for private exponent d is also possible

BUT at least √n to avoid known attacks

34
Q

How can we do fast exponentiation for encryption and decryption for RSA?

A

Using square-and-multiply modular exponentiation

35
Q

Explain how the square-and-multiply modular exponentiation algorithm works

A

See slides 25-26 in set 12

36
Q

Comment on the number of squarings the square-and-multiply modular exponentiation algorithm uses

A

If 2^k <= e <= 2^(k+1), then the algorithm uses k squarings

–> if b of ei bits are ‘1’ then the alg uses b - 1 multiplications

–> 1st computation z

37
Q

In terms of the square-and-multiply modular exponentiation algorithm, how many bits is the modulus n and what does this mean for the number of bits of e?

A

n is a 2048-bit modulus and so e is of at most 2048 bits

38
Q

When computing M^e mod n i.t.o. the square-and-multiply modular exponentiation algorithm, how many modular squarings and multiplications are required AT MOST?

A

2048 modular squarings

2048 modular multiplications

39
Q

I.t.o the square-and-multiply modular exponentiation algorithm, on average how many bit ei are ‘1’?

What is the consequence of this on the number of multiplications?

A

only half

so only 1024 multiplications

40
Q

What is important to remember about the square-and-multiply modular exponentiation algorithm?

A

reducing modulo n after every operation

41
Q

Explain slide 28 in set 12 about faster decryption using CTR i.t.o RSA

A

See slide 28 in set 12

42
Q

Explain the example of using CTR to decrypt C w.r.t. p, q separately on slide 29 in set 12

A

See slide 29 in set 12

43
Q

I.t.o decryption with CTR for RSA, compare the length of exponents d mod (p-1) and d mod (q-1) with d

A

exponents d mod (p-1) and d mod (q-1) are about half the length of d

44
Q

How much much does the exponentiation (with square-and-multiply) increase i.t.o decryption with CTR?

A

increases with the cube of the input length

–> computing Mp and Mq each uses 1/2^3 = 1/8 of computation for M = C^d mod n

45
Q

How much less computation is required for decryption with CTR i.t.o RSA?

A

~ 4 times less computation

–> If Mp and Mq can be computed in parallel, then the time is up to 8 times faster

46
Q

Because decryption with CTR for RSA is faster, what is a good reason to store with d?

A

p and q

follow up on –> slide 30 in set 12

47
Q

Why is encrypting directly on message encoded as a number is a weak cryptosystem?

A

Vulnerable to attacks such as:

1) building up a dictionary of known plaintexts
2) guessing the plaintext and checking if it encrypts to the ciphertext
3) Håstad’s attack

48
Q

I.t.o. RSA, what must the padding mechanised be used for?

A

used to prepare message for encryption –> must include redundancy and randomness

49
Q

Explain Håstad’s attack

A

See slide 32 in set 12

50
Q

How can we find M in Håstad’s attack?

A

by taking a cube root

51
Q

Briefly outline the padding type PKCS #1

A

simple, ad-hoc design for encryption and digital signatures

52
Q

What are the padding types for RSA implementation?

A

1) PKCS #1

2) Optimal asymmetric encryption padding (OAEP)

53
Q

What standard is OAEP in?

A

IEEE P1363 Standard specifications for public key cryptography

54
Q

What does OAEP stand for?

A

optimal asymmetric encryption padding

55
Q

How are most of the existing attacks on RSA avoided?

A

By using standardised padding mechanisms

56
Q

Comment on attacks on factorisation of the modulus n i.t.o RSA security

A

Factorisation is believed to be a hard problem

Factorisation can be prevented by choosing n large enough

57
Q

Comment on attacks on finding d from n and e i.t.o RSA security

A

Finding d is as hard for the adversary as factorising the modulus n

58
Q

What is the equivalence with factorisation problem?

A

an attacker factorises n into its prime factors p, q, and thus record d

59
Q

Is breaking RSA harder than the factorisation problem?

A

no!

60
Q

Comment on how breaking RSA is shown to be as hard as the RSA problem

A

It is unknown if RSA problem is as hard as the factorisation problem

It is also unknown if factorisation is really computationally hard

61
Q

I.t.o RSA’s security, can we find d without factorising the modulus n?

A

NO!

62
Q

What is Miller’s theorem?

A

determine d from e, n is as hard as factorising n

63
Q

What are two other attacks on RSA?

A

1) quantum computers

2) timing analysis

64
Q

Comment on quantum computer attacks on RSA

A

not existing yet (at least commercially)

–> Shor’s theoretical alg can factorise n in polynomial time

65
Q

Comment on timing analysis attacks on RSA

A

using time of decryptino process to obtain info about d

–> demonstrated in practice for RSA in smart cards

–> avoided by randomising decryption process

66
Q

What are some practical problems with key generation?

A

See slide 38 in set 12