-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nonces used for mask recovery are generated using hashes of a label, seed, and two optional indexes. The label is included using the `persona` field available in `Blake2b`, and the seed is of fixed length. However, the indexes are `usize` and encoded in a manner that is platform dependent. This means that mask recovery on a platform with a different pointer size than the prover will fail to produce the correct mask. This work updates to use a `u32` encoding, returning an error if the index exceeds this limit. This should never occur, given the typical range of indexes used. It adds tests and does some minor refactoring. Closes [issue 30](#30). BREAKING CHANGE: Changes the way that seed nonces are used in mask recovery. Existing range proofs will verify, but will fail to recover the correct mask.
- Loading branch information
1 parent
0b411ea
commit 394843f
Showing
2 changed files
with
39 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters