Cryptography 101 (with math)

222
hi y’all, i’m jesse

description

Jesse Pollak's talk on Cryptography 101 (with math) at WordCamp Minneapolis

Transcript of Cryptography 101 (with math)

Page 1: Cryptography 101 (with math)

hi y’all, i’m jesse

Page 2: Cryptography 101 (with math)

hi y’all, i’m jesse@jessepollak

co-founder at clef

Page 3: Cryptography 101 (with math)

cryptography

Page 4: Cryptography 101 (with math)

cRyPtOgRaPhY

Page 5: Cryptography 101 (with math)

cryptography

Page 6: Cryptography 101 (with math)

goals

Page 7: Cryptography 101 (with math)

goalsgive you a basic knowledge of what crypto is and how it works.

Page 8: Cryptography 101 (with math)

goalsgive you a basic knowledge of what crypto is and how it

use real, live examples you can understand

Page 9: Cryptography 101 (with math)

goalsgive you a basic knowledge of what crypto is and how it

use real, live examples you can understand

help you realize that crypto isn’t scary.

Page 10: Cryptography 101 (with math)

goalsgive you a basic knowledge of what crypto is and how it works.

use real, live examples you can understand

help you realize that crypto isn’t scary.

Page 11: Cryptography 101 (with math)

again, i’m jesse@jessepollak

co-founder at clef

Page 12: Cryptography 101 (with math)

crypto 101

Page 13: Cryptography 101 (with math)

cryptographythe art of writing or solving codes

Page 14: Cryptography 101 (with math)

cryptographythe art of writing or solving codes

the practice and study of techniques to communicate securely in the presence of third-parties.

Page 15: Cryptography 101 (with math)

cryptographythe art of writing or solving codes

the practice and study of techniques to communicate securely in the presence of third-parties.

how we communicate online without hackers stealing our secrets

Page 16: Cryptography 101 (with math)

core problem

Page 17: Cryptography 101 (with math)

how can two people communicate securely?

alicebob

Page 18: Cryptography 101 (with math)

two subproblems

Page 19: Cryptography 101 (with math)

“your message”

1

Page 20: Cryptography 101 (with math)

“fd64$%533#$$1”

“your message”

1

Page 21: Cryptography 101 (with math)

“your message”

“fd64$%533#$$1”

“your message”

1

Page 22: Cryptography 101 (with math)

encryption

1

alicebob

Page 23: Cryptography 101 (with math)

2

bob

Page 24: Cryptography 101 (with math)

2

“your message”

“fd64$%533#$$1”

“your message”

bob

Page 25: Cryptography 101 (with math)

2

alicebob

Page 26: Cryptography 101 (with math)

2

“your message”

bob alice

Page 27: Cryptography 101 (with math)

2

“your message”

“fd64$%533#$$1”

bob alice

Page 28: Cryptography 101 (with math)

2

“your message”

“fd64$%533#$$1”

bob

“fd64$%533#$$1”

alice

Page 29: Cryptography 101 (with math)

2

“your message”

“fd64$%533#$$1”

“your message”

bob

“fd64$%533#$$1”

?

alice

Page 30: Cryptography 101 (with math)

2

alicebob key exchange

Page 31: Cryptography 101 (with math)

encryption

Page 32: Cryptography 101 (with math)

I have a message that I want to keep secret

Page 33: Cryptography 101 (with math)

I have an encryption key that only I know

Page 34: Cryptography 101 (with math)

I have an encryption key that only I know

Page 35: Cryptography 101 (with math)

I have an encryption key that only I know

Page 36: Cryptography 101 (with math)

I have an encryption key that only I knowwhat is this thing?

Page 37: Cryptography 101 (with math)

I have an encryption key that only I knowwhat is this thing?

Page 38: Cryptography 101 (with math)

I have an encryption key that only I knowwhat is this thing?

“secret message”

“secret key”

Page 39: Cryptography 101 (with math)

“the message I want to keep secret”

Page 40: Cryptography 101 (with math)

“the message I want to keep secret”“my secret key”+

Page 41: Cryptography 101 (with math)

“the message I want to keep secret”“my secret key”+

Page 42: Cryptography 101 (with math)

“the message I want to keep secret”“my secret key”+

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”=

Page 43: Cryptography 101 (with math)

“the message I want to keep secret”“my secret key”+

“the message I want to keep secret”=

encrypted

Page 44: Cryptography 101 (with math)

“the message I want to keep secret”“my secret key”+

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”=

Page 45: Cryptography 101 (with math)

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”“my secret key”+

Page 46: Cryptography 101 (with math)

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”“my secret key”+

Page 47: Cryptography 101 (with math)

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”“my secret key”+

“the message I want to keep secret”=

Page 48: Cryptography 101 (with math)

“the message I want to keep secret”“my secret key”+

decrypted“the message I want to keep secret”=

Page 49: Cryptography 101 (with math)

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”“my secret key”+

“the message I want to keep secret”=

“the message I want to keep secret”“my secret key”+

Page 50: Cryptography 101 (with math)

“dkjf8#654&(@)(5335jJkdfd8(%&jfdc”“my secret key”+

“the message I want to keep secret”=

“the message I want to keep secret”“my secret key”+

Page 51: Cryptography 101 (with math)

encryption

decryption

Page 52: Cryptography 101 (with math)

encryption…?

decryption…?

Page 53: Cryptography 101 (with math)

how does encryption actually work?

Page 54: Cryptography 101 (with math)

how does encryption actually work?

how does data actually work?

Page 55: Cryptography 101 (with math)

how does encryption actually work?

“secret”

Page 56: Cryptography 101 (with math)

how does encryption actually work?

“secret”s e c r e t

Page 57: Cryptography 101 (with math)

how does encryption actually work?

“secret”s e c r e t

01110011 01100101 01100011 01110010 01100101 01110100

Page 58: Cryptography 101 (with math)

how does encryption actually work?

“secret”s e c r e t

01110011 01100101 01100011 01110010 01100101 01110100

bit

Page 59: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

Page 60: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

encryption

Page 61: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

00000001 00000100 00001101 00010110 00001010 00011001

Page 62: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

00000001 00000100 00001101 00010110 00001010 00011001

% ! ( 5 q 6

Page 63: Cryptography 101 (with math)

how does encryption actually work?

encryption means turning 1s and 0s into other 1s and 0s that are random

Page 64: Cryptography 101 (with math)

so, how does encryption actually work?

Page 65: Cryptography 101 (with math)

how does encryption actually work?

xor

Page 66: Cryptography 101 (with math)

how does encryption actually work?

xortwo bits in, one bit out

Page 67: Cryptography 101 (with math)

how does encryption actually work?

0 xor 1 = 1

0 xor 0 = 01 xor 1 = 0

1 xor 0 = 1

Page 68: Cryptography 101 (with math)

how does encryption actually work?

1 if two bits are different 0 if two bits are the same

Page 69: Cryptography 101 (with math)

so, how does encryption actually work?

Page 70: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

Page 71: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

r a n d o m

Page 72: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

xor

Page 73: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

0

Page 74: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00

Page 75: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

000

Page 76: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

0000

Page 77: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000

Page 78: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

000000

Page 79: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

0000000

Page 80: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001

Page 81: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 00011001

Page 82: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

% ! ( 5 q 600000001 00000100 00001101 00010110 00001010 00011001

Page 83: Cryptography 101 (with math)

how does encryption actually work?

encryption!

Page 84: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 00011001

% ! ( 5 q 6

Page 85: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

r a n d o m

Page 86: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

xor

Page 87: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

0

Page 88: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

01

Page 89: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

011

Page 90: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

0111

Page 91: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

01110

Page 92: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

011100

Page 93: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

0111001

Page 94: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

01110011

Page 95: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

01110011 01100101 01100011 01110010 01100101 01110100

Page 96: Cryptography 101 (with math)

how does encryption actually work?

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

01110010 01100001 01101110 01100100 01101111 01101101

00000001 00000100 00001101 00010110 00001010 0001100101110010 01100001 01101110 01100100 01101111 01101101

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

Page 97: Cryptography 101 (with math)

how does encryption actually work?

decryption!

Page 98: Cryptography 101 (with math)

how does encryption actually work?

why does this work?

Page 99: Cryptography 101 (with math)

how does encryption actually work?

0 xor

1

1

Page 100: Cryptography 101 (with math)

how does encryption actually work?

impossible to know whether 1 or 0 came from the key or the secret message

Page 101: Cryptography 101 (with math)

how does encryption actually work?

0 xor

1

1?

?

Page 102: Cryptography 101 (with math)

how does encryption actually work?

to encrypt a message, we xor it with a secret key

Page 103: Cryptography 101 (with math)

caveat

how does encryption actually work?

this is very simplified

Page 104: Cryptography 101 (with math)

encryption

1

alicebob

Page 105: Cryptography 101 (with math)

2

alicebob key exchange

Page 106: Cryptography 101 (with math)

key exchange

Page 107: Cryptography 101 (with math)

alicebob how we get the same encryption key

Page 108: Cryptography 101 (with math)

alicebob how we get the same encryption key

without me finding out

Page 109: Cryptography 101 (with math)

alicebob how we get the same encryption key

without me finding out

or me

Page 110: Cryptography 101 (with math)

alicebob how we get the same encryption key

without me finding out

or meor me

Page 111: Cryptography 101 (with math)

alicebob how we get the same encryption key

without me finding out

or meor me

Page 112: Cryptography 101 (with math)

alicebob how we get the same encryption key

without me finding out

or meor me

all communication is public

Page 113: Cryptography 101 (with math)

problemhow do two people share an encryption key when they can’t communicate privately.

Page 114: Cryptography 101 (with math)

solutiondiffie-hellman!

Page 115: Cryptography 101 (with math)

solutiondiffie-hellman…?

Page 116: Cryptography 101 (with math)

solutionmath!

Page 117: Cryptography 101 (with math)

solutionmath…?

Page 118: Cryptography 101 (with math)

solutioncolors

Page 119: Cryptography 101 (with math)

solutioncolors!

Page 120: Cryptography 101 (with math)

diffie-hellman key exchange

Page 121: Cryptography 101 (with math)

diffie-hellman key exchangewith no math and lots of colors!

Page 122: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 123: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 124: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 125: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 126: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 127: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 128: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 129: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 130: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 131: Cryptography 101 (with math)

imagine that we have an infinite number of colors

Page 132: Cryptography 101 (with math)

some rules

Page 133: Cryptography 101 (with math)

some ruleseasy to mix two colors to get a third

Page 134: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

Page 135: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

=

Page 136: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

=impossible to figure out mixed colors

Page 137: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

=impossible to figure out mixed colors

=

Page 138: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

=impossible to figure out mixed colors

= +

Page 139: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

=impossible to figure out mixed colors

= + ?

Page 140: Cryptography 101 (with math)

some rules

+easy to mix two colors to get a third

=impossible to figure out mixed colors

= + ?

Page 141: Cryptography 101 (with math)

bob

hi

Page 142: Cryptography 101 (with math)

alicebob

hi hey

Page 143: Cryptography 101 (with math)

alicebob

Page 144: Cryptography 101 (with math)

alicebob

Page 145: Cryptography 101 (with math)

alicebob

Page 146: Cryptography 101 (with math)

alicebob

Page 147: Cryptography 101 (with math)

alicebob

Page 148: Cryptography 101 (with math)

alicebob

Page 149: Cryptography 101 (with math)

alicebob

Page 150: Cryptography 101 (with math)

alicebob

Page 151: Cryptography 101 (with math)

alicebob

“I NEED TO TELL YOU A SECRET!”

Page 152: Cryptography 101 (with math)

alicebob

“I NEED TO TELL YOU A SECRET!” “LET’S DO A KEY EXCHANGE!”

Page 153: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

Page 154: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

bob and alice agree on a random color publicly

Page 155: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

Page 156: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

bob chooses a color and tells no one

Page 157: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

alice chooses a color and tells no one

Page 158: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

bob mixes his secret color with the public color and send the combination to alice

Page 159: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

Page 160: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

alice mixes her secret color with the public color and send the combination to bob

Page 161: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

Page 162: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

bob and alice mix their secret colors with their partner’s blend to get a new secret color

Page 163: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

secret message

Page 164: Cryptography 101 (with math)

everyone else

secret

Page 165: Cryptography 101 (with math)

+ =

secret

everyone else

wrong

Page 166: Cryptography 101 (with math)

+ =

secret

wrong

+ = wrong

everyone else

Page 167: Cryptography 101 (with math)

+ =

secret

wrong

+ = wrong

+ = wrong

everyone else

Page 168: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

secret message

Page 169: Cryptography 101 (with math)

2

alicebob key exchange

Page 170: Cryptography 101 (with math)

combination

Page 171: Cryptography 101 (with math)

2

alicebob key exchange

Page 172: Cryptography 101 (with math)

diffie-hellman key exchangewith no math and lots of colors!

Page 173: Cryptography 101 (with math)

diffie-hellman key exchangewith a little math and no colors

Page 174: Cryptography 101 (with math)

some rules

Page 175: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

bob and alice agree on a random number

5

Page 176: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

5

5 5

Page 177: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

5

5 5

bob chooses a prime number and tells no one

7

Page 178: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

5

5 5

alice chooses a prime number and tells no one

7 3

Page 179: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

5

5 5

7 3

bob “mixes” his secret number with the public number and shares the result with alice

57

Page 180: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

55 5

7 3

bob “mixes” his secret number with the public number and shares the result with alice

57

7

Page 181: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

55 5

7 3

alice “mixes” her secret number with the public number and shares the result with bob

57

7

53

Page 182: Cryptography 101 (with math)

alicebob

bob’s knowledge alice’s knowledge

everyone’s knowledge

55

7 3

57

753

53

Page 183: Cryptography 101 (with math)

bob’s knowledge alice’s knowledge

everyone’s knowledge

5 57

(5 )3

53

bob and alice mix their secret numbers with their partner’s mix to get a new secret number

7 (5 )7 3

Page 184: Cryptography 101 (with math)

bob’s knowledge alice’s knowledge

everyone’s knowledge

5 57

5 (3 * 7)

53

5 (3 * 7)

Page 185: Cryptography 101 (with math)

bob’s knowledge alice’s knowledge

everyone’s knowledge

5 57

5 21

53

5 21

Page 186: Cryptography 101 (with math)

everyone else

secret5

21

55

7

53

Page 187: Cryptography 101 (with math)

everyone else

secret5

21

55

7

53

• 5 = 25

Page 188: Cryptography 101 (with math)

everyone else

secret5

21

55

7

53

• 5 = 25• 5 = 5

8

Page 189: Cryptography 101 (with math)

everyone else

secret5

21

55

7

53

• 5 = 25• 5 = 5

8

• = 557 10

Page 190: Cryptography 101 (with math)

everyone else

secret5

21

55

7

53

• 5 = 25• 5 = 5

8

• = 557 10

Page 191: Cryptography 101 (with math)

bob’s knowledge alice’s knowledge

everyone’s knowledge

5 57

5 21

53

5 21

Page 192: Cryptography 101 (with math)

encryption

1

alicebob

Page 193: Cryptography 101 (with math)

“secret”

Page 194: Cryptography 101 (with math)

“secret”s e c r e t

Page 195: Cryptography 101 (with math)

“secret”s e c r e t

01110011 01100101 01100011 01110010 01100101 01110100

Page 196: Cryptography 101 (with math)

521

Page 197: Cryptography 101 (with math)

521

476837158203125

Page 198: Cryptography 101 (with math)

521

476837158203125

11011000 11010111 00100110 10110111 00010111 01111010 1

Page 199: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

bob

Page 200: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

11011000 11010111 00100110 10110111 00010111 01111010 1

5

bob

21

Page 201: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

11011000 11010111 00100110 10110111 00010111 01111010 1

bob

Page 202: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

11011000 11010111 00100110 10110111 00010111 01111010

Page 203: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

xor11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 204: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

1

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 205: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

10

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 206: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

101

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 207: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

1010

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 208: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

10101

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 209: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

101010

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 210: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

1010101

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 211: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

10101011

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 212: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

10101011

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 213: Cryptography 101 (with math)

01110011 01100101 01100011 01110010 01100101 01110100

s e c r e t

10101011 10110010 01000101 11000101 01110010 00001010

11011000 11010111 00100110 10110111 00010111 01111010

bob

Page 214: Cryptography 101 (with math)

encryption!

Page 215: Cryptography 101 (with math)

alicebob 10101011 10110010 01000101 11000101 01110010 00001010

Page 216: Cryptography 101 (with math)

10101011 10110010 01000101 11000101 01110010 00001010

alice

Page 217: Cryptography 101 (with math)

10101011 10110010 01000101 11000101 01110010 00001010

alice

11011000 11010111 00100110 10110111 00010111 01111010

521

Page 218: Cryptography 101 (with math)

10101011 10110010 01000101 11000101 01110010 00001010

alice

11011000 11010111 00100110 10110111 00010111 01111010

xor

Page 219: Cryptography 101 (with math)

10101011 10110010 01000101 11000101 01110010 00001010

alice

11011000 11010111 00100110 10110111 00010111 01111010

01110011 01100101 01100011 01110010 01100101 01110100s e c r e t

Page 220: Cryptography 101 (with math)

decryption!

Page 221: Cryptography 101 (with math)

alicebob

Page 222: Cryptography 101 (with math)

alicebob

we did it!