Computer Science 161 Fall 2016 Popa and Weaver
Applied Cryptography Applied Craptography Network Security
1
Applied Cryptography Applied Craptography Network Security 1 Meme - - PowerPoint PPT Presentation
Computer Science 161 Fall 2016 Popa and Weaver Applied Cryptography Applied Craptography Network Security 1 Meme of the Day Computer Science 161 Fall 2016 Popa and Weaver 2 Outline Computer Science 161 Fall 2016 Popa and Weaver
Computer Science 161 Fall 2016 Popa and Weaver
1
Computer Science 161 Fall 2016 Popa and Weaver
2
Computer Science 161 Fall 2016 Popa and Weaver
3
Computer Science 161 Fall 2016 Popa and Weaver
MAC
encryption
cryptographic hash
4
function hmac (key, message) { if (length(key) > blocksize) { key = hash(key) } while (length(key) < blocksize) { key = key || 0x00 }
i_key_pad = 0x3636... ⊕ key return hash(o_key_pad || hash(i_key_pad || message)) }
Computer Science 161 Fall 2016 Popa and Weaver
to be different
message and the HMAC and it would still be a valid HMAC for the key
the start makes it easier to capture intermediate HMACs
underlying hash is a PRF
5
function hmac (key, message) { if (length(key) > blocksize) { key = hash(key) } while (length(key) < blocksize) { key = key || 0x00 }
i_key_pad = 0x3636... ⊕ key return hash(o_key_pad || hash(i_key_pad || message)) }
Computer Science 161 Fall 2016 Popa and Weaver
properties
6
Computer Science 161 Fall 2016 Popa and Weaver
abuser and "Bailey" as the victim through the rest of this example
Terms of Service
7
Computer Science 161 Fall 2016 Popa and Weaver
8
Computer Science 161 Fall 2016 Popa and Weaver
9
Alex Bailey What Is Bailey's Public Key?
Computer Science 161 Fall 2016 Popa and Weaver
probability of being caught
10
Computer Science 161 Fall 2016 Popa and Weaver
11
Alex Bailey
{message=E(Kpub_b, M={"Hey Bailey I'm going to say something abusive", krand}), mac=HMAC(krand, M), to=Bailey} {message=E(Kpub_b, M={"Hey Bailey I'm going to say something abusive", krand}), mac=HMAC(krand, M), to=Bailey, from=Alex, time=now, fbmac=HMAC(Kfb,{mac, from, to, time})}
Computer Science 161 Fall 2016 Popa and Weaver
Everything else can be discarded
never verified it
12
Computer Science 161 Fall 2016 Popa and Weaver
13
Alex Bailey
{Abuse{ M={"Hey Bailey I'm going to say something abusive", krand}}, mac=HMAC(krand, M), to=Bailey, from=Alex, time=now, fbmac=HMAC(Kfb,{mac, from, to, time})}
Computer Science 161 Fall 2016 Popa and Weaver
Bailey
14
Computer Science 161 Fall 2016 Popa and Weaver
15
Computer Science 161 Fall 2016 Popa and Weaver
activity measured at very fine time scales
by a HD video camera which views the lamps through a rotating prism
16
Computer Science 161 Fall 2016 Popa and Weaver
A single flip of a coin is 1 bit of entropy
entropy sources (maxed out by the # of bits in the hash function itself)
17
Computer Science 161 Fall 2016 Popa and Weaver
entropy
18
Computer Science 161 Fall 2016 Popa and Weaver
pRNG
was at T-1
the pRNG at time T-1, the attacker should not be able to distinguish between the two
values but which an attacker might see
19
Computer Science 161 Fall 2016 Popa and Weaver
20
Computer Science 161 Fall 2016 Popa and Weaver
state
You've reversed the hash function!
don't know old K: You've distinguished HMAC from a random function
21
function hmac_drbg_generate (state, n) { tmp = "" while(len(tmp) < N){ state.v = hmac(state.k,state.v) tmp = tmp || state.v } // Update state w no input state.k = hmac(state.k, state.v || 0x00) state.v = hmac(state.k, state.v) // Return the first N bits of tmp return tmp[0:N] }
Computer Science 161 Fall 2016 Popa and Weaver
the new k
22
function hmac_drbg_update (state, input) { state.k = hmac(state.k, state.v || 0x00 || input) state.v = hmac(state.k, state.v) state.k = hmac(state.k, state.v || 0x01 || input) state.v = hmac(state.k, state.v) }
Computer Science 161 Fall 2016 Popa and Weaver
23
Computer Science 161 Fall 2016 Popa and Weaver
no way for the buyers to know
1999/0215.html#snakeoil
24
Computer Science 161 Fall 2016 Popa and Weaver
curves, plus the DJB curves and cyphers (ChaCha20)
be decryptable by an adversary 40 years from now!
25
Computer Science 161 Fall 2016 Popa and Weaver
RSA/DH public key
Combine it with a conventional public key algorithm
With thumbtacks and iron filings." Matthew D Green
Odd ingredients; strange recipe; probably not tasty; may explode oven. :)" Alyssa Rowan
26
Computer Science 161 Fall 2016 Popa and Weaver
27
Computer Science 161 Fall 2016 Popa and Weaver
somebody else who doesn't have the same keys?
rekeying frequently is a good idea
28
Computer Science 161 Fall 2016 Popa and Weaver
If I can get someone's private key I can decrypt all their old messages
29
Computer Science 161 Fall 2016 Popa and Weaver
30
Computer Science 161 Fall 2016 Popa and Weaver
anything
instead provided a wrapper in the project
31
Computer Science 161 Fall 2016 Popa and Weaver
It contained a special key LV0 used to decrypt the firmware
sunk...
32
From XKCD
Computer Science 161 Fall 2016 Popa and Weaver
how OpenSSL seeds random numbers
reading uninitialized memory
ID
keys
Internet
33
http://blog.dieweltistgarnichtso.net/Caprica,-2-years-ago
Computer Science 161 Fall 2016 Popa and Weaver
generator, regardless of the internal state
You could distinguish the upper bits from random!
34
Computer Science 161 Fall 2016 Popa and Weaver
a Crypto talk given by Microsoft people...
35
Computer Science 161 Fall 2016 Popa and Weaver
36
Computer Science 161 Fall 2016 Popa and Weaver
Lets just hack Juniper and rekey the lock!"
37
Computer Science 161 Fall 2016 Popa and Weaver
38
Computer Science 161 Fall 2016 Popa and Weaver
communication: A backdoor here would be absolutely unacceptable
39
Computer Science 161 Fall 2016 Popa and Weaver
and secure out of it
together
40
Computer Science 161 Fall 2016 Popa and Weaver
41
Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Political Layer Application Layer