Slide 1

Slide 1 text

More Secrets of Cryptography Chris Riley ConFoo 2018 1

Slide 2

Slide 2 text

Introduction

Slide 3

Slide 3 text

Why do we need cryptography? 1

Slide 4

Slide 4 text

Modern cryptography • Confidentiality 2

Slide 5

Slide 5 text

Modern cryptography • Confidentiality • Key exchange 2

Slide 6

Slide 6 text

Modern cryptography • Confidentiality • Key exchange • Identity 2

Slide 7

Slide 7 text

Modern cryptography • Confidentiality • Key exchange • Identity • Authentication 2

Slide 8

Slide 8 text

Symetric vs Asymetric Cryptography

Slide 9

Slide 9 text

Eliptic Curve Cryptography

Slide 10

Slide 10 text

Eliptic Curve Equation • y2 = x3 + ax2 + b 3

Slide 11

Slide 11 text

Eliptic Curve Equation • y2 = x3 + ax2 + b • y2 = x3 + 486662x2 + x 3

Slide 12

Slide 12 text

An Eliptic Curve 4

Slide 13

Slide 13 text

Eliptic curve dot function 5

Slide 14

Slide 14 text

Eliptic curve multiplication function 6

Slide 15

Slide 15 text

Eliptic curve for Cryptography 7

Slide 16

Slide 16 text

Eliptic Curve Key Exchange • Agree a curve, modulus and generator point (G) 8

Slide 17

Slide 17 text

Eliptic Curve Key Exchange • Agree a curve, modulus and generator point (G) • Select random integer d and compute P = dG 8

Slide 18

Slide 18 text

Eliptic Curve Key Exchange • Agree a curve, modulus and generator point (G) • Select random integer d and compute P = dG • Exchange public keys (PA and PB) 8

Slide 19

Slide 19 text

Eliptic Curve Key Exchange • Agree a curve, modulus and generator point (G) • Select random integer d and compute P = dG • Exchange public keys (PA and PB) • Compute a shared secret dBPA and dAPB 8

Slide 20

Slide 20 text

Eliptic Curve Key Exchange • Agree a curve, modulus and generator point (G) • Select random integer d and compute P = dG • Exchange public keys (PA and PB) • Compute a shared secret dBPA and dAPB • Both parties have now computed dAdBG 8

Slide 21

Slide 21 text

Key Exchange protocol 9

Slide 22

Slide 22 text

Man in the middle 10

Slide 23

Slide 23 text

The Web of Trust

Slide 24

Slide 24 text

Trent, the trusted third party 11

Slide 25

Slide 25 text

Can you trust a web of trust? 11

Slide 26

Slide 26 text

Cryptographic Hash functions

Slide 27

Slide 27 text

Ideal hash function properties • It should be quick and easy to compute a hash for any given data. 12

Slide 28

Slide 28 text

Ideal hash function properties • It should be quick and easy to compute a hash for any given data. • It should be difficult to compute data that has a given hash. 12

Slide 29

Slide 29 text

Ideal hash function properties • It should be quick and easy to compute a hash for any given data. • It should be difficult to compute data that has a given hash. • It should be unlikely that two different messages will have the same hash. 12

Slide 30

Slide 30 text

SHA-2

Slide 31

Slide 31 text

Setup phase • Append a single ’1’ bit to the data • Pad the data with ’0’ so that the data + 64 bits is a multiple of 512 • Append the data length as a 64 bit integer 13

Slide 32

Slide 32 text

Expansion phase • Split message into 512 bit blocks • Expand each block to 2048 bits • Expansion is done using shifts and rotates of the original block xor’d together 14

Slide 33

Slide 33 text

Compression phase 1By User:kockmeyer (Own work) CC-BY-SA-3.0, via Wikimedia Commons 15

Slide 34

Slide 34 text

Merkel Trees

Slide 35

Slide 35 text

A Merkel Tree 16

Slide 36

Slide 36 text

A Merkel Tree 17

Slide 37

Slide 37 text

Bitcoin

Slide 38

Slide 38 text

What is a blockchain? • A Merkle tree 18

Slide 39

Slide 39 text

What is a blockchain? • A Merkle tree • No central authority 18

Slide 40

Slide 40 text

What is a blockchain? • A Merkle tree • No central authority • Multiple ’forks’ may exist 18

Slide 41

Slide 41 text

What is a blockchain? • A Merkle tree • No central authority • Multiple ’forks’ may exist • There exists a consensus algorithm to determine the correct fork 18

Slide 42

Slide 42 text

What is a blockchain? • A Merkle tree • No central authority • Multiple ’forks’ may exist • There exists a consensus algorithm to determine the correct fork • The consensus algorithm only requires data contained on the blockchain to run 18

Slide 43

Slide 43 text

Mining a bitcoin 19

Slide 44

Slide 44 text

Why do bitcoins have value? 19

Slide 45

Slide 45 text

Should I use a block chain for ... ? 19

Slide 46

Slide 46 text

Thanks • @giveupalready • https://github.com/carnage • https://carnage.github.io 20