49
Web crypto karl von randow

Web Crypto

Embed Size (px)

DESCRIPTION

Karl von Randow's talk on Web Crypto for Auckland Web Dev Nights on the 9th of May 2013. http://webdevnights.github.io

Citation preview

Page 1: Web Crypto

Web cryptokarl von randow

Page 2: Web Crypto

I felt sorry for this theme

Page 3: Web Crypto
Page 4: Web Crypto

What’s wrong with plain text?

Page 5: Web Crypto

What’s wrong with MD5?

Page 6: Web Crypto

It’s been CRACKED

It has lots of vulnerabilities since 1996.

Really bad since 2008.

Page 7: Web Crypto

What’s wrong with SHA1?

Page 8: Web Crypto

It’s been CROAKED

Actually it’s just a bit vulnerable maybe.

Page 9: Web Crypto

What about salt?

Effective against rainbow tables

Page 10: Web Crypto
Page 11: Web Crypto

So salt is okay

But not against the other collision attacks

Page 12: Web Crypto

PBKDF2

• Password-Based Key Derivation Function 2

• Easy to remember acronym

• It’s a standard

Page 13: Web Crypto

• Salted - hurts rainbow tables

• Repeats a hash lots of times - key stretching

• Adjustable difficulty

Page 14: Web Crypto

Can be implemented with a small circuit and very little

RAM

Uh oh

Page 15: Web Crypto
Page 16: Web Crypto
Page 17: Web Crypto

bcrypt

• Everything PBKDF2 has (except it’s not a standard)

• Aims to be slow

• Been around for ages and unbroken

Page 18: Web Crypto

• A bit of a pain when converting plain text passwords in the database as it takes a while

Page 19: Web Crypto
Page 20: Web Crypto

What about FPGAs?

Page 21: Web Crypto
Page 22: Web Crypto

Oh

Page 23: Web Crypto

What about scrypt?

Page 24: Web Crypto
Page 25: Web Crypto

scrypt

• Like bcrypt but uses more RAM

• Really new (2009)

Page 26: Web Crypto
Page 27: Web Crypto

Migrating from existing

• Plain text - batch convert

• PostgreSQL contrib package

• Hashed - convert on successful login

Page 28: Web Crypto

Hashes in APIsSignature algorithms

Page 29: Web Crypto

2009

• MD5 length extension hack demonstrated on Flickr API(and others)

Page 30: Web Crypto
Page 31: Web Crypto

• Hashes are not good for signing

Page 32: Web Crypto

Use the right tool for the job

Page 33: Web Crypto

HMAC

• Hash-based message authentication code

• HMAC-SHA1

• Uses a secret key

Page 34: Web Crypto

• Substantially less affected by collisions

• No known extension attacks

Page 35: Web Crypto

What about SSL?

Page 36: Web Crypto

SSL

• Privacy in between

• Only secure when both parties have a vested interest in security

Page 37: Web Crypto
Page 38: Web Crypto
Page 39: Web Crypto
Page 40: Web Crypto

• If you control the client

• Tell system to trust a new CA

• Man-in-the-middle

Page 41: Web Crypto
Page 42: Web Crypto

• Doesn’t protect your API from being tinkered with or disclosed

Page 43: Web Crypto

Only $50

Page 44: Web Crypto

i have seen that yours is the shittest software ever

#@%! your mothers

Page 45: Web Crypto

“CWP was pivotal in helping me crack an https encrypted API for an iPhone

application. Thankfully, that was their only method of securing the data, because it

lead to me bringing online stats for a cult-classic video game called SSX... So, I just

wanted to say thanks!”

Page 46: Web Crypto

“... after seeing the URLs were GET requests with username and passwords, I

figured this was going to be VERY EASY.  I actually did it all during the 30 minute trial of the program. (that reminds me, I should

buy a license because it was so awesome).”

Justin J.N.

Page 47: Web Crypto

Thanks Sir JBall

for the sweet vector illustrations. They really

cleared things up.

Page 48: Web Crypto

What about validating the certificate?

Page 49: Web Crypto

bcrypt & HMAC-SHA1

SSL for privacy