-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ecdsa: refactor
Signature
constructors and improve docs
Implements `from_bytes` in terms of `from_scalars`, rather than the other way around. This places the logic for checking that `r` and `s` are nonzero inside of the `from_scalars` method. Additionally improves the documentation to note the various failure cases, i.e. if `r` and/or `s` is out of the range `1..n`, where `n` is the scalar modulus.
- Loading branch information
Showing
1 changed file
with
30 additions
and
13 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