Title: Aki Nakao
1Public-key Crypto-system
- Aki Nakao
- For Information Processing class at the
University of Tokyo - 2005 Summer
2Shared-key Crypto-system
- Use the same key for encryption/decryption
decryption
encryption
Alice
Bob
Problem Hard to securely distribute a key
3Public-key Crypto-system
- Use different keys for encryption/decryption
encryption (public key)
decryption (private key)
Alice
Bob
- They (Alice, Eve, and others) can only encrypt a
secret - Only I can decrypt the secret
4Email and Digital Signature
Email
encryption (Bs public key)
decryption (Bs private key)
Alice
Bob
Signature (MD message digest)
Encrypted MD (a)
MD (a)
encryption (As private key)
decryption (As public key)
MD (b)
MD (a)
Alice
Bob
Bob compares the decrypted MD (a) and an MD (b)
generated from the received email
5Message Digest
- Message Digest Small data crunched down from the
data by a process called "hashing" - It is not possible to change an MD back into the
original data - A slight change in the original data results in a
significant change in its MD
Hey guys, I have really a cool idea. Lets start
up a company on Monday. My idea is blah .
hashing
HNFmsEm6Un BejhhyCGKOK
e.g. MD5
Signature
Email
6Man-In-the-Middle Attack
- Eve the eavesdropper in the middle
Bobs public-key
Eves public-key
Bobs secret-key
Eves secret-key
Alice
Bob
Eve the eavesdropper
- Eve intercepts Bobs public key and pass her
public key to Alice. - Alice encrypts her message with Eves public
key, thinking that its Bobs. - Eve decrypts Alices message and encrypts it with
Bobs public key. - A fingerprint (a hash value generated from a
public key) defeats this attack
Bobs public-key
2628 487D F786 29C4 A368
(fingerprint)
Hash
7RSA
Pick (d, e) for given prime numbers (p, q)
ed 1 mod n
gcd(e,n)1,
n pq ,
n (p-1)(q-1),
encryption c me mod n
public-key (e, n)
decryption c cd mod n m mod n
private-key (d, n)
xp-1 mod p 1 (for all x lt p) ?Fermats Little
Theorem
x mq-1 mod p ? mn mod p 1
mn mod n 1
mn mod q 1
cd mod n (me mod n)d mod n
med mod n mkn1 mod n m mod n
8Fermats Little Theorem
If p is a prime number, xp-1 mod p 1 , for a
natural numer x lt p
Suppose pxp-x (i.e., p divides xp-x),
(x1)p xp pC1 xp-1 pCp-1 x1
Binomial theorem
(x1)p -(x1) xp -xpC1 xp-1 pCp-1 x
pCi p(p-1)(p-i1)/i ! and p is a prime number,
so ppCi (i lt p)
Therefore, p (x1)p -(x1),
and by induction, pxp-x.
When gcd(x,p)1, xkpm1 for some k, m ?Euclids
k(xp-x) kx(xp-1-1) (1-pm) (xp-1-1)
Since pk(xp-x), pxp-1-1 follows.