Top Banner
Shared Secrets Keeping secrets on the web
45

Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Dec 16, 2015

Download

Documents

Tamsin Wheeler
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: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Shared SecretsKeeping secrets on the web

Page 2: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Encryption

• Goal : hidden in plain sight

Page 3: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Encryption

• Goal : hidden in plain sight– Internet is plain sight

Page 4: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Encryption

• Goal : hidden in plain sight– Internet is plain sight– Encryption is only form of privacy

Page 5: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Caesar Cipher

• Shift each letter in a message a certain amount:

Page 6: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Caesar Cipher

• Right shift of three:– Key: is +3

• Encrypted message:

Page 7: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Breaking a Cipher

• Guess and check

Page 8: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

XOR

• XOR with 0 = don't change

• XOR with 1 = changeIn0 In1 Out

1 0 1

1 1 0

In0 In1 Out

0 0 0

0 1 1

Page 9: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Binary Keys

• 1 or 0 with XOR = 1 bit encryption– 1 or 0 is key… 2 possibilities

Page 10: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Binary Keys

• 1 or 0 with XOR = 1 bit encryption– 1 or 0 is key… 2 possibilities

• For stronger key, need more bits:– 32 bit key = 4 billion possibilities

– Real encryption uses 128/256/512/1025/2048 bits!

Page 11: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Binary Keys

• XOR key with message to produce encrypted message

W i k i

??? Ä ý w

Page 12: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

• XOR key with encrypted message to reproduce message

??? Ä ý w

W i k i

More info:https://fr.khanacademy.org/math/applied-math/cryptography/ciphers/e/bitwise-operators

Binary Keys

Page 13: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Shared Keys

• Need to share a key

– How do we do it if someone is always listening?

Page 14: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Secret Colors• Deriving a secret color:

Page 15: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Secret Colors• Deriving a secret color:– Pick a public color

Page 16: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Secret Colors• Deriving a secret color:– Pick private colors

Page 17: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Secret Colors• Deriving a secret color:– Make public mixtures with private colors

Page 18: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Secret Colors• Deriving a secret color:– Mix other person's public with your private

Page 19: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Secret Colors• Eve can't reproduce color – too much red

Page 20: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Attempting with Math

• Not so secret…

Page 21: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Attempting with Math

• Not so secret…

Page 22: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

One Way Function

• One way function:– Can not be reversed

• Multiplication two wayx 7 = 42∙

Page 23: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Clock Math

http://www.shodor.org/interactivate/activities/ClockArithmetic/

Page 24: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Modulo

• Modulo ( mod or % )– Divide and keep remainder

• 14 mod 12 = 2• 8 mod 12 = 8• 19 mod 12 = 7• 24 mod 12 = 0• 26 mod 12 = 2

Page 25: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Calculating Mods

• Wolfram Alpha

Page 26: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

One Way Math

• Clock Math/Modulo is One Way

X mod 12 = 2 …what is X???

Page 27: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

One Way Math

• Clock Math/Modulo is One Way

X mod 12 = 2 …what is X???

• 14 mod 12 = 2• 26 mod 12 = 2• 38 mod 12 = 2• …

Page 28: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Hard Math

• Some problems are relatively slow to solve:– Factoring numbers– Taking logarithms

Page 29: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Hard Math

• Some problems are relatively slow to solve:– Factoring numbers– Taking logarithms

• Slow is good for encryption– Avoid brute force attacks

Page 30: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number

Page 31: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Pick two public numbers – clock size and base

Clock size: 11

Base : 2

Page 32: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Powers of 2 Mod 11

• Powers of 2 mod 11:

Mod 11 means 10possible valuesthen cycle…

Power of 2 Value Mod 11

1 2 2

2 4 4

3 8 8

4 16 5

5 32 10

6 64 9

7 128 7

8 256 3

9 512 6

10 1024 1

11 2048 2

12 4096 4

Page 33: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Powers of 2 Mod 4

• Powers of 2 mod 4:

Prime clock sizes

work better…

Power of 2 Value Mod 4

1 2 2

2 4 0

3 8 0

4 16 0

5 32 0

6 64 0

7 128 0

8 256 0

9 512 0

10 1024 0

11 2048 0

12 4096 0

Page 34: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Pick two public numbers – clock size and base

Clock size: 11

Base : 2

Page 35: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Pick private numbers

Page 36: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Calculate public-private numbers…

Page 37: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Public Private Number

• Public Private Number:

• Given base = 2, clocksize = 11, private number = 8:

Page 38: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Calculate public-private numbers

Page 39: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Use other ppn as base to calculate shared secret

Page 40: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Shared Secret Number

• Shared Secret Number:ss

• Given private number = 8, clocksize = 11, other ppn = 6:

Page 41: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Diffie Hellman

• Derive a secret number– Use other ppn as base to calculate shared secret

Page 42: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Sue's dilemma

• Sue knows:2x mod 11 = 62y mod 11 = 36y mod 11 = ssn3x mod 11 = ssn

Where y = your private number

And x = Arnolds

Page 43: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Sue's dilemma

• Sue knows:2x mod 11 = 62y mod 11 = 36y mod 11 = ssn3x mod 11 = ssn

• Mod is one way – must guess and check

Page 44: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

Sue's dilemma

• Sue knows:2x mod 11 = 62y mod 11 = 36y mod 11 = ssn3x mod 11 = ssn

• Solving for x or y involves logarithms – very slow for computers

Page 45: Shared Secrets Keeping secrets on the web. Encryption Goal : hidden in plain sight.

What is our secret?• Calculate our shared secret:

clock size = 13, base = 4

Then go to: faculty.chemeketa.edu/ascholer/SSN.html

Your Private Number:

8My Private Number:

??

Your PPN:48 mod 13 =

3My PPN:4?? mod 13 =

10

SSN = (myPPN)(your private number) mod (clock size)