Skip to main content

Module ecdsa

Module ecdsa 

Source
Expand description

ECDSA signing / verifying primitives (FIPS 186-5) with deterministic nonces (RFC 6979).

This module hosts the LIMBS-generic internals that implement the per-curve ECDSA (and ECDH) operations. The user-facing API – the Curve trait and the per-curve unit structs (P256, P384, …) lives in super::curves.

The Signature type + DER encoding also lives here because it is ECDSA-specific (ECDH has no signature value).

Structs§

Signature
ECDSA signature (r, s) as big-endian byte arrays.

Functions§

compress_pubkey
SEC1 compress: encode a public key as 0x02 || X (y even) or 0x03 || X (y odd).
decompress_pubkey
SEC1 decompress: take a 0x02/0x03 || X encoding and return the 0x04 || X || Y uncompressed form, recovering Y via field_sqrt_p3mod4.