Professional Documents
Culture Documents
OUTLINE
Approaches to Message Authentication Secure Hash Functions and HMAC Public-Key Cryptography Principles Public-Key Cryptography Algorithms Digital Signatures Key Management
2
Authentication
Requirements - must be able to verify that: 1. Message came from apparent source or author, 2. Contents have not been altered, 3. Sometimes, it was sent at a certain time or sequence. Protection against active attack (falsification of data and transactions)
3
1. 2. 3. 4.
H can be applied to a block of data at any size H produces a fixed length output H(x) is easy to compute for any given x. For any given block x, it is computationally infeasible to find x such that H(x) = h 5. For any given block x, it is computationally infeasible to find y x with H(y) = H(x). 6. It is computationally infeasible to find any pair (x, y) such that H(x) = H(y)
4
Public-Key Cryptography
public-key/two-key/asymmetric cryptography involves the use of two keys:
a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures a private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures those who encrypt messages or verify signatures cannot decrypt messages or create signatures
is asymmetric because
12
RSA
by Rivest, Shamir & Adleman of MIT in 1977 best known & widely used public-key scheme based on exponentiation in a finite (Galois) field over integers modulo a prime uses large integers (eg. 1024 bits) security due to cost of factoring large numbers
nb. factorization takes O(e log n log log n) operations (hard)
RSA ALGORITHM
1.
2.
3.
4.
Select the public key (i.e, Encryption Key) E such that it is not a factor of (P-1) and (Q-1)
Select the Private key (i.e, Dcryption Key) D such that the following eq is true: (D X E) mod (P-1) X (Q-1) = 1
RSA ALGORITHM
5. For encryption, Calculate the cipher text CT from the plain text PT as follows: CT = PT^E mod N 6. Send CT as the cipher text to the receiver
7. For Decryption, Calculate the plain Text PT from the cipher text CT as follows: PT = CT^D mod N
RSA Example
1. 2. 3. P = 7, Q=17 N = P x Q = 7 x 17 = 119 (P-1) x (Q-1) = 6 x 16 = 96 =2*2*2*2*2*3
We have to choose E such that none of the factors of E is 2 and 3. ( Cant choose E = 4, 15, 6 etc) Let us choose E = 5
Question
In a public-key system using RSA, you intercept the ciphertext C = 10 sent to a user whose public key is e = 5, n = 35. What is the plaintext M?
Perform encryption and decryption using RSA algorithm, as in Figure 1, for the following:
p = 3; q = 11, e = 7; M = 5 p = 5; q = 11, e = 3; M = 9
Digital signatures
Text encrypted with ones private key can only be decrypted with his public key This also helps to ensure the authenticity that the text has been arrived from the appropriate user This encrypted message serves a purpose for digital signatures. But message being sent is safe from alteration but not safe for eaves dropping As any user who got the data can decrypt it with the public key of the user.
20