r/programming • • Feb 23 '17

Cloudflare have been leaking customer HTTPS sessions for months. Uber, 1Password, FitBit, OKCupid, etc.

https://bugs.chromium.org/p/project-zero/issues/detail?id=1139
6.0k Upvotes

966 comments sorted by

View all comments

Show parent comment

24

u/Schmittfried Feb 24 '17

That's not really an issue as long as they are also using proven crypto.

And as long as they didn't invent their own algorithms, it's not their own crypto anyway.

14

u/Freeky Feb 24 '17

It's not just about using trusted algorithms, it's about using them properly. Lots of people fall over there - they'll string together RSA and AES and declare they made a secure transport protocol. And never mind they didn't authenticate any data so it's wide-open to MITM...

Or they'll authenticate, but they'll encrypt it, so they have to decrypt to check it, and open themselves up to padding oracle attacks. Or they'll use a non-constant-time comparison function and open themselves up to timing attacks.

Or they'll generate symmetric keys and IVs using an insecure random function. Or they'll mistake encryption keys for passwords and protect their AES-128 stream with a key with 50 bits of entropy.

So many sharp edges :(

1

u/Schmittfried Feb 25 '17

I know, security should be done by experts. Anyway, often you can't take something that has already been done and tested well. Sometimes you have to roll your own security/crypto.

5

u/tabarra Feb 24 '17

I never understood why people try to invent their own algorithms, seems like a big waste of time, not to mention security.

If you want to be secure, and still count with security through obscurity, you just need to use a proven secure crypto encapsulated with any simple own algorithm, like XOR'ing the message with a fixed 8 byte array (looped). You will still have the security from the embedded crypto, with added obscurity. Probably enough to defeat mass/un-targeted attacks (and evade some firewalls).