Quan nguyen symmetric versus asymmetric cryptography

12
Symmetric Symmetric versus versus Asymmetric Asymmetric Cryptography Cryptography

description

Quan nguyen symmetric versus asymmetric cryptography

Transcript of Quan nguyen symmetric versus asymmetric cryptography

Page 1: Quan nguyen   symmetric versus asymmetric cryptography

Symmetric Symmetric versus versus

Asymmetric Asymmetric CryptographyCryptography

Page 2: Quan nguyen   symmetric versus asymmetric cryptography

Why is it worth presenting Why is it worth presenting cryptography?cryptography?

• Top concern in security• Fundamental knowledge in computer

securityA review for those who have taken the

course Computer Security (and Integrity)A need for those who have not

Page 3: Quan nguyen   symmetric versus asymmetric cryptography

Two kinds ofTwo kinds ofCryptographyCryptography

Symmetric1) Alice and Bob agree on a

cryptosystem2) Alice and Bob agree on a

key3) Alice takes her plaintext

message and encrypts it using the encryption algorithm and the key. This creates a ciphertext message

4) Alice sends the ciphertext message to Bob

5) Bob decrypts the ciphertext message with the same algorithm and key and reads it

Asymmetric1) Alice and Bob agree on a

public-key cryptosystem2) Bob sends Alice his public

key3) Alice encrypts her

message using Bob’s public key and sends it to Bob

4) Bob decrypts Alice’s message using his private key

Page 4: Quan nguyen   symmetric versus asymmetric cryptography

ProblemsProblemsSymmetric

• Keys must be distributed in secret

• If a key is compromised, Eve (eavesdropper) can decrypt any message pretend to be one of the

parties• A network requires a great

number of keys

Asymmetric• slow (~1000 times slower

than the symmetric)• vulnerable to chosen-

plaintext attacks

Page 5: Quan nguyen   symmetric versus asymmetric cryptography

Public-key algorithmsPublic-key algorithms• are not a substitute for symmetric

algorithms• are not used to encrypt messages,

they are used to encrypt keys (session keys used with symmetric algorithms to secure message traffic)

Page 6: Quan nguyen   symmetric versus asymmetric cryptography

Hybrid CryptosystemsHybrid Cryptosystems1) Bob sends Alice his public key.2) Alice generates a random session key, K,

encrypts it using Bob’s public key, and sends it to Bob.

EB(K)3) Bob decrypts Alice’s message using his

private key to recover the session key.DB(EB(K)) = K

4) Both of them encrypt their communications using the same session key.

Page 7: Quan nguyen   symmetric versus asymmetric cryptography

Signing DocumentsSigning DocumentsSymmetric

1) Alice encrypts her message to Bob with KA and sends it to Trent

2) Trent decrypts the message with KA

3) Trent takes the decrypted message and a statement that he has received this message from Alice, and encrypts the whole bundle with KB

4) Trent sends the encrypted bundle to Bob

5) Bob decrypts the bundle with KB. He can now read both the message and Trent’s certification that Alice sent it

Asymmetric1) Alice encrypts the

document with her private key, thereby signing the document

2) Alice sends the signed document to Bob

3) Bob decrypts the document with Alice’s public key, thereby verifying the signature

Page 8: Quan nguyen   symmetric versus asymmetric cryptography

Digital Signatures with Digital Signatures with EncryptionEncryption

1) Alice signs the message with her private keySA(M)

2) Alice encrypts the signed message with Bob’s public key and sends it to Bob

EB(SA(M))3) Bob decrypts the message with his private key

DB(EB(SA(M))) = SA(M)4) Bob verifies with Alice’s public key and recovers

the messageVA(SA(M)) = M

Page 9: Quan nguyen   symmetric versus asymmetric cryptography

Problem with resendingProblem with resendingthe message as a Receiptthe message as a Receipt

• Bob signs the message with his private key, encrypts it with Alice’s public key, and sends it back to Alice

EA(SB(M))

• If Mallory captures the message that Alice sent to Bob and claims that it came from himVM(SA(M)) = ?

• Bob still sends Mallory a receipt:EM(SB(VM(SA(M))))= EM(DB(EM(DA(M))))

Mallory can read the message M by using his private key and public keys of Alice and Bob.

Page 10: Quan nguyen   symmetric versus asymmetric cryptography

Attacks againstAttacks againstPublic-key CryptographyPublic-key Cryptography

• How Alice gets Bob’s public key?from secure database

• How to protect the public key?database is read-only to everyone, only

writable to TrentTrent can sign each public key by his

own private key (Key Certification Authority or Key Distribution Center)

Page 11: Quan nguyen   symmetric versus asymmetric cryptography

ConclusionConclusion• No perfect method

each has its own weaknessesbe aware of being attacked

• Good to combine different methods

Page 12: Quan nguyen   symmetric versus asymmetric cryptography

ReferenceReference[1] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 31.7: The RSA public-key cryptosystem, pp.881–887

[2] Bruce Schneier. Applied Cryptography. John Wiley & Sons, Inc. 1996. (ISBN: 0471128457)