Unit 2 - Part 2
Unit 2 - Part 2
An identification scheme is an interactive protocol between the two parties, namely a Prover “P”
and a Verifier “V”. If the protocol is successful, then the Verifier is convinced that it is
interacting with the Prover or more precisely with someone who knows the Secret Key that
corresponds to the Prover’s Public Key.
In Schnorr’s Identification Scheme, the Prover has a Proving Public Key (N, g, X) and a Proving
Secret Key (N, x), where “N” is a prime number for Modulus operation and X is the Secret,
where
X <----- gx mod N
After registering the Secret, the Prover generates a random value “y” and computes Y, as:
Y <----- gy mod N
Now, “Y” is sent to the Verifier. The Verifier then generates a random value “c” and sends it to
the Prover. This acts as a challenge for the Prover to produce the correct result. The Prover now
computes Z, as:
Z <----- (y + x * c) mod N
The Prover sends “Z” to the Verifier to prove that the Prover knows “x”. The Verifier now
computes two values, as:
If Val1 == Val2, it is proved that the Prover knows “x”. This is because
Y * Xc == gy * gx*c == gy + c * x
gZ = gy + c * x
Primality Testing
A Primality Test determines whether a number is prime or not. Primality Tests are categorized as
Deterministic and Probabilistic. Deterministic Tests determine with absolute certainty that a
number is Prime. Probabilistic Tests can potentially identify a composite number as prime.
However, Probabilistic Tests are more fast compared to Deterministic Tests.
Miller – Rabin algorithm is typically used for testing the primality of large numbers.
Conversely, if a2 mod P == 1, then (a mod P)2 == 1, which is TRUE, only for a mod P == 1 or a
mod P == -1.
The second property states that if P is a prime number greater than 2, then using EQ. 1 and let
“a” be any integer in range 1 < a < P – 1, then one of the following two conditions should be
TRUE, i. e.
(ii) One of the elements aq, a2*q, a4*q, ….. is congruent to -1 mod P.
These considerations lead to a conclusion that if “n” is prime, then either the first element in the
list of residues or remainders (aq, a2q, a4q, …..) modulo n == 1 or some element in the list equals
n – 1; otherwise “n” is composite. However, these algorithms are probabilistic and don’t always
conclusively prove that “n” is Prime.
Chinese Remainder Theorem states that it is possible to reconstruct integers in a certain range
from their residue modulo set of pair-wise relatively prime moduli.
Example
x == 2 mod 3
x == 4 mod 5
x == 5 mod 7
Here, a1 = 2, a2 = 4, a3 = 5, m1 = 3, m2 = 5 and m3 = 7.
M = m1 * m2 * m3 = 3 * 5 * 7 = 105
35 * b1 == 1 mod 3
21 * b2 == 1 mod 5
15 * b3 == 1 mod 7
The solutions to these new congruences are b1 = 2, b2 = 1 and b3 = 1. So, now “x” will be given,
as: