Professional Documents
Culture Documents
COM
Q.1 What is Abelian Group? List the axioms should obey for Abelian Group.
Ans. Let (G, *) be a group. If a, b belongs to G and a * b = b * a, then the group is said to be
Abelian or commutative group. The following axioms are obeyed for Abelian Group.
(A1) Closure
(A2) Associative
(A3) Identity element
(A4) Inverse element and
(A5) Commutative
Ans. A ring R, sometimes denoted by {R,+, },is a set of elements with two binary operations,
called addition and multiplication, such that for all a, b, c in R the following axioms are obeyed.
(A1-A5) R is an Abelian group
(M1) Closure under multiplication
(M2) Associativity of multiplication
(M3) Distributive law
(M4) Commutative of multiplication
(M5) Multiplicative identity
(M6) No zero divisors
Ans. A field F, sometimes denoted by {F,+, }, is a set of elements with two binary operations,
called addition and multiplication, such that for all a, b, c in F the following axioms are obeyed.
(A1-A6) and (M1-M6) F is a Ring for Integral Domain
(M7) Multiplicative inverse
Ans.Euler’s theorem states that for every a and n that are relatively prime.
aΦ(n)≡ 1 (mod n)
Where ϕ(n) is a totient function
Ans.Fermat’s theorem states the following. If p is prime and a is a positive integer not divisible
by p, then ap-1 ≡ 1 (mod p).
Example: a=3, p =5
35 = 243 mod 5=3 mod 5 =3
It was invented by whitfield Diffie and Martin Hellman in 1976. Sometimes this
cryptography also called as Diffie-Helman Encryption.
Public key algorithms are based on mathematical problems which admit no efficient
solution that are inherent in certain integer factorization, discrete logarithm and
Elliptic curve relations.
The concept of public key cryptography in invented for two most difficult problems of
Symmetric key encryption.
1.The Key Exchange Problem: The key exchange problem arises from the fact that
communicating parties must somehow share a secret key before any secure communication can
be initiated, and both parties must then ensure that the key remains secret. Of course, direct key
exchange is not always feasible due to risk, inconvenience, and cost factors.
2. The Trust Problem: Ensuring the integrity of received data and verifying the identity of the
source of that data can be very important. Means in the symmetric key cryptography system,
receiver doesn’t know whether the message is coming for particular sender.
Ans.
RSA example:
1. Select primes: p=17 & q=11
2. Compute n = pq =17×11=187
3. Compute ø(n)=(p–1)(q-1)=16×10=160
4. Select e : gcd (e,160)=1; choose e=7
5. Determine d:
d ≡ e-1 mod ø(n)
d ≡ 7-1 mod 160 = 23 (Using EEA)
6. Publish public key KU={7,187}
7. Private key KR={23,187}
Given message M = 88
Encryption:
C = 887 mod 187 = 11
Q.10 Using RSA algorithm solve: let p= 17, q=11, e=7 and d=23. Calculate the public key
& private key and show encryption and decryption for plain text M= 88 by using RSA
algorithm.
Q A1 A2 A3 B1 B2 B3
1 0 160 0 1 17
9 0 1 17 1 -9 7
2 1 -9 7 -2 19 3
2 -2 19 3 5 -47 1
C=
Q.11 Perform encryption and decryption using RSA Algorithm for the following.
I P=7; Q=11; e= l3; M=2.
Q A1 A2 A3 B1 B2 B3
1 0 ϕ(n)=60 0 1 e=13
4 0 1 13 1 -4 8
1 1 -4 8 -1 5 5
1 -1 5 5 2 -9 3
1 2 -9 3 -3 14 2
1 -3 14 2 5 -23 1
Xi y= 1 a= M=2
1 2 4
0 2 16
1 32 16
1 30
Ans.The Security of RSA :Four possible approaches to attacking the RSA algorithm are
Example :
Q.14 Using Diffie Hellman key exchange method. Let q = 353, α=3, XA= 97 and XB = 233.
Then Compute YA,YB,KA& KB using Diffie Hellman.
Ans.
Q.15 The two entities A and B use the Diffie-Hellman primitive root α= 13 .
I. If user A private key 5 what is A’s public key?
II. If user B private key 12 what is B’s public.
III. What is shared key?
Ans.
Step 3. Divide the remainder from the step 1 by the remainder from the step 2:
904 ÷ 162 = 5 + 94;
Step 4. Divide the remainder from the step 2 by the remainder from the step 3:
162 ÷ 94 = 1 + 68;
Step 5. Divide the remainder from the step 3 by the remainder from the step 4:
94 ÷ 68 = 1 + 26;
Step 6. Divide the remainder from the step 4 by the remainder from the step 5:
68 ÷ 26 = 2 + 16;
Step 7. Divide the remainder from the step 5 by the remainder from the step 6:
26 ÷ 16 = 1 + 10;
Step 8. Divide the remainder from the step 6 by the remainder from the step 7:
16 ÷ 10 = 1 + 6;
Step 9. Divide the remainder from the step 7 by the remainder from the step 8:
10 ÷ 6 = 1 + 4;
Step 10. Divide the remainder from the step 8 by the remainder from the step 9:
6 ÷ 4 = 1 + 2;
Step 11. Divide the remainder from the step 9 by the remainder from the step 10:
4 ÷ 2 = 2 + 0;
At this step, the remainder is zero, so we stop: 2 is the number we were looking for, the last
remainder that is not zero. This is the greatest common factor (divisor).Greatest (highest)
common factor (divisor)gcf, gcd (1,970; 1,066) = 2;
Ans. ø(n)is the number of positive integers less than n and relatively prime to n. Consists of
reduced set of residues, those that are numbers (residues) which are relatively prime to n
Determine ø(21)
ø(21) = ø(3) * ø(7)
= (3-1) (7-1)
=2 * 6
=12
Ans.
n 1 2 3 4 5 6 7 8 9 10
φ(n) 1 1 2 2 4 2 6 4 6 4
n 11 12 13 14 15 16 17 18 19 20
φ(n) 10 4 12 6 8 8 16 6 18 8
Eg:
TEST (29)
1. n-1 29-1 =28
k, q = 2kq 2,7 = 22 (7)
2. If a =10
3. 107 mod 29 =17
4. (107 )2 mod 29 = 28
If a =2
2. 27 mod 29 =12
3. (27 )2 mod 29 = 28
Ans. Primitive root of a prime number p is the one whose powers generate all the integers from
1 to p-1.
Q.23 What do you understand by Chinese Remainder Theorem? Solve the following
congruent equations by Chinese remainder theorem:
i. X ≡ 2 mod 3
ii. X ≡ 3 mod 5
ii. X ≡ 2 mod7
Ans.
Q.24 Explain Finite field of the form GF (p) & GF (2n ) with suitable example.
Ans. Finite fields play a key role in cryptography. It can show number of elements in a finite
field must be a power of a prime pn and it is known as Galois fields, denoted GF(pn).
GF(p) is the set of integers {0,1, … , p-1} with arithmetic operations modulo prime p ,these form
a finite field
since have multiplicative inverses
find inverse with Extended Euclidean algorithm
Hence arithmetic is “well-behaved” and can do addition, subtraction, multiplication, and division
without leaving the field GF(p).
RUCHI KHETAN
ASST PROFESSOR CSE DEPTT
2018-19 [ KRISHNA INSTITUTE OF TECHNOLOGY]
Ans. Polynomial arithmetic over a field and integer arithmetic by defining the greatest common
divisor as follows. The polynomial c(x) is said to be the greatest common divisor of a(x) and b(x)
if the following are true.
An equivalent definition is the following: gcd[a(x), b(x)] is the polynomial of maximum degree
that divides both a(x) and b(x).
RUCHI KHETAN
ASST PROFESSOR CSE DEPTT
2018-19 [ KRISHNA INSTITUTE OF TECHNOLOGY]
EXTENDED EUCLID(m, b)
1. (A1, A2, A3)=(1, 0, m);
(B1, B2, B3)=(0, 1, b)
2. if B3 = 0
return A3 = gcd(m, b); no inverse
3. if B3 = 1
return B3 = gcd(m, b); B2 = b–1 mod m
4. Q = A3 div B3
5. (T1, T2, T3)=(A1 – Q B1, A2 – Q B2, A3 – Q B3)
6. (A1, A2, A3)=(B1, B2, B3)
7. (B1, B2, B3)=(T1, T2, T3)
8. goto 2
Q.27
Ans. If the modulus g(x) is an irreducible polynomial of degree m over GF(p), then the finite
field GF(pm) can be constructed by the set of polynomials over GF(p) whose degree is at most m-
1, where addition and multiplication are done modulo g(x).
For example, the finite field GF(32) can be constructed as the set of polynomials whose degrees
are at most 1, with addition and multiplication done modulo the irreducible polynomial x 2+1
(you can also choose another modulus, as long as it is irreducible and has degree 2).
RUCHI KHETAN
ASST PROFESSOR CSE DEPTT
2018-19 [ KRISHNA INSTITUTE OF TECHNOLOGY]
0 0 0 0 0 0 0 0 0 0
RUCHI KHETAN
ASST PROFESSOR CSE DEPTT
2018-19 [ KRISHNA INSTITUTE OF TECHNOLOGY]
RUCHI KHETAN
ASST PROFESSOR CSE DEPTT