Expand description
Low-level ECDSA primitives.
Security️ Warning: Hazardous Materials!
YOU PROBABLY DON’T WANT TO USE THESE!
These primitives are easy-to-misuse low-level interfaces.
If you are an end user / non-expert in cryptography, do not use these! Failure to use them correctly can lead to catastrophic failures including FULL PRIVATE KEY RECOVERY!
Functions§
- bytes2scalar 🔒
- Convert the provided bytestring into a
Scalarfor the given curve, interpreting it as big endian, zero-padding or truncating it to the bit length ofn(curve order) if necessary, and then reducing it modn. - sign_
prehashed - Sign a prehashed message digest using the provided secret scalar and ephemeral scalar, returning an ECDSA signature.
- sign_
prehashed_ rfc6979 - Try to sign the given message digest deterministically using the method
described in RFC6979 for computing ECDSA ephemeral scalar
k. - verify_
prehashed - Verify the prehashed message against the provided ECDSA signature.