Skip to main content

Module p256

Module p256 

Source

Structs§

PrivateKey
P-256 (secp256r1) ECDSA private key.
PublicKey
P-256 (secp256r1) ECDSA public key.

Constants§

ECDH_SHARED_SECRET_SIZE
Size of the raw ECDH shared secret in bytes (32 bytes). Must not be used directly as an encryption key; apply a KDF first.
PRIVATE_KEY_SIZE
Size of a P-256 private key in bytes (32 bytes).
PUBLIC_KEY_COMPRESSED_SIZE
Size of a compressed P-256 public key in bytes (33 bytes, includes 0x02/0x03 prefix).
PUBLIC_KEY_UNCOMPRESSED_SIZE
Size of an uncompressed P-256 public key in bytes (65 bytes, includes 0x04 prefix).
SIGNATURE_SIZE
Size of a P-256 ECDSA signature in bytes (64 bytes, r || s).

Functions§

ecdh
is_valid_public_key