Expand description
Implementation code for pre-hashing our inputs.
We do this because we don’t actually want to record the entirety of each encrypted introduction request.
We aren’t terribly concerned about collision resistance: accidental collision don’t matter, since we are okay with a false-positive rate. Intentional collisions are also okay, since the only impact of generating one would be that you could make an introduce2 message of your own get rejected.
The impact of preimages is also not so bad. If somebody can reconstruct the
original message, they still get an encrypted object, and need the
KP_hss_ntor
key to do anything with it. A second preimage attack just
gives another message we won’t accept.
Functions§
- hash 🔒
- Compute a hash from a given bytestring.