We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 19
Private-Key Cryptography
=
=
Public-Key Cryptography
=a = =
=
i also is symmetric, parties are equal
i hence does not protect sender from
traditional private/secret/single key |
cryptography uses one key
shared by both sender and receiver
if this key is disclosed communications
are compromised
receiver forging a message & claiming
is sent by sender
probably most significant advance in the 3
year history of cryptography \
uses two keys — a public & a private key
asymmetric since parties are not equal \
uses clever application of number theoretic | \
concepts to function \
complements rather than replaces private key)
cryptosytemWhy Public-Key Cryptography?
i developed to address two key issues:
i key distribution - how to have secure
communications in general without havin
trust a KDC with your key \
8 digital signatures — how to verify a messag
comes intact from the claimed sender
i public invention due to Whitfield Diffie a
Martin Hellman at Stanford University i in,
1976/1977
i known earlier in classified community
Public-Key Cryptography
i public-key/two-key/asymmetric cryptog rai
involves the use of two keys:
a public-key, which may be known by anybody, end
used to encrypt messages, and verify signatures |
i a private-key, known only to the recipient, used to 4
messages, and sign (create) signatures
is asymmetric because
i those who encrypt messages or verify signatures cann
decrypt messages or create signatures |Public-Key Cryptography
(@) Encryption
Public-Key Characteristics
Public-Key algorithms rely on two keys wt
il it is computationally infeasible to find decrypti
key knowing only algorithm & encryption key |
lit is computationally easy to en/decrypt
messages when the relevant (en/decrypt) key is
known \
either of the two related keys canbe used for |
encryption, with the other used for decryption
some algorithms)Public-Key Cryptosystems
Source A Destination B
Public-Key Applications
| can classify uses into 3 categories’
| encryption/decryption (provide secrec’
i digital signatures (provide authenticatio
| key exchange (of session keys)
i some algorithms are suitable for all u
others are specific to one1 can classify uses into 3 categories!
i encryption/decryption (provide secrec’
i digital signatures (provide authenticatio
| key exchange (of session keys)
i some algorithms are suitable for all us
others are specific to one \
Security of Public Key Schemes
i like private key schemes brute force exhi
search attack is always theoretically poss
but keys used are too large (>512bits)
security relies on a large enough difference
difficulty between easy (en/decrypt) and ha
(cryptanalyse) problems
more generally the hard problem is known, bf
made hard enough to be impractical to break
l requires the use of very large numbers
a hence is slow compared to private key schegfDiffie-Hellman Key Exchange/Ag
Algorithm \
i Diffie Hellman (DH) key exchange algorith
method for securely exchanging cryptograp!
keys over a public communications channel]
i Keys are not actually exchanged — they are!
jointly derived. It is named after their invent
Whitfield Diffie and Martin Hellman (1976
& The beauty of this algorithm is that two pa
who wants to communicate securely ca
on a symmetric key.
Algorithm Steps
Firstly, Ram and Shyam agree on two large prime nt
These two integer need not to be kept secret. Ram,
can use an insecure channel to agree onthem. |
i Ram chooses another large random number x, and C!
such that
A=g*x mod n.
Ram sends the number to Shyam.
Shyam independently chooses another large random
and calculate B such that \
B = g*y mod n.
Shyam sends the number B to Ram.
A now compute the secret key K1:
K1 = B*x modn
B now Compute the secret key K2:
2 = A’y modnExample
& Letn=11 and g=7
i Compute A = g*x mod N
Assume x=3. Then,
A = 743 mod 11 = 343 mod 11 =2
i Ram Sends 2 to Shyam.
i Compute B = g*y mod n
i Assume y=6. Then,
B = 7*6 mod 11 = 117649 mod 11 = 4
i Compute Key K1= B’x mod n
K1 = 443 mod 11 = 64 mod 11 =9
i Compute Key k2 = A‘y mod n
K2 = 246 mod 11 = 64mod 11 =9Advantages
i The sender and receiver don't need,
any prior knowledge of each other. \
i Once the keys are exchanged, the
communication of data can be done,
through an insecure channel.
| The sharing of the secret key is safe
Disadvantages
1 The algorithm can not be used for al
asymmetric key exchange.
1 Similarly, can not be used for signing
digital signatures. \
1 Since it doesn't authenticate any party
the transmission, the Diffie-Hellman ké
exchange is susceptible to a man-in-
| middle attack.The RSA Algorithm
i RSA Algorithm Based on the ide
factorization of integers into the
prime factors Is is hard.
* rompute D
distinct prime n nun |
& RSA AGeTiAI Proposed by Ron |
Rivest, Adi Shamir, and Leonard | \
Adleman \
in 1978
a RSA algorithm is an asymmetri
cryptography algorithm which m
there should be two keys involve
while communicating, i.e., public
and private key.
i Public Key same for all users in th
Network. \
i Private key is the separate key or \ 4
secret key for decryption.RSA Algorithm
« Chooses two primes p,q and
compute n=p.q
& Compute $(n)= (p-1)(q-1)
i Chooses e with 1 1024 bits. i
even 2048 bits long key are used.
w
ws
On the processing speed front, Elgamal is q
RSA and ElGamal Schemes - A
Comparison
RSA ElGamal
Itis more efficient for encryption. Itis more efficient for decryptiol
It is less efficient for decryption. Itis more efficient for decryption
For a particular security level, lengthy For the same level of security, v
keys are required in RSA. short keys are required.
Itis widely accepted and used. Itis new and not very popular ir