Module yubihsm::command::sign_ecdsa [−][src]
Compute an ECDSA signature with the given key ID.
https://developers.yubico.com/YubiHSM2/Commands/Sign_Data_Ecdsa.html
secp256k1 notes
The YubiHSM2 does not produce signatures in "low S" form, which is expected for most cryptocurrency applications (the typical use case for secp256k1).
If your application demands this (e.g. Bitcoin), you'll need to normalize
the signatures. One option for this is the secp256k1
crate's
Signature::normalize_s function.
The signatory-yubihsm crate automatically normalizes secp256k1 ECDSA signatures to "low S" form. Consider using that if you'd like a ready-made solution for cryptocurrency applications.
Structs
ECDSASignature |
ECDSA signatures (ASN.1 DER encoded) |
Functions
sign_ecdsa_raw_digest |
Compute an ECDSA signature of the given raw digest (i.e. a precomputed SHA-256 digest) |
sign_ecdsa_sha256 |
Compute an ECDSA signature of the SHA-256 hash of the given data with the given key ID |