Introduction Lecture13-14 - Slides PDF
Introduction Lecture13-14 - Slides PDF
Thomas Johansson
Assume that n users are connected in a network and any two of them
may want to communicate
This would require each user to securely store n 1 different
symmetric keys (one for each other user), resulting in a total of
n(n 1)/2 keys.
If the network is connecting 2000 university students, then there will
be roughly 2 million different keys.
A huge key management problem with questions like; How do you add
add a new user to the system? What if a users key is compromised?
How long should a key be considered valid and how should we refresh
them?
Informal definition.
Definition
A one-way function f (x) is a function from a set X to a set Y such that
f (x) is easy to compute for all x X , but for essentially all elements
y Y it is computationally infeasible to find any x X such that
f (x) = y.
Definition
A trapdoor one-way function f (x) is a one-way function f : X 7 Y such
that if one knows some specific information T , called the trapdoor
information, then f (x) is computationally easy to invert f , i.e., for any
y Y it is easy to find a x X such that f (x) = y. For anyone without
knowledge of the trapdoor information T , f (x) is a one-way function.
The RSA-200 number n above was factored in 2003 and the factors are
3532461934402770121272604978198464368671197400197625023649303468776121253679423200058547956528088
and
7925869954478333033347085841480059687737975857364219960734330341455767872818152135381409304740185
Definition
A public-key encryption scheme is a set of encryption transformations
{Ee : e K} and a set of decryption transformations {Dd : d K}. For
each e K there is a corresponding d K such that Dd (Ee (M )) = M ,
M . Furthermore, after choosing such a pair (e, d), the public key e (or the
public parameter) is made public, while the associated secret key d is kept
secret. For the scheme to be secure, it must be computationally infeasible
to compute d as well as computing Ee1 (C), knowing the public value e.
Definition
The RSA public-key encryption scheme works as follows. Let n = pq,
where p and q are two large primes. Let M = C = Zn . Pick a number e
relatively prime to (n) and calculate a number d such that
ed = 1 mod (n). The public key is the two numbers (n, e) and the
(public) encryption transformation E(M ) is
E(M ) = M e mod n.
The secret key is the number d (as well as p, q and (n)) and the secret
decryption transformation D(C) is
D(C) = C d mod n.
D(C) = C d = (M e )d = M ed mod n.
Now we note that ed = 1 mod (n), which means that we can write
ed = 1 + t (n),
Anyone with access to our public key can now send us an encrypted
message M Z7849 , by calculating
C = M e mod n.
M = C d = 24012749 mod n
M e mod n.
27282 = 7441984,
then computing
7441984 mod 7849 = 1132.
Continuing,
1132 2728 = 3088096
and finally
3088096 mod 7849 = 3439.
So 27283 mod 7849 = 3439.
e = e0 + e1 2 + e2 22 + + eL1 2L1 ,
M 2 , M 4 = (M 2 )2 , M 8 = (M 4 )2 , . . . ,
am1 = 1 mod m,
The error probability after repeating the test k time would then be less
than 1/2k .
A composite m such that am1 = 1 mod m is said to be a pseudo-prime
to the base a.
If a composite m is such that it is a pseudo-prime for every base a with
gcd(a, m) = 1, the the number is called a Carmichael number.
The smallest Carmichael number is 561.
One can prove that P (m probably prime|m not prime) < 1/4.
p 1 = q1 q2 qk ,
p = gcd(a 1, n).
(p 1)|B!.
We compute a = 2B! mod n. Now let a0 = 2B! mod p. Since p|n we must
have a mod p = a0 . Fermats little theorem states that
2p1 = 1 mod p
The primes p and q must then be chosen such that p 1 and q 1 each
contains a large prime in their factorisation.
A usual approach is to generate a random bprime p1 and then test whether
p = 2p1 + 1 is a prime number. If so, we choose p.
All users have a trusted copy of the public key of the CA. For example,
embedded in your browser when you buy your computer.
The CA sign data strings containing the following information
allows two parties to agree a secret key over an insecure channel without
having met before.
G = Fp and g Fp
The basic message flows for the Diffie Hellman protocol
Message m for signing, we first compute h(m) and then apply the RSA
signing transform to h(m), i.e.
s = h(m)d mod N.
h0 = se mod N.
Adversarial goals: