Crate solana_secp256r1_program

Source
Expand description

Instructions for the [secp256r1 native program][np]. [np]: https://docs.solana.com/developing/runtime-facilities/programs#secp256r1-program

Note on Signature Malleability: This precompile requires low-S values in signatures (s <= half_curve_order) to prevent signature malleability. Signature malleability means that for a valid signature (r,s), (r, order-s) is also valid for the same message and public key.

This property can be problematic for developers who assume each signature is unique. Without enforcing low-S values, the same message and key can produce two different valid signatures, potentially breaking replay protection schemes that rely on signature uniqueness.

Structs§

Secp256r1SignatureOffsets

Constants§

COMPRESSED_PUBKEY_SERIALIZED_SIZE
DATA_START
ID
The const program ID.
SECP256R1_ORDER
SECP256R1_ORDER_MINUS_ONE
SIGNATURE_OFFSETS_SERIALIZED_SIZE
SIGNATURE_OFFSETS_START
SIGNATURE_SERIALIZED_SIZE

Functions§

check_id
Returns true if given pubkey is the program ID.
id
Returns the program ID.
new_secp256r1_instruction
verify