-
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.
fix: avoids copying in the commit method (#12)
The PR improves `PedersenGens::commit` method: - [x] Internal copying: avoid copying values inside the method (use iters) - [x] External copying: avoid copying on calls (support `AsRef<Scalar>` args) UPD: The `Borrow` trait used (instead of `AsRef`), because it's the requirement of the [`multiscalar_mul`][1] method in the `curve25519-dalek` crate. [1]: https://github.com/dalek-cryptography/curve25519-dalek/blob/0d49dfacf66bed4b41e445d0e6942b3c27f3b263/src/traits.rs#L114 * fix: avoids copying in the commit method * fix: allow to borrow items as Scalar * fix: expect a reference to a value * fix: tests for PedersenGens * fix: benchmarks for PedersenGens
- Loading branch information
1 parent
c4dffb2
commit ab4c432
Showing
5 changed files
with
14 additions
and
20 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
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
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