Expand description
Digital-signature HLS mechanisms.
Mechanism 7 (ECDSA) is provided here over the security-suite curves — P-256
for suite 1 and P-384 for suite 2 — hashing with SHA-256 / SHA-384 as the
suites specify (IEC 62056-5-3 Table 32). Mechanism 10 (GOST 34.10-2018-256)
is in super::gost3410.
During the HLS handshake the message is SystemTitle-a ‖ SystemTitle-b ‖ challenge_a ‖ challenge_b; the signer uses its private key and the verifier
the peer’s public key. Public keys may be given either as a raw x ‖ y
point or in SEC1 form (with the 0x04 prefix).
Enums§
- Sign
Error - Errors from signing or verifying.
Functions§
- coord_
len 🔒 - Coordinate length (octets) of the suite’s curve, or
Noneif the suite has no ECDSA curve. - ecdsa_
sign - Signs
messagewith an ECDSA private key (raw scalar) on the suite’s curve, returning the fixed-sizer ‖ ssignature (64 octets for P-256, 96 for P-384). Signing is deterministic (RFC 6979). - ecdsa_
verify - Verifies an ECDSA
r ‖ ssignature overmessagewith a public key (rawx ‖ yor SEC1) on the suite’s curve. - to_sec1 🔒
- Normalizes a public key to SEC1 uncompressed form (
0x04 ‖ x ‖ y).