shared secrets keeping secrets on the web. encryption goal : hidden in plain sight
TRANSCRIPT
Encryption
• Goal : hidden in plain sight– Internet is plain sight– Encryption is only form of privacy
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
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!
• 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
Clock Math
http://www.shodor.org/interactivate/activities/ClockArithmetic/
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
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• …
Hard Math
• Some problems are relatively slow to solve:– Factoring numbers– Taking logarithms
• Slow is good for encryption– Avoid brute force attacks
Diffie Hellman
• Derive a secret number– Pick two public numbers – clock size and base
Clock size: 11
Base : 2
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
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
Diffie Hellman
• Derive a secret number– Pick two public numbers – clock size and base
Clock size: 11
Base : 2
Public Private Number
• Public Private Number:
• Given base = 2, clocksize = 11, private number = 8:
Shared Secret Number
• Shared Secret Number:ss
• Given private number = 8, clocksize = 11, other ppn = 6:
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
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
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