Number Theory Flashcards

1
Q

What are the benefits of number theory?

A
  1. Key Exchange & Secure Channels to establish a secure channel against eavesdropping.
  2. Public-key Encryption to encrypt a message with public key.
  3. Digital Signatures to sign a message electronically
  4. Zero-knowledge. Proofs of Knowledge to prove knowledge of a secret without disclosing the secret
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a ring group? Which properties establish that Zm forms a ring group?

A

A ring group is a set of numbers which addition and multiplication are well behaved

Properties:
Addition and multiplication is closed, commutative, associative, 0 is an additive identity, 1 is a multiplicative property. Additive inverse of any a in Zm is m-a, the distributive property

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

What is an abelian group? What properties establish that Zm forms an abelian group?

A

An abelian group is a groupin which the result of applying thegroup operationto two group elements does not depend on the order in which they are written.

Properties:
Addition is closed, commutative, associative, 0 is an additive identity, Additive inverse of any a in Zm is m-a

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

17 in Z_{12} is?

A

5

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

33(mod 13) is?

A

7

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

6 + 13 (mod 7) is?

A

5

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

-6 . 15 (mod 7) is?

A

1

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

gcd(18,24), gcd(12,32)

A

6, 4

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

Whats the formula for Bezouts identity? what is it used for?

A

For all non-zero x,y in Z, there exists a,b in Z, such that a.x + b.y = gcd(x,y)

used for computing multiplicative inverses

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

what can we use the euclidean algorithm to compute and whats the formula?

A
  • computing gcd
  • Key observation:Compute q =[x/y] w/ remainder r=x mod y

= y.q +r

If d divides both y and r; then it also divides x.
If d divides both × and y, then it also divides r.

            gcd(x,y) = gcd(y,r) so basically (y, x mod y) until y is zero
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the steps to compute extended euclidean algorithm?

A
  1. Compute gcd(x,y)
  2. Store all intermediary states d_i = x_i a_i + y_i b_i
  3. Backtrack; substitute for the remainders d_i
    - Write as linear combination of x and y which is ax + by = gcd(x,y)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Whats the extended euclidean algorithm for gcd(1776, 987)?

A

3 = (-5)1776 + 9(987)

sagemath: xgcd(1776,987) : (3, -5, 9)

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

Whats the formula for multiplicative modular inverse?

A

x.y -= 1 (mod N)

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

5^(-1) in Z_17?

A

y = 7
sagemath: xgcd(5 , 17) : (1, 7, -2)

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

How do we know if x has a multiplicative inverse modulo N?

A

if gcd(x, N) = 1

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

How do you compute modular inverses using the extended euclidean algorithm?

A

ax + bN = 1 = gcd(x, N)

16
Q

What does it mean for two numbers to be coprime?

A

Two numbers are coprime if their greatest common divisor (gcd) is 1. In other words, x is invertible in Z N if gcd(x,N)=1

17
Q

What is a cyclic group? give an example of a cyclic group

A

A cyclic group is a type of group that can be generated b) repeatedly applying the group operation (g) to a single element, known as a generator. The elements of the group are the powers of g up to g^(p-2), which will generate all the elements of (Zp)* when p is prime.

18
Q

Which statements are equivalent for a congruence modulo N?
→ a = b + kN for some k
→ a = b (mod N)
→ (b-a) | N
→ N | (a-b)

A

→ a = b + kN for some k
→ a = b (mod N)
→ N | (a-b)

19
Q

Which of the following congruences are fulfilled?
→ 13 = 27 (mod 37)

→ 11 = 49 (mod 39)

→ -11 = 28 (mod 39)

→ 13 = 124 (mod 37)

A

→ -11 = 28 (mod 39)

→ 13 = 124 (mod 37)

20
Q

What is the greatest common divisor gcd(7302, 9354)?

A

6

21
Q

True or false: Two numbers x and y are coprime if and only if the gcd(x, y) = 1.

A

true

22
Q

When does a multiplicative inverse of an integer x exist modulo N?
-> When gcd(x, N) = 1.
-> When x and modulus N are coprime.
-> When N is divisible by x.
-> When x > N.

A

→ When gcd(x, N) = 1.
→ When x and modulus N are coprime

It’s important to realize that coprimality between x and a modulus N is a necessary and sufficient criterion for the multiplicative inverse of x under modulus N to exist.

23
Q

What is the multiplicative inverse of x=17 modulo 231

A

68
sagemath xgcd(17, 231) is (1, 68, -5)

24
Q

What properties do we expect from a key exchange between two parties Alice and Bob?
The session key K is indistinguishable from a random number.
The session K is completely unguessable by an adversary.
The adversary cannot compute the session key from the transcript.
An adversary cannot impersonate Alice or Bob in the key exchange.
Both Alice and Bob obtain the same session key K.

A

→ The session key K is indistinguishable from a random number. ✅

→The session K is completely unguessable by an adversary. ✅

→ An adversary cannot impersonate Alice or Bob in the key exchange. ❌

While this would be desirable, the standard definitions of key exchange do not exclude man-in-the-middle attacks.

→ The adversary cannot compute the session key from the transcript. ✅

→ Both Alice and Bob obtain the same session key K. ✅

25
Q

Consider two parties Alice and Bob attempting a Diffie-Hellman key exchange in a group setup with p = 1013 and g = 3. Alice chooses her secret a randomly as a=924. Bob chooses his secret b randomly as b=405. What is the joint session key K?

A

The correct transcript is developed as follows:

A = g^a = 3^924 (mod 1013) = 92 - Public key of Alice

B = g^b = 3^405 (mod 1013) = 693 - Public key of Bob

K = A^b = 92^405 = 253 = 693^924 = B^a (all mod 1013)

sagemath:
A = (3^924) % 1013
B = (3^405) % 1013
session_key1 = A^405 % 1013
session_key2 = B^924 % 1013
print(“A: “, A)
print(“B: “, B)
print(session_key1)
print(session_key2)