Skip to main content

Module ecdsa_backend

Module ecdsa_backend 

Source
Expand description

ECDSA backend — signing with NIST P-256 (default), brainpoolP256r1, brainpoolP384r1 and NIST P-384 keys (the curves of the IEEE 1609.2 PublicVerificationKey choices) and verification on the same curves.

Uses the p256 + ecdsa crates. Keys are stored in an in-memory map keyed by sequential integer identifiers, mirroring the Python PythonECDSABackend.

All public-key and signature representations use the IEEE 1609.2 / security_asn types so they can be embedded directly into certificates and signed messages without conversion.

Structs§

EcdsaBackend
ECDSA backend managing own key pairs.

Enums§

KeyAlgorithm
Curve of an own key pair (an IEEE 1609.2 PublicVerificationKey curve).

Functions§

key_uses_sha384
Hash used with a verification key: SHA-384 for the 384-bit curves, SHA-256 otherwise (IEEE 1609.2 clause 5.3.1).
reconstruct_public_key
ECQV public key extraction (SEC 4 v1.0 section 3.5, as profiled by IEEE Std 1609.2-2016 clause 5.3.2): Q_U = e * P_U + Q_CA on the curve of the issuer key (NIST P-256 or brainpoolP256r1). e is the big-endian integer hash of the implicit certificate (Certificate::implicit_hash_integer).