rsa by tangshuming


									RSA Implementation
          Mahdi Monhi
          Mansur Nurani
What is Encryption ?

   Encryption is the transformation of
    data into a form that is as close to
    impossible as possible to read
    without the appropriate knowledge
Why is cryptography important?

   Cryptography on the Internet
    – online banking, online trading, and make online purchases

   Authentication
    – Authentication is any process through which one proves and
      verifies certain information

   Access Control
    – Such as in file systems
What are the more popular
techniques in cryptography ?

   secret-key

   public-key
Secret Key
 Also referred to as symmetric
 The same key is used for both
  encryption and decryption
 The most popular secret-key
  cryptosystem in use today is the
  Data Encryption Standard
   Each user has a public key and a private
   The public key is made public while the
    private key remains secret
   Encryption is performed with the public
    key while decryption is done with the
    private key
   The RSA public-key cryptosystem
   RSA stands for Rivest, Shamir, and
Techniques in Cryptography
 RSA(Rivest, Shamir, Adleman)
 DES(Data Encryption Standard)
 AES(Advanced Encryption Standard)
RSA algorithm
 Take two large primes, p and q
 Compute their product n = pq
 Choose e, less than n and relatively
  prime to (p-1)(q-1)
 Choose d such that (ed - 1) is
  divisible by (p-1)(q-1)
RSA algorithm (cont’d)
 The values e and d are called the
  public and private exponents
 The public key is the pair (n, e)
 The private key is (n, d)
 The factors p and q may be
  destroyed or kept with the private
Encryption With RSA
Suppose Alice wants to send a message m
 to Bob. Alice creates the ciphertext c such
 that c = me mod n, where e and n are Bob's
 public key. She sends c to Bob. To
 decrypt, Bob makes m = cd mod n; the
 relationship between e and d ensures that
 Bob correctly recovers m. Since only Bob
 knows d, only Bob can decrypt this
Encryption validity duration

 What is the reason for which key
  expiration is needed ?
 Key size should always be chosen
  according to the expected lifetime of
  the data
RSA algorithm used for privacy
   Alice wishes to send an encrypted
    message to Bob
   She first encrypts the message with DES,
    using a randomly chosen DES key.
   Using bob’s public key she encrypts the
    DES key.
   Sending DES-encrypted message and the
    RSA-encrypted DES key
   Bob do this process inversely

To top