Presentation On Public Key Cryptography
Presentation On Public Key Cryptography
Presentation On Public Key Cryptography
Public-key cryptography 1
IV054 Basic idea - example
Analogy:
Secret-key cryptography 1. Put the message into a box, lock it with a padlock and
send the box. 2. Send the key by a secure channel.
Public-key cryptography Open padlocks, for each user different one, are freely
available. Only legitimate user has key from his padlocks. Transmission: Put the
message into the box of the intended receiver, close the padlock and send the box.
Public-key cryptography 2
IV054 Public Establishment of Secret Keys
Public-key cryptography 3
IV054 MAN-IN-THE-MIDDLE ATTACK
5. When Alice sends a message to Bob, encrypted with KA, Eve intercepts it,
decrypts it, then encrypts it with KB and sends it to Bob.
6. Bob decrypts the message with KB and obtains the message. At this point he
has no reason to think that communication was insecure.
7. Meanwhile, Eve enjoys reading Alice's message.
Public-key cryptography 4
IV054 Blom's key pre-distribution protocol
Public-key cryptography 5
IV054 Secure communication with secret-key cryptosystems
Communication protocol
with which Alice can send a message w to Bob.
1. Alice sends eA (w) to Bob
2. Bob sends eB (eA (w)) to Alice
3. Alice sends dA (eB (eA (w))) = eB (w) to Bob
4. Bob performs the decryption to get dB (eB (w)) = w.
Disadvantage: 3 communications are needed (in such a context 3 is a much too
large number) .
Advantage: A perfect protocol for distribution of secret keys.
Public-key cryptography 6
IV054 Cryptography and Computational Complexity
Modern cryptography uses such encryption methods that no ``enemy'' can have
enough computational power and time to do encryption (even those capable to use
thousands of supercomputers for tens of years for encryption).
Modern cryptography is based on negative and positive results of complexity
theory - on the fact that for some algorithm problems no efficient algorithm seem to
exists, surprisingly, and for some of “small'' modifications of these problems,
surprisingly, simple, fast and good enough (randomized) algorithms do exist.
There is a list of ”most wanted to factor integers''. Top current successes, using
thousands of computers for months.
(*) Factorization of 2 2^9 + 1 with 155 digits (1996)
(**) Factorization of a “typical'' 155-digits integer (1999)
Public-key cryptography 7
IV054 Cryptography and Computational Complexity
Public-key cryptography 8
IV054 One-way functions
Informally, a function F:N -> N is said to be one-way function if it is easily
computable - in polynomial time - but any computation of its inverse is infeasible.
A one-way permutation is a 1-1 one-way function.
easy
x f(x)
computation infeasible
A more formal approach
Definition A function f:{0,1}* {0,1}* is called a strongly one-way function if the
following conditions are satisfied:
1. f can be computed in polynomial time;
2. there are c, e > 0 such that |x|e |f(x)| |x|c;
3. for every randomized polynomial time algorithm A, and any constant c > 0,
there exists an nc such that for n > nc
Pr A f x f 1 f x
1
nc
.
The key concept for design of public-key cryptosystems is that of trapdoor one-
way functions.
A function f :X Y is trapdoor one-way function
• if f and its inverse can be computed efficiently,
• yet even the complete knowledge of the algorithm to compute f does not
make it feasible to determine a polynomial time algorithm to compute inverse
of f.
A candidate: modular squaring with a fixed modulus.
- computation of discrete square roots is unfeasible in general, but quite easy if the
decomposition of the modulus into primes is known.
One way to design a trapdoor one-way function is to transform an easy case of a
hard (one-way) function to a hard-looking case of such a function, that can be,
however, solved easily by those knowing how the above transformation was
performed.
Public-key cryptography 10
IV054 Example - Computer passwords
The idea is that BUSH is a “public'' password and CLINTON is the only one
that knows a “secret'' password, say MADONA, such that
f c(MADONA) = BUSH
Public-key cryptography 11
LAMPORT’s ONE-TIME PASSWORDS
Public-key cryptography 12
IV054 General knapsack problem - unfeasible
Public-key cryptography 14
IV054 Another view of the knapsack problem
Example A0 = (43,129,215,473,903,302,561,1165,697,1523)
fA0(364) = fA0 (0101101100) = 129 + 473 + 903 + 561 + 1165 = 3231
Example X = (1,2,4,9,18,35,75,151,302,606)
m = 1250, u = 41
X‘ = (41,82,164,369,738,185,575,1191,1132,1096)
In order to encrypt an English plaintext, we first encode its letters by 5-bit numbers
_ - 00000, A - 00001, B - 00010,… and then divide the resulting binary strings into
blocks of length 10.
Plaintext: Encoding of AFRICA results in vectors
w1 = (0000100110) w2 = (1001001001) w3 = (0001100001)
Encryption: c1’ = X'w1 = 3061 c2’ = X'w2 = 2081 c3’ = X‘w3 = 2203
Cryptotext: (3061,2081,2203)
Decryption of cryptotexts: (2163, 2116, 1870, 3599)
By multiplying with u –1 = 61 (mod 1250) we get new cryptotexts (several new c’)
(693, 326, 320, 789)
and in the binary form solutions B of equations XBT=c’ have the form
(1101001001, 0110100010, 0000100010, 1011100101)
that is the resulting plaintext is:
ZIMBABWE
Public-key cryptography 17
IV054 Story of the Knapsack
Basic ideas of Shamir's polynomial time algorithm (in the length of the knapsack
vector) to break knapsack cryptosystems.
Assumption: there is a d > 1 such that modulus m has [dn] bits and elements a i,
1in, of a superincreasing vector, have [dn] – 1 – n + i bits.
n
(This implies that A is a superincreasing vector and m a)
i 1 i .
(Original suggestion: d = 2,n = 100.)
Key observation: Given a knapsack vector B, which was obtained from a super-
increasing vector A through a strong modular multiplication using m and u, it is not
important for successful cryptoanalysis to find original A, m, u. It is enough to find a
pair (m‘ ,u') such that (1) the vector A' obtained is superincreasing
(2) m' ai , t u 1 mod m' m, gcd m' , t 1
Such a pair is called a trapdoor pair.
m
To find a trapdoor pair one can proceed as follows: bix
One consider functions b ix mod m,1 i n
Minimums are in points (discontinuation points)
jm
, jN
bi m/bi m x
sawtooth curves
Public-key cryptography 19
IV054 Breaking knapsack
The first problem is that also m is unknown. This is easy to deal with.
We reduce the size of figures for bi-graphs so m becomes 1. This does not change
which of the minima are close to another.
One problem is that the first stage may produce too many candidates.
To deal with this problem an integer r is fixed in advance and if the first stage
produces more than r candidates the algorithm terminates and reports failure.
Public-key cryptography 21
IV054 KNAPSACK CRYPTOSYSTEM - COMMENTS
Given n items with weights w1, w2,…, wn and values v1, v2,…, vn and a knapsack
limit c, the task is to find a bit vector (b1, b2,…, bn) such that i 1 bi wi c
n
The term subset problem is usually used for the problem used in our construction
of the knapsack cryptosystem. It is well-known that the decision version of this
problem is NP-complete.
Sometimes, for our main version of the knapsack problem the term Merkle-
Hellmman (Knapsack) Cryptosystem is used.
Public-key cryptography 22
IV054 McEliece Cryptosystem
Public-key cryptography 23
IV054 McEliece Cryptosystem - DESIGN
Public-key cryptography 24
IV054 COMMENTS on McELIECE CRYPTOSYSTEM
1. Each irreducible polynomial over Z2m of degree t generates a Goppa code with
distance at least 2t + 1.
2. In the design of McEliece cryptosystem the goal of matrices S and C is to modify
a generator matrix G for an easy-to-decode Goppa code to get a matrix that looks
as a general random matrix for a linear code for which decoding problem is NP-
complete.
3. An important novel and unique trick is an introduction, in the encoding process,
of a random vector e that represents an introduction of up to t errors - such a
number of errors that are correctable using the given Goppa code and this is the
basic trick of the decoding process.
4. Since P is a permutation matrix eP -1 has the same weight as e.
5. As already mentioned, McEliece suggested to use a Goppa code with m=10 and
t=50. This provides a [1024, 524, 101]-code. Each plaintext is then a 524-bit string,
each cryptotext is a 1024-bit string. The public key is an 524 × 1024 matrix.
6. Observe that the number of potential matrices S and P is so large that
probability of guessing these matrices is smaller that probability of guessing correct
plaintext!!!
7. It can be shown that it is not safe to encrypt twice the same plaintext with the
same public key (and different error vectors).
Public-key cryptography 25
IV054 FINAL COMMENTS
Public-key cryptography 26
IV054 SATELLITE VERSION of ONE-TIME PAD
If Alice wants to send a message to Bob they first agree, using a public key
cryptography, on a method of sampling bits from the satellite outputs.
Alice and Bob use this method to generate a random key and they use it with
ONE-TIME PAD for encryption.
By the time Eve decrypted their public key communications, random streams
produced by the satellite and used by Alice and Bob to get the secret key
have disappeared, and therefore there is no way for Eve to make decryption.
The point is that satellites produce so large amount of date that Eve cannot
store all of them
Public-key cryptography 27
IV054 Digital signatures
Digital signatures are one of the most important inventions of modern cryptography.
The problem is how can a user sign a message such that everybody (or the
intended addressee only) can verify the digital signature and the signature is good
enough also for legal purposes.
If only signature (but not the encryption of the message) are of importance, then it
suffices that Alice sends to Bob
(w, dA(w))
Caution: Signing a message w by A for B by
eB(dA(w))
is O.K., bat the symmetric solution with encoding was
c = dA(eB(w))
is not good.
An active enemy, the tamperer, can intercept the message, then compute
dT(eB(c)) = dT(eA(w))
and send it to Alice, pretending it is from him (without being able to decrypt the
message).
Any public-key cryptosystem in which the plaintext and cryptotext are the same can
be used for digital signature.
Digital signatures
The main difference from a handwritten signature is that digital signature of a
message is intimately connected with the message whereas the handwritten
signature is adjoined to the message and always look the same.
Public-key cryptography 29