Henric Johnson 1
Chapter3 Chapter3
Public-Key Cryptography and Public-Key Cryptography and Message Authentication Message Authentication
Henric Johnson Blekinge Institute of Technology, Sweden http://www.its.bth.se/staff/hjo/ henric.johnson@bth.se
Chapter3 Chapter3 Public-Key Cryptography and Public-Key - - PowerPoint PPT Presentation
Chapter3 Chapter3 Public-Key Cryptography and Public-Key Cryptography and Message Authentication Message Authentication Henric Johnson Blekinge Institute of Technology, Sweden http://www.its.bth.se/staff/hjo/ henric.johnson@bth.se Henric
Henric Johnson 1
Henric Johnson Blekinge Institute of Technology, Sweden http://www.its.bth.se/staff/hjo/ henric.johnson@bth.se
Henric Johnson 2
Henric Johnson 3
author,
time or sequence.
transactions)
Henric Johnson 4
– Only the sender and receiver should share a key
– An authentication tag is generated and appended to each message
– Calculate the MAC as a function of the message and the key. MAC = F(K, M)
Henric Johnson 5
Henric Johnson 6
Henric Johnson 7
before transmission.
Henric Johnson 8
”fingerprint.
1. H can be applied to a block of data at any size 2. H produces a fixed length output 3. H(x) is easy to compute for any given x. 4. 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 with H(y) = H(x). 6. It is computationally infeasible to find any pair (x, y) such that H(x) = H(y)
x y ≠
Henric Johnson 9
processed would improve
Henric Johnson 10
Henric Johnson 11
Henric Johnson 12
160 (5 paired rounds of 16) 64 (4 rounds
80 (4 rounds of 20) Number of steps 264-1 bits Maximum message size 512 bits 512 bits 512 bits Basic unit of processing 160 bits 128 bits 160 bits Digest length RIPEMD-160 MD5 SHA-1
∞ ∞
Henric Johnson 13
as SHA-1.
– Cryptographic hash functions executes faster in software than encryptoin algorithms such as DES – Library code for cryptographic hash functions is widely available – No export restrictions from the US
Henric Johnson 14
Henric Johnson 15
confidentiality and authentication.
– Plaintext – Encryption algorithm – Public and private key – Ciphertext – Decryption algorithm
Henric Johnson 16
Henric Johnson 17
Henric Johnson 18
– Encryption/decryption: The sender encrypts a message with the recipient’s public key. – Digital signature: The sender ”signs” a message with its private key. – Key echange: Two sides cooperate two exhange a session key.
Henric Johnson 19
1. Computationally easy for a party B to generate a pair (public key KUb, private key KRb) 2. Easy for sender to generate ciphertext: 3. Easy for the receiver to decrypt ciphertect using private key:
) (M E C
KUb
=
)] ( [ ) ( M E D C D M
KUb KRb KRb
= =
Henric Johnson 20
1. Computationally infeasible to determine private key (KRb) knowing public key (KUb) 2. Computationally infeasible to recover message M, knowing KUb and ciphertext C 3. Either of the two keys can be used for encryption, with the other used for decryption:
)] ( [ )] ( [ M E D M E D M
KRb KUb KUb KRb
= =
Henric Johnson 21
in 1977.
– RSA is a block cipher – The most widely implemented
– Echange a secret key securely – Compute discrete logarithms
Henric Johnson 22
1. Select p,q p and q both prime 2. Calculate n = p x q 3. Calculate 4. Select integer e 5. Calculate d 6. Public Key KU = {e,n} 7. Private key KR = {d,n}
) 1 )( 1 ( ) ( − − = Φ q p n
) ( 1 ; 1 ) ), ( g cd ( n e e n Φ < < = Φ
) ( m
1
n e d Φ =
−
Henric Johnson 23
Henric Johnson 24
M<n
C = Me (mod n)
Henric Johnson 25
C
M = Cd (mod n)
Henric Johnson 26
Henric Johnson 27
– Makes use of the SHA-1 – Not for encryption or key echange
– Good for smaller bit size – Low confidence level, compared with RSA – Very complex
Henric Johnson 28