Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

22
Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas

Transcript of Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Page 1: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Auth for Encrypted Services with Server Side APT

Steve “Sc00bz” Thomas

Page 2: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Who is This Talk For?

Page 3: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Where are the Keys?

• “Brain wallet”• “Key file”• “Key service”

Page 4: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Pre-Authentication

• Run the PW-KDF once

• Generate two keys– Authentication key– Encryption key

• Caveat– PBKDF2

Page 5: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Crypho (Fixed)

• Send 6 digit 2FA

• Receive password encrypted private key

Page 6: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

ProtonMail

• Two passwords– Authentication sent to the server as is– Decrypt PGP key

• Most users will use the same password

Page 7: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Mega

• KDF is “Do stupid shit with AES 65536 times”• Auth key is encrypt email 16384 times with

password key

Page 8: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Nigori (Google Sync)

Page 9: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Crypton

Page 10: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

PAKE

• Password Authenticated Key Exchange– Diffie-Hellman– Eve and Mallory proof

Page 11: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Client-Server

ClientauthKey || pwKey = PW-KDF(...)sKey = PAKE(authKey)

encMK = decrypt(sKey, packet)MK = decrypt(pwKey, encMK)

Server

sKey = PAKE(serverData)packet = encrypt(sKey, encMK)

authKey Used for authenticationpwKey Decrypts the encrypted master keysKey Session encryption keyencMK The encrypted master keyMK The master key

Page 12: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Server-HSM

Server

encData = DB.find(user)

HSM

encMK, serverData = decrypt(hsmKey, encData)

sKey = PAKE(serverData)

packet = encrypt(sKey, encMK)

hsmKey Encryption key stored on the HSMsKey Session encryption keyencMK The encrypted master key

Page 13: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Server-HSM

Server

encData = DB.find(user)

 

Encrypt packets with sKey2

HSM

encMK, serverData = decrypt(hsmKey, encData)

sKey = PAKE(serverData)

packet = encrypt(sKey, encMK)

sKey2 = KDF(sKey)

hsmKey Encryption key stored on the HSMsKey Session encryption keysKey2 Server-client session keyencMK The encrypted master key

Page 14: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Change Password

fall2014

winter14

spring15

summer15

Page 15: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

New User

Page 16: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

I Can Has 2FA?

Page 17: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

I Can Has 2FA

• Time based• Challenge response• No counters

Page 18: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

U2F

• Tracking• Poor multi token

support• 10 second window• User presents

Page 19: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

U2F

• BUT it’s the best we got

Page 20: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

TeensyGap

Page 21: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

TeensyGap-ed Raspberry Pi

Page 22: Auth for Encrypted Services with Server Side APT Steve “Sc00bz” Thomas.

Questions?

• Twitter: @Sc00bzT• GitHub: Sc00bz• Site: tobtu.com