Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love the narrative account. Making a point dramatically is great and a pseudo-mystery story is great way to talk about encryption.

The narrative is right that AES is a wrong solution.

But really, any encryption at all is a wrong, bass-ackwards solution to keeping the user from modifying their account information.

A single cookie or argument that's a randomly generated user id with all the information server-side is much better.

I mean, consider any scenario where you pass the user data you'll later use. Will you not keep track of that data yourself but expect that the user's encrypted cookie will do it for you? This is one way of simulating statefulness in the stateless http protocol but it's a clearly an inferior, dumshit of doing it and it doesn't matter what encryption you use for the purpose. Giving someone encrypted information they can't use is essentially analogous to copy-protection and similar unwinnable scenarios whereas the unique id approach is pretty much the standard and works well for many, many apps of all sorts.

Having unique user-ids and user-information is only costly in terms of accessing the information. But there isn't a point where decrypting information coming from the user becomes less costly than getting it from the database. Indeed, the higher the traffic, the more different brute-force attacks make sense.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: