3 ms·
"Goofy" cryptographic tokens? Is there a better way?
by ScottBurson 14y ago
"Goofy" cryptographic tokens? Is there a better way?
- tptacek 14y agoNot having the tokens be replayable, rewritable to different user IDs, or decryptable would be a good start, right? Yes: the better approach is to have the token be a 256 bit cryptographically strong random number that corresponds to a row in the database with metadata sufficient to expire the token and invalidate it on password reset.
- ScottBurson 14y agoAh. So it's not the use of cryptographic tokens per se that you're objecting to -- just that they're not generated and/or handled correctly.
- tptacek 14y agoI object in general to the widespread practice of using tokens that contain semantically interesting information protected by encryption.
- ScottBurson 14y agoGot it. Didn't realize that was so widespread.
- ontoillogical 14y agoYou'd be surprised to know how often it's just the username encoded in base64...