http://qs1969.pair.com?node_id=472563


in reply to Re^3: Eliminate server-side state to obviate cookies
in thread "omniscient debugging" for Perl

Why do you think it is so difficult?

All you need is a single secret on the server. Then you can compute a signature as the hash of the secret plus the outgoing state plus a random salt. The signature, salt, and state are emitted in the response. When a request comes in, verify its signature by comparing it to the hash of the server's secret plus the client's salt and state.

Easy as pie.

If you're paranoid, you can add timestamps, rotate secrets, and use public-key signatures, none of which makes the job much more difficult. And, even if you do consider it more difficult, why does it matter for the day-to-day web programmer? This stuff is part of the web-app framework and invisible to end programmers.

Cheers,
Tom

  • Comment on Re^4: Eliminate server-side state to obviate cookies