Top Banner
Introduction to Cryptography Jiyou Li lijiyou at sjtu.edu.cn Department of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013
52

Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Apr 18, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Introduction to Cryptography

Jiyou Lilijiyou at sjtu.edu.cn

Department of Mathematics, Shanghai Jiao Tong University

Sep. 17th, 2013

Page 2: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptography

Cryptography: the art and science of keeping messagesecure.

Confidentiality;Authentication;Integrity;Nonrepudiation; Electronic payment; Anonymity; Electronicvotes; Zero-knowledge...

Page 3: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptography

Cryptography: the art and science of keeping messagesecure.Confidentiality;

Authentication;Integrity;Nonrepudiation; Electronic payment; Anonymity; Electronicvotes; Zero-knowledge...

Page 4: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptography

Cryptography: the art and science of keeping messagesecure.Confidentiality;Authentication;

Integrity;Nonrepudiation; Electronic payment; Anonymity; Electronicvotes; Zero-knowledge...

Page 5: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptography

Cryptography: the art and science of keeping messagesecure.Confidentiality;Authentication;Integrity;

Nonrepudiation; Electronic payment; Anonymity; Electronicvotes; Zero-knowledge...

Page 6: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptography

Cryptography: the art and science of keeping messagesecure.Confidentiality;Authentication;Integrity;Nonrepudiation; Electronic payment; Anonymity; Electronicvotes; Zero-knowledge...

Page 7: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

The Origins of Cryptography

Diplomacy: Zimmerman telegram;

War: Enigma machine, Purple;Individual or corporate privacy;Electronic Commerce...

Page 8: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

The Origins of Cryptography

Diplomacy: Zimmerman telegram;War: Enigma machine, Purple;

Individual or corporate privacy;Electronic Commerce...

Page 9: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

The Origins of Cryptography

Diplomacy: Zimmerman telegram;War: Enigma machine, Purple;Individual or corporate privacy;

Electronic Commerce...

Page 10: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

The Origins of Cryptography

Diplomacy: Zimmerman telegram;War: Enigma machine, Purple;Individual or corporate privacy;Electronic Commerce...

Page 11: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Enigma

Page 12: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalysis

Cryptanalysis: the art and science of breaking cipher systems,recovering the plaintext of a message without access to the key.Attack: a attempted cryptanalysis is called an attack.

The n2 Problem;The Kerckhoffs Principle;The Moore Law;The Murphy Law.

Page 13: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalysis

Cryptanalysis: the art and science of breaking cipher systems,recovering the plaintext of a message without access to the key.Attack: a attempted cryptanalysis is called an attack.

The n2 Problem;

The Kerckhoffs Principle;The Moore Law;The Murphy Law.

Page 14: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalysis

Cryptanalysis: the art and science of breaking cipher systems,recovering the plaintext of a message without access to the key.Attack: a attempted cryptanalysis is called an attack.

The n2 Problem;The Kerckhoffs Principle;

The Moore Law;The Murphy Law.

Page 15: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalysis

Cryptanalysis: the art and science of breaking cipher systems,recovering the plaintext of a message without access to the key.Attack: a attempted cryptanalysis is called an attack.

The n2 Problem;The Kerckhoffs Principle;The Moore Law;

The Murphy Law.

Page 16: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalysis

Cryptanalysis: the art and science of breaking cipher systems,recovering the plaintext of a message without access to the key.Attack: a attempted cryptanalysis is called an attack.

The n2 Problem;The Kerckhoffs Principle;The Moore Law;The Murphy Law.

Page 17: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalytic Attacks

Ciphertext-only attack;

Known plaintext attack ;Chosen plaintext attack;Chosen ciphertext attack.

Page 18: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalytic Attacks

Ciphertext-only attack;Known plaintext attack ;

Chosen plaintext attack;Chosen ciphertext attack.

Page 19: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalytic Attacks

Ciphertext-only attack;Known plaintext attack ;Chosen plaintext attack;

Chosen ciphertext attack.

Page 20: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Cryptanalytic Attacks

Ciphertext-only attack;Known plaintext attack ;Chosen plaintext attack;Chosen ciphertext attack.

Page 21: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Some Cryptographic Protocols

Bits Commitment;

Key Exchange;Secret Sharing Scheme;Digital Signatures;Cloud Computing Security...

Page 22: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Some Cryptographic Protocols

Bits Commitment;Key Exchange;

Secret Sharing Scheme;Digital Signatures;Cloud Computing Security...

Page 23: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Some Cryptographic Protocols

Bits Commitment;Key Exchange;Secret Sharing Scheme;

Digital Signatures;Cloud Computing Security...

Page 24: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Some Cryptographic Protocols

Bits Commitment;Key Exchange;Secret Sharing Scheme;Digital Signatures;

Cloud Computing Security...

Page 25: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Some Cryptographic Protocols

Bits Commitment;Key Exchange;Secret Sharing Scheme;Digital Signatures;Cloud Computing Security...

Page 26: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

A Cryprtographic Communication Model

Encryption: A key

Ciphertext

Plaintext

Channel Ciphertext

Decryption: A key

Plaintext

&%'$Eve!

��

��

BB

BB

Page 27: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

The History of Cryptography

1. B.C.?-1949: Classical Cryptography (Substitutions andpermutations);2. 1949-1976: Symmetric Cryptography (Block Dipher andStream Cipher, based on Shannon’s Theorem);3. 1976-present: Modern Cryptography (Public-Key andasymmetric...).

Page 28: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Caesar Cipher

ABCDEFGHIJKLMNOPQRSTUVWXYZKey = 3DEFGHIJKLMNOPQRSTUVWXYZABCPlaintext: JIAOTONGUNIVERSITYEncryption: Shift by KEY = 3Ciphertext: MLDRWRQJXQLYHUVLWBDecryption: Shift backwards by KEY = 3

Page 29: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Vigenere Cipher

Plaintext: thi sis adu mmy mes sag eKey: ABC ABC ABC ABC ABC ABC ACiphertext: TIK SJU AEW MNA MFU SBI EDecryption: "Subtract0the key ABC from ciphertext mod 26.

Page 30: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Vernam Ciphers

Plaintext: MATHISUSEFULANDFUNKey: NGUJKAMOCTLNYBCIAZEncryption: /Add0key to message mod 26Ciphertext: BGO,..Decryption: /Subtract0key from ciphertext mod 26.

Page 31: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Permutation Cipher

Example: Plaintext: JIAOTO NGUNIV ERSITYEncryption: Group action by KEY =(135246)Ciphertext: OTJIAO VINGUN YTERSIDecryption: Inverse action by KEY =(164253)

Page 32: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Hebern machine

Page 33: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Enigma: invented by Arthur Scherbius

Page 34: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Rotors

Page 35: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Reflector

Page 36: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Plugboard

Page 37: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Electrical pathway

Page 38: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Electrical pathway

Page 39: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Mathematics in Enigma

E(xi) = P ◦ Ri1 ◦ Mi2 ◦ Li3 ◦ U ◦ L−1i3

◦ M−1i2

◦ R−1i1

◦ P−1(xi),

where P, R, M, L, U ∈ S26, Ri1 = ρ−i ◦ R ◦ ρi and U is aconvolution.

Page 40: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Bomber

Page 41: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

A Cipher

1. A plaintext space M, a ciphertext space C and a key space K;2. A key generation algorithm;3. An encryption algorithm E;4. A decryption algorithm D.

Page 42: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Do we have unconditionally secure encryption?

TheoremPerfect secrecy is equivalent to H(M|C) = H(M) and to thestatistic independence between M and C.

Theorem (Shannon, 1949)Perfect secrecy implies H(K ) ≥ H(M).

Page 43: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

One-Time Pads: Vernam Ciphers

Plaintext: MATHISUSEFULANDFUNKey: NGUJKAMOCTLNYBCIAZEncryption: /Add0key to message mod 26Ciphertext: BGO,..Decryption: /Subtract0key from ciphertext mod 26.

Page 44: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

One-Time Pads

One-Time Pads is unconditionally secure;

Problem: Exchanging the key;There are some clever ways to exchange the key; we willstudy some of them!

Page 45: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

One-Time Pads

One-Time Pads is unconditionally secure;Problem: Exchanging the key;

There are some clever ways to exchange the key; we willstudy some of them!

Page 46: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

One-Time Pads

One-Time Pads is unconditionally secure;Problem: Exchanging the key;There are some clever ways to exchange the key; we willstudy some of them!

Page 47: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Stream Ciphers

1. Making OTP practical;2. Idea: replace "random" key by "pseudorandom" key;3. The security depend on specific pseudorandom generators.

Page 48: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Public-Key Cryptography (1976-)

Discovered by Diffie & Hellman (1976) and now known atGCHQ years before;Uses one-way (asymmetric) functions, public keys, and privatekeys;Mainly based on two hard problems: Factoring large integersand the discrete logarithm problem.

Page 49: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Coding Theory and Cryptography

Cryptography needs reliability�

Page 50: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Mathematics in Cryptography

Linear AlgebraAbstract AlgebraNumber TheoryAlgebraic GeometryProbabilityStatisticsCombinatoricsComputing...

Page 51: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

References

1. A classical introduction to modern cryptography, S.Vaudenay, Springer, 2005.2. �èÆ�Ú,¾�I��½�Í,�ÆÑ��, 1999.

Page 52: Introduction to CryptographyDepartment of Mathematics, Shanghai Jiao Tong University Sep. 17th, 2013 Cryptography Cryptography: the art and science of keeping message secure. Confidentiality;

Exercises

4. Suppose the one time pad encryption of the message"attackatdawn" is "wxtygcjmxenf". What is the one time padencryption of the message "attackatdusk" under the same key?5. Let M = C = K = {0, 1, . . . , 63} and consider the followingcipher (M, C, K) defined by:

E(k , x) = x + k mod 64.

Does this cipher have perfect secrecy?