Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

PirHintDigest

function PirHintDigest(const aHint: tPirWordArray): tBytes;
The SHA-256 of a hint: cPirHintDigestLen octets over the hint's words taken little-endian, four octets a word, in index order and with nothing else fed in. An empty hint digests to an empty result rather than to the SHA-256 of no input, so that 'this client has no hint' cannot compare equal to anything a server computed. Both schemes use this one routine, which is why it lives here and not in each of them.

It is a mix-up detector and not a MAC: it is computed from public material, and it travels beside the answer rather than inside it.