Slide 1

Slide 1 text

Jeffrey Cohen @jeffcohen [email protected] Modern Cryptography for the absolute beginner

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Alan Turing

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Secret Writing Substitution Transposition Steganography Cryptography Code Cipher From "The Code Book," by Simon Singh. Doubleday, 1999

Slide 7

Slide 7 text

Cryptography is not Security

Slide 8

Slide 8 text

Cryptography There are two primary use cases for digital cryptography: • Verification • Secrecy

Slide 9

Slide 9 text

There are two uses cases for verification: • Message tampering • Authorship Cryptography

Slide 10

Slide 10 text

How can we verify that a message was transmitted perfectly without any accidental changes? Use Case: Message Tampering

Slide 11

Slide 11 text

Use Case: Parity Bits

Slide 12

Slide 12 text

C A T Content: Use Case: Parity Bits

Slide 13

Slide 13 text

01000011 01000001 01010100 Content: Use Case: Parity Bits

Slide 14

Slide 14 text

01000011 01000001 01010100 Even Parity: Content: 11000011 01000001 11010100 Use Case: Parity Bits

Slide 15

Slide 15 text

01000011 01000001 01010100 Odd Parity: Content: 01000011 11000001 01010100 Use Case: Parity Bits

Slide 16

Slide 16 text

Check Digits

Slide 17

Slide 17 text

1. Sum the digits in the odd-numbered positions, then multiply by 3. 2. Add the digits in the even-numbered positions to the previous result. 3. Divide by 10, and keep the remainder. 4. If the remainder is not 0, 
 subtract the remainder from 10. Check Digits

Slide 18

Slide 18 text

Data Verification Checksum Digest Hash Fingerprint MD5 SHA-1 SHA-256 bcrypt These are all synonyms!

Slide 19

Slide 19 text

Use Case: Password Security Password: bcrypt hash: swordfish $20A6@3AC194F02... Reversing this process is impossible.

Slide 20

Slide 20 text

Symmetric Encryption

Slide 21

Slide 21 text

Hello Symmetric Encryption

Slide 22

Slide 22 text

Hello Ifmmp "Advance by 1" Symmetric Encryption

Slide 23

Slide 23 text

Hello Ifmmp "Advance by 1" Symmetric Encryption

Slide 24

Slide 24 text

Hello Ifmmp Fortunately, this is reversible Symmetric Encryption

Slide 25

Slide 25 text

Hello Ifmmp Fortunately, this is reversible DES
 AES-256 Blowfish Symmetric Encryption

Slide 26

Slide 26 text

Hello Ifmmp But how do we transmit the key? Symmetric Encryption

Slide 27

Slide 27 text

Symmetric Encryption

Slide 28

Slide 28 text

Each key transforms data. They are called a pair because they mathematically exactly reverse the effect of the other key. Public Key Cryptography

Slide 29

Slide 29 text

One key is arbitrarily selected to be the public key, and the other will be the private key. Public Key Cryptography

Slide 30

Slide 30 text

Hello ?????? Public Key Cryptography

Slide 31

Slide 31 text

Hello x9dak Public Key Public Key Cryptography

Slide 32

Slide 32 text

Public Key Hello x9dak Private Key Public Key Cryptography

Slide 33

Slide 33 text

Mr. A Mr. B Use Case: Secret Message

Slide 34

Slide 34 text

Mr. A wants to send a secret message to Mr. B. Mr. A Mr. B Mr. B, Meet me at noon for lunch. Your friend, Mr. A Use Case: Secret Message

Slide 35

Slide 35 text

Mr. A Mr. B STEP 1: Mr. A encrypts the message with Mr. B's public key. Li%8aja^@*9cmakA P91&*C9Naxw8723h Yolq&6209CKn02K Mr. B, Meet me at noon for lunch. Your friend, Mr. A Use Case: Secret Message

Slide 36

Slide 36 text

Mr. A Mr. B STEP 2: Mr. B decrypts the message with Mr. B's private key. Li%8aja^@*9cmakA P91&*C9Naxw8723h Yolq&6209CKn02K Mr. B, Meet me at noon for lunch. Your friend, Mr. A Mr. B, Meet me at noon for lunch. Your friend, Mr. A Use Case: Secret Message

Slide 37

Slide 37 text

A1. Mr. A calculates the content's digest. A2. Mr. A encrypts the digest with his
 private key. This is the "wax seal".
 B1. Mr. B decrypts the digest value using
 Mr. A's public key. B2. Mr. B independently calculates the
 digest of the received content. B3. Mr. B expects the digests to match! Use Case: Authenticity

Slide 38

Slide 38 text

ssh-keygen -t rsa -b 4096 Wait a Minute!

Slide 39

Slide 39 text

ssh-keygen -t rsa -b 4096 Wait a Minute!

Slide 40

Slide 40 text

ssh-keygen -t rsa -b 4096 This won't work! RSA can only encrypt messages shorter than the "key length". Wait a Minute!

Slide 41

Slide 41 text

Wait a Minute! In reality, we use both! We use asymmetric cryptography to securely transmit a random symmetric key.

Slide 42

Slide 42 text

What's Next? Now: PKCS Soon: Elliptic-curve PKCS Future: Quantum implications?

Slide 43

Slide 43 text

Modern Cryptography for the absolute beginner Jeffrey Cohen @jeffcohen [email protected]