Formulae Flashcards

1
Q

How to initialize an RSA ?

A

— choose p, q prime numbers
— compute n = p×q and z = (p-1)×(q-1)
— choose an integer e such that 1<e<z and e, z share no other divisor than 1
— find d such that e×d - 1 mod z = 0

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

xy mod p = ?
(Useful modulo trick)

A

xy mod p = [(x mod p)(y mod p)] mod p

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

Outline the parameters of Diffie-Hellman

A

Xa, Xb = private keys
Ya, Yb = public keys
Kab = shared secret key

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

How to initialize a Diffie-Hellman (starting from alpha, q) ?

A

Each peer chooses their private key (Xa, Xb)
Ya = alphaXa mod q
Yb = alphaXb mod q
Kab = alphaXa×Xb mod q = YaXb mod q = YbXa mod q

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

How to define and use a Hill cipher ?

A

Define K, square matrix n × n
q prime number
P = message, or a chunk of the message of length n
C = K × P mod q (as many times as needed to cover all the chunks of the original message)

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

How to cipher using RSA ?

A

C = Me mod n

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

How to decipher using RSA ?

A

M = Cd mod n

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