Timeline for Is a simple random+hmac session cookie breakable?
Current License: CC BY-SA 4.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 13, 2021 at 0:35 | answer | added | tixih22247 | timeline score: 1 | |
May 27, 2021 at 9:55 | history | edited | capr | CC BY-SA 4.0 |
added 8 characters in body
|
May 26, 2021 at 14:43 | answer | added | AardvarkSoup | timeline score: 1 | |
May 26, 2021 at 11:41 | vote | accept | capr | ||
May 26, 2021 at 11:36 | history | edited | capr | CC BY-SA 4.0 |
added 84 characters in body
|
May 26, 2021 at 11:18 | history | edited | capr | CC BY-SA 4.0 |
added 607 characters in body
|
May 26, 2021 at 10:58 | history | edited | capr | CC BY-SA 4.0 |
added 85 characters in body
|
May 23, 2021 at 4:29 | answer | added | brynk | timeline score: 1 | |
May 22, 2021 at 23:27 | comment | added | capr |
@brynk replacing it with get_secure_random(32) would require a CSPRNG and I don't have one readily available (one more dependency), while a PRNG is standard in any language, and secondly, I couldn't validate the cookie without a session database.
|
|
May 22, 2021 at 23:25 | comment | added | capr | @brynk I elaborated a little on the stateless authentication part. So the idea is that you can validate the cookie without having to use a session database, it's not about the cookie holding additional data. | |
May 22, 2021 at 23:23 | history | edited | capr | CC BY-SA 4.0 |
added 183 characters in body
|
May 22, 2021 at 20:23 | comment | added | brynk |
As described, I don't see how your scheme couldn't be replaced with sessid = get_secure_random(32) ? Stateless implies the client is holding additional session metadata, or that this is the key to some stored state. Please feel free to edit your answer/ elaborate. From an 'is this breakable' perspective: it apparently rests on the entropy introduced by static_secret . See: auth0.com/docs/tokens and csrc.nist.gov/publications/detail/sp/800-90a/rev-1/final
|
|
May 22, 2021 at 10:46 | comment | added | capr | @multithr3at3d because if this is secure, then I don't have to use a library, and because the purpose of the question is to try to understand something and using a library would not help me with that (plus I'd need to understand how that library works as well, so I'd be in the same spot). | |
May 22, 2021 at 10:21 | comment | added | capr |
@brynk Thanks for the comment. I don't know how you could do that, but even if say you could find a way to determine the server uptime down to the millisecond, at best you'll be able to figure out the sequence of ids from the beginning up to any number, in which case the scheme becomes equivalent to hmac_sha256(auto_increment_number, static_secret) , which I think it's just as secure, except for the minor information leak of knowing how many sessions were generated before yours. Besides, you can always just hmac the seed with the same secret.
|
|
May 22, 2021 at 3:53 | comment | added | multithr3at3d | Why not use a library/framework that implements this? | |
May 21, 2021 at 20:13 | comment | added | brynk | maybe you can find a way of determing server uptime? | |
May 20, 2021 at 23:40 | review | First posts | |||
May 21, 2021 at 0:03 | |||||
May 20, 2021 at 23:34 | history | asked | capr | CC BY-SA 4.0 |