I guess you could send out a unique session key with the page, have the JS run AES or similar.<p>Wait, stop, crypotime.<p>I'm appear to be trying to design a protocol for secret exchange. I should just go and do some reading instead.<p>Do you know if there's any value in http digest auth these days? It's deployed in http clients (but only with md5 algo?) and I think it requires the server to store single-hash-of (salt,realm,pw) which you've eloquently pointed out in the past is a bad idea (single-hash of pw is vulnerable to bruteforce since hashes are fast).<p>My current thinking is that http basic auth over ssl would be preferred to http digest (as an auth method widely, natively supported by http clients), since it avoids pw in plaintext and allows server to store stronger hash (e.g. stretched sha-256, bcrypt) for pw.