Public Key crypto Flashcards

1
Q

modular inverse (additive vs multiplicative)

A

ex: 5 mod 7

Multiplicative question: “what can we multiply 5 by to get 1 mod 7?” (both numbers must share GCD of 1)

https://www.youtube.com/watch?v=FnQNbFl72LY

Additive question: “What number can add to 5 mod 7 that will result in a value of 0?”

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

primitve root check process

A

for given number p, choose number x.

Iterate x^n mod p (for n = 1 … n == p-1)

If all results are distinct and all results are less than p, the number is a primitive root.

https://www.youtube.com/watch?v=Ef6YcpmnIqs

EX: To check if 2 is a primitive root of 11:
2^1 mod 11 = 2
2^2 mod 11 = 4
2^3 mod 11 = 8
2^4 mod 11 = 5
2^5 mod 11 = 10
2^6 mod 11 = 9
2^7 mod 11 = 7
2^8 mod 11 = 3
2^9 mod 11 = 6
2^10 mod 11 = 1

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

totients

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

modular congruence

A

Congruence:
A == B mod(C)
means
A mod(C) = B mod(C)

For Example:
(26 mod 5 = 1) and (11 mod 5 = 1) so ….
(26 == 11 mod 5)

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

c = 7^27 mod 30

A

using totient function,

c =7 27mod ϕ(30) mod 30

ϕ30 = ϕ10 * ϕ3

ϕ10 = 4

ϕ3 = 2

ϕ30 = 8

so…

c =7 27mod 8 mod 30

c =7 3 mod 30

c = 343 mod 30

c = 13

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

theoretical basis for RSA

A

factoring a large number into two primes it very hard

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

RSA key lengths in practice

A

1024, 2048, 4096

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

RSA attributes

A
  1. plaintext treated as an integer and must be smaller than the keylength
  2. ciphertext block is the same as the key length
  3. supports both public key encryption and digital signatures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why is RSA secure?

A

Factoring number at least 512 bits is very hard

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

issues with normal RSA

A
  1. deterministic mapping of plaintext -> ciphertext
  2. some characters lik 0, 1, -1 are always the same
  3. malleable on attacker side (can intercept and change ciphertext)

In practice random padding is prefixed to message. This addresses issues listed above

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

Diffie Hellman Key Exchange

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

Why is diffie hellman hard to break?

A

the exponent x is very hard to solve for

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

limitations of diffie hellman

A
  1. expensive exponentiation cycles that present DOS attack vulnerability (attacker requests a bunch of bogus key exchanges)
  2. it cannot be used for anything other than key exchange
  3. no authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Bucket Brigade attack

A

Diffie hellman mand in the middle attack

  1. Party A initiates a session with party B.
  2. Malicious middle man C sends their bogus Ya value to party B, andB thinks he received the real thing.
  3. The malicious actor then sends A his own computed Yb value.
  4. Then the session is in fact between A and C
  5. And session between B and C
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

solution to bucket brigade attack

A

publish Ya and Yb values at a public, trusted site.

or

sign Y values when sending to the other party

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

Alternative to RSA

A

ECC elliptic curve cryptography

(equal security for smaller bit size)

But not as thoroughly vetted as RSA