Skip to content

Commit

Permalink
Emphasize the fact that Hk is a keyed hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Oct 26, 2021
1 parent 25bdddd commit 2ab4c26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions secret-key_cryptography/encrypted-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ In that scenario, nonces can be constructed as follows:
`Hk(message_counter||len(ad)||ad||message)`, with `message_counter` having a
fixed length.
`Hk` is a secure PRF or a keyed hash function safe against length-extension
attacks, such as the one provided by `crypto_generichash()`.
`Hk` must be non-deterministic. It can a secure PRF or a *keyed* hash function
safe against length-extension attacks, such as the one provided by
`crypto_generichash()` with a non-null key.
`ad` is optional, additional data, and `len(ad)` represents its name encoded as a
fixed-length byte sequence.
Expand Down

0 comments on commit 2ab4c26

Please sign in to comment.