Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

AkeServerSecret

function AkeServerSecret: tBytes;
Server-side anti-enumeration helpers. For an UNKNOWN user the server must still return a real-looking challenge, or the empty reply leaks that the user does not exist. A PRF-bytes "public key" is NOT usable - ML-KEM keys have structure and would fail to parse (a timing leak). So AkeDummyPwFile returns a STATIC, mathematically valid dummy KEM public key plus a DETERMINISTIC pseudo- salt = PRF(serverSecret, user) (stable per name, like a fixed real account). Encapsulation is randomised, so the dummy challenge is indistinguishable from a real one; the client's s2 simply will not match (login fails like a bad pw). AkeServerSecret is a process-wide random secret by default; call AkeSetServerSecret at startup to pin a stable one (keeps unknown-user salts stable across restarts). All three caches are thread-safe + lazy. NB: the dummy uses TsnifAkeParams.Default; if real users are provisioned with non-default Argon2 cost, set the same default for full indistinguishability.