Você está na página 1de 21

• Fazle Hannan

• M.Zahoor
• Iftikhar Ahsan
May 29,2018
Outline
 Overview
 Characteristic
 Components
 Process
 Why Public key Cryptography?
 Requirements
 Basic Concepts used in RSA
 RSA
 String encryption & decryption using RSA in Java
Overview
 Public-key cryptography use one key for encryption and
different but related key for decryption.
Also called Asymmetric Ciphers.

 Traditional private/secret/single key cryptography uses


same one secret key for encryption and decryption
Also called Symmetric Ciphers.
Characteristics
 it is computationally infeasible find decryption key knowing only
algorithm & encryption key
Components
 Plaintext, X: Readable message or data.
 Keys pair: pair of related but different keys, public and private:
(PU, PR)
 Public Key
 Public, Available to anyone
Private Key
 Secret, known only by owner
Components Cont.
 Encryption Algorithm ,E: accepts key & plaintext as input & perform
various transformation
 Cipher text ,C: Scrambled message produced as put by E.
 Decryption Algorithm , D: Accepts the cipher text C & matching key &
produced the original plain text X .
Process
Why Public key Cryptography?
 Authentication of sender?
 Key distribution ?
 Confidentiality ?
Authentication
Confidentiality
Both Authentication & Confidentiality
Z = E(PUb, E(PRa, X))
X = D(PUa, D(PRb, Z))
Requirements
 Computationally easy for User B to generate pair (PUb,PRb)
 Computationally easy for User A, knowing PUb and message
M, to generate cipher text:
C = E(PUb;M)
 Computationally easy for B to decrypt cipher text using PRb:
M = D(PRb; C) = D[PRb;E(PUb;X)]
 Computationally infeasible for attacker, knowing PUb
and C, to determine PRb
 Computationally infeasible for attacker, knowing PUb
and C, to determine M
Requirements Cont.
 a practical public-key scheme depends on a suitable trap-door one-way
function
 Trap-door one-way function, which is easy to calculate in one
direction and infeasible to calculate in the other direction unless certain
additional information is known.
Basic Concepts Used in RSA
 A prime number is an integer that can only be divided without
remainder by itself and 1.
 two numbers a, b are relatively prime if they have no Greatest common
divisors apart from 1
Example of GCD:
RSA Algorithm
 by Rivest, Shamir & Adleman of MIT in 1977
 best known & widely used public-key scheme
 Block cipher: plaintext and cipher text are integers
RSA Encryption/decryption
 To encrypt a message M the sender:
obtains public key of recipient PU={e,n}
computes: C = Me mod n, where 0≤M<n
 To decrypt the cipher text C the owner:
uses their private key PR={d,n}
computes: M = Cd mod n
RSA Key Generation
Each user generates a public/private key pair by:
 selecting two large primes at random: p, q
 computing n = pxq
 ø(n)=(p-1)(q-1)
 Selecting at the random encryption key e
where 1<e<ø(n), GCD(e,ø(n))=1
 solve following equation to find decryption key d
(d x e) mod(e,ø(n))=1
String Encryption & Decryption Using
RSA in Java
References
 Cryptography and Network Security by Stallings: chapter 9
 Cryptography and Network Security by Forouzan: chapter 10
 Network Security by Kaufman, Perlman and Speciner: chapter 6
 Handbook of Applied Cryptography by Menezes, van Oorschot and
Vanstone: chapter 8
Questions ??
THANK YOU

Você também pode gostar