Skip to main content

Module p521

Module p521 

Source
Expand description

P-521 (secp521r1) ECDSA and ECDH.

See SecretKey and PublicKey for the signing, verification and key agreement APIs.

Structs§

PublicKey
P-521 (secp521r1) ECDSA public key.
SecretKey
P-521 (secp521r1) ECDSA secret key.

Constants§

ECDH_SHARED_SECRET_SIZE
Size of the raw ECDH shared secret in bytes (66 bytes). Must not be used directly as an encryption key; apply a KDF first.
PUBLIC_KEY_COMPRESSED_SIZE
Size of a compressed P-521 public key in bytes (67 bytes, includes 0x02/0x03 prefix).
PUBLIC_KEY_UNCOMPRESSED_SIZE
Size of an uncompressed P-521 public key in bytes (133 bytes, includes 0x04 prefix).
SECRET_KEY_SIZE
Size of a P-521 secret key in bytes (66 bytes).
SIGNATURE_SIZE
Size of a P-521 ECDSA signature in bytes (132 bytes, r || s).

Functions§

is_valid_public_key
Returns true when public_key is a valid SEC1 encoding of a point on the P-521 curve.