Expand description
Koblitz sect283k1 Elliptic Curve Primitives
This module implements the sect283k1 binary elliptic curve operations. The curve equation is y² + xy = x³ + 1 over the binary field GF(2^283).
- Field polynomial: x^283 + x^12 + x^7 + x^5 + 1
- The curve order n = 0x01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE96E404282DD3232283E52623152F256011
Operations are designed to be constant-time.
Structs§
- Field
Element - A field element in GF(2^283) represented by 5 u64 limbs (320 bits).
- Point
- A point on the sect283k1 elliptic curve
- Scalar
- sect283k1 scalar value for use in elliptic curve operations
Enums§
- Point
Format - Format of a serialized elliptic curve point
Constants§
- B283K_
FIELD_ ELEMENT_ SIZE - Size of a sect283k1 field element in bytes (283 bits -> 36 bytes)
- B283K_
KEM_ SHARED_ SECRET_ KDF_ OUTPUT_ SIZE - Size of the KDF output for sect283k1 ECDH-KEM (matches SHA-384 output)
- B283K_
POINT_ COMPRESSED_ SIZE - Size of a compressed sect283k1 point in bytes: format byte (0x02/0x03) + x-coordinate
- B283K_
POINT_ UNCOMPRESSED_ SIZE - Size of an uncompressed sect283k1 point in bytes: format byte (0x04) + x-coordinate + y-coordinate
- B283K_
SCALAR_ SIZE - Size of a sect283k1 scalar in bytes (283 bits -> 36 bytes)
Functions§
- base_
point_ g - Get the standard base point G of the sect283k1 curve
- generate_
keypair - Generate a cryptographically secure ECDH keypair
- kdf_
hkdf_ sha384_ for_ ecdh_ kem - Key derivation function for ECDH shared secret using HKDF-SHA384
- scalar_
mult - General scalar multiplication: compute scalar * point
- scalar_
mult_ base_ g - Scalar multiplication with the base point: scalar * G