by ksri · 9y ago · 0 comments
>> random tokens do rely on cryptography
True. Random tokens do need a cryptographically strong PRNG. But when I wrote no cryptography, I meant there is no encryption or signatures. The token is used as a key to a server side data structure.
>> Signing and encryption are conceptually different ideas, don't mix them
Not sure where I mixed them? A stateless session cookie can be signed or it can be encrypted - both are valid. A signed cookie would let clients see the contents, but wouldn't let them modify it. An encrypted cookie would make it opaque to the clients.
The server stores the public cert from all clients and uses it to authenticate at the transport layer. No shared secrets either.