Skip to content

Commit

Permalink
Reword part of the Implementation Considerations
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-lucas6 committed Sep 21, 2024
1 parent 607739a commit 3900e7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion draft-lucas-bkdf.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ There are several ways to optimise the pseudocode, which is written for readabil
- Instead of `x % spaceCost`, one can do `x & (spaceCost - 1)` because `spaceCost` is a power of 2.
- Skip the XORing of outputs when `parallelism = 1`.
- Instead of `Ceiling(length / HASH_LEN)`, one can do `(length + HASH_LEN - 1) / HASH_LEN`.
- Convert the key derivation domain separation string to bytes once rather than in each iteration of the loop.
- Convert constants/unchanging values to bytes once rather than in each loop iteration or in multiple loops.
- Use an incremental hash function API rather than manual concatenation.
- If possible with the hash function API, cache the hash function state after processing the key so it does not need to be processed again.

Expand Down

0 comments on commit 3900e7c

Please sign in to comment.