You are on page 1of 11

SYMMETRIC ENCRYPTION AND ASYMMETRIC ENCRYPTION

PRINCIPLES OF PUBLIC-KEY CRYPTOSYSTEMS


— The concept of public-key cryptography evolved from an attempt to attack two of the
most difficult problems associated with symmetric encryption:
— Key distribution:
o How to have secure communications in general without having to trust a KDC
with your key
— Digital signatures:
o How to verify that a message comes intact from the claimed sender
— Whitfield Diffie and Martin Hellman from Stanford University achieved a breakthrough
in 1976 by coming up with a method that addressed both problems and was radically
different from all previous approaches to cryptography
APPLICATIONS FOR PUBLIC-KEY CRYPTOSYSTEMS
— Public-key cryptosystems can be classified into three categories
— Some algorithms are suitable for all three applications, whereas others can be used only
for one or two
o Encryption/decryption: The sender encrypts a message with the recipient’s
public key
o Digital signature: The sender “signs” a message with its private key
o Key exchange: Two sides cooperate to exchange a session key

PUBLIC-KEY REQUIREMENTS
— For the two parties
o It is computationally easy for a party B to generate a pair (public-key PUb,
private key PRb)
o It is computationally easy for a sender A, knowing the public key and the
message to be encrypted, to generate the corresponding ciphertext
o It is computationally easy for the receiver B to decrypt the resulting ciphertext
using the private key to recover the original message
— For the adversary
o It is computationally infeasible for an adversary, knowing the public key, to
determine the private key
o It is computationally infeasible for an adversary, knowing the public key and a
ciphertext, to recover the original message
— The two keys can be applied in either order
DIFFIE-HELLMAN KEY EXCHANGE
— First published public-key algorithm
— A number of commercial products employ this key exchange technique
— Purpose is to enable two users to securely exchange a key that can then be used for
subsequent symmetric encryption of messages
— The algorithm itself is limited to the exchange of secret values
— Its effectiveness depends on the difficulty of computing discrete logarithms
— Vulnerable to Man-in-the-Middle-Attack
o Authentication of the keys is needed
DISCRETE LOGARITHMS

— A primitive root of a prime number p is one whose powers modulo p generate all the
integers from 1 to p – 1
o i.e., a mod p , a2 mod p , . . . , ap-1 mod p
— are distinct and consist of the integers from 1 through p-1 in some permutation
o For any integer b and a primitive root a of prime number p , we can find a
unique exponent i such that b = ai (mod p ) where 0 ≤ i ≤ (p - 1)
o We express this value as dloga,p (b) i.e., the discrete logarithm of b for the base
a, mod p
 i.e., the discrete logarithm of b for the base a, mod p

RIVEST-SHAMIR-ADLEMAN (RSA) SCHEME


— Developed in 1977 at MIT by Ron Rivest, Adi Shamir & Len Adleman
— Most widely used general-purpose approach to public-key encryption
— Is a cipher in which the plaintext and ciphertext are integers
o between 0 and n – 1 for some n
— A typical size for n is 1024 bits, or 309 decimal digits
RSA ALGORITHM
— RSA makes use of an expression with exponentials
— Plaintext is encrypted in blocks with each block having a binary value less than some
number n
— Encryption and decryption are of the following form, for some plaintext block M and
ciphertext block C

— Both sender and receiver must know the value of n


— The sender knows the value of e, and only the receiver knows the value of d
— This is a public-key encryption algorithm with a public key of PU={e,n} and a private
key of PR={d,n}

ALGORITHM REQUIREMENTS
— For this algorithm to be satisfactory for public-key encryption, the following
requirements must be met:

PRIME NUMBERS
FERMAT’S LITTLE THEOREM

EULER’S TOTIENT FUNCTION ø (n)

EULER’S THEOREM
RSA ALGORITHM
EXAMPLE OF RSA ALGORITHM

RSA PROCESSING OF MULTIPLE BLOCKS


EXPONENTIATION IN MODULAR ARITHMETIC

EFFICENT OPERATION USING THE PUBLIC KEY


EFFICENT OPERATION USING THE PRIVATE KEY

KEY GENERATION

MILLER-RABIN ALGORITHM

PROCEDURE FOR PICKING A PRIME NUMBER


THE SECURITY OF RSA

MISCONCEPTIONS CONCERNING PUBLIC-KEY ENCRYPTION

You might also like