Skip to main content

Module crypto

Module crypto 

Source
Expand description

Runtime cryptography helpers built on Solana syscalls and precompiles.

Structs§

ProcessedInstruction
ProcessedInstructionData

Constants§

ALT_BN128_FIELD_SIZE
ALT_BN128_G1_ADDITION_INPUT_SIZE
ALT_BN128_G1_ADD_BE
ALT_BN128_G1_ADD_LE
ALT_BN128_G1_COMPRESS_BE
ALT_BN128_G1_COMPRESS_LE
ALT_BN128_G1_DECOMPRESS_BE
ALT_BN128_G1_DECOMPRESS_LE
ALT_BN128_G1_MULTIPLICATION_INPUT_SIZE
ALT_BN128_G1_MUL_BE
ALT_BN128_G1_MUL_LE
ALT_BN128_G1_POINT_SIZE
ALT_BN128_G1_SUB_BE
ALT_BN128_G1_SUB_LE
ALT_BN128_G2_ADDITION_INPUT_SIZE
ALT_BN128_G2_ADD_BE
ALT_BN128_G2_ADD_LE
ALT_BN128_G2_COMPRESS_BE
ALT_BN128_G2_COMPRESS_LE
ALT_BN128_G2_DECOMPRESS_BE
ALT_BN128_G2_DECOMPRESS_LE
ALT_BN128_G2_MULTIPLICATION_INPUT_SIZE
ALT_BN128_G2_MUL_BE
ALT_BN128_G2_MUL_LE
ALT_BN128_G2_POINT_SIZE
ALT_BN128_G2_SUB_BE
ALT_BN128_G2_SUB_LE
ALT_BN128_LE_FLAG
ALT_BN128_PAIRING_BE
ALT_BN128_PAIRING_ELEMENT_SIZE
ALT_BN128_PAIRING_LE
CURVE25519_EDWARDS
CURVE25519_RISTRETTO
CURVE_GROUP_ADD
CURVE_GROUP_MUL
CURVE_GROUP_SUB
ED25519_PROGRAM_ID
MAX_HASH_SEGMENTS
MAX_INSTRUCTION_ACCOUNTS_BYTES
MAX_INSTRUCTION_DATA_LEN
MAX_POSEIDON_INPUTS
POSEIDON_BIG_ENDIAN
POSEIDON_BN254_X5
POSEIDON_INPUT_LEN
POSEIDON_LITTLE_ENDIAN
SECP256K1_PROGRAM_ID
SECP256R1_PROGRAM_ID
Secp256r1 (P-256) signature-verification precompile (SIMD-0075). This is the precompile passkey / WebAuthn flows verify against.

Functions§

blake3
blake3_single
curve25519_edwards_validate_point
curve_validate_point
get_processed_instruction
get_processed_instruction_data
get_stack_height
is_cpi
is_top_level
keccak256
keccak256_single
recover_ethereum_address
require_ed25519_instruction
require_ed25519_instruction_data
require_secp256k1_instruction
require_secp256r1_instruction
Require that a sibling instruction targeted the Secp256r1 (P-256) precompile, the verification path for passkeys / WebAuthn. Returns the precompile instruction so the caller can bind the verified (public_key, message, signature) to its own authorization logic.
require_secp256r1_instruction_data
Variant of require_secp256r1_instruction returning the bounded instruction-data form for callers that parse the precompile payload.
require_top_level
secp256k1_recover
sha256
sha256_single

Type Aliases§

AltBn128G1
AltBn128G2
AltBn128G1Compressed
AltBn128G2Compressed
AltBn128PairingResult
Blake3Hash
CurvePoint
CurveScalar
EthereumAddress
Keccak256Hash
PoseidonHash
Secp256k1Pubkey
Sha256Hash