Sie sind auf Seite 1von 8

Chapter 10: other

public key
cryptosystem

Definitions
A primitive root of a prime number p as one whose powers modulo
generate all the integers from 1 to p-1. (its generation number)

For any integer and a primitive root a of prime number , we can find a
unique exponent i such that
Example:
6 is a primitive root of 13
1

10

12

11

Definitions
Adiscrete logarithmis an integerksolving the equationbk=g,
wherebandgare elements of a finitegroup (remember from ch. 4)
Example: Find i in the following equation:

In small domain this can be done by trial and error.


As the number gets Larger, finding i becomes NP-problem
Opposite to ordinarylogarithms where it can be found using ln (log)
functions

6i i = log(12)/ log(6) 1.3869 = 12

Diffie-Hellman Key Exchange


It is used to exchange session keys
Initially Publicly known (shared by all parties) :
q : large prime number
a : primitive root of q

choose private keys XA and XB


Each One create its own Public key from private one as following

(public key of A)
(public key of B)

Create shared key KAB by raising the power of the other using its own private key
A : KAB =
B : KAB =

Now both A and B share the same key without knowing each other private key.

Diffie-Hellman Key Exchange


Challenge: To uncover the private key or shared key, we need to solve
discrete logarithm problem which is NP
Attack : Man in the Middle
If an attacker D can masquerade the public key of A & B
then A & B can be both talking to D not to each other

Steps:
D creates its own set of private and public Keys: XAD , XBD , YAD and YBD
D sends YAD to B as A-public key and sends YBD to A as B-public key
Now each of A & B creates the shared Key with D, however they are thinking that
they are talking to each other.

ElGamal Cryptography
Public-key cryptosystem related to D-H
Main difference: ElGamal is used to share Messages as well as
Keys
Challenge:
To uncover the private key or shared , we need to solve discrete
logarithm problem which is NP
It uses a random number each time to hide the message pattern using
Original key.

ElGamal Cryptography

Creating initial Keys

A chooses private key XA < q


A publish { a , q , YA} as its public key where
q : large prime number
a : primitive root of q

Message Exchange (B wants to send to A)


.

ElGamal Cryptography
Message Exchange (B wants to send message M to A)
Generate random number k

(1 k q-1)

Compute one-time key


Send : B Encrypt M as a pair of integers (C1,C2) where
;

Receive: A decrypts (C1,C2) pairs as the following


recovering key = =
computing message

A unique k must be used each time otherwise result is insecure.

Das könnte Ihnen auch gefallen