Expand description
Syscalls for the SP1 zkVM.
Documentation for these syscalls can be found in the zkVM entrypoint
sp1_zkvm::syscalls
module.
Modules§
Macros§
- Executes a block of code unconstrained by the VM. This macro is useful for running code that helps provide information to the program but does not need to be constrained by the VM. For example, running
ecrecover
is expensive in the VM but verifying a signature when you know the public key is not.unconstrained
can be used to provide the public key without spending VM CPU cycles.
Functions§
- Allocates a buffer aligned to the given alignment.
- Computes a big integer operation with a modulus.
- Executes a BLS12-381 curve addition on the given points.
- Decompresses a BLS12-381 point.
- Executes a BLS12-381 curve doubling on the given point.
- Executes a BLS12-381 Fp2 addition on the given inputs.
- Executes a BLS12-381 Fp2 multiplication on the given inputs.
- Executes a BLS12-381 Fp2 subtraction on the given inputs.
- Executes a BLS12-381 field addition on the given inputs.
- Executes a BLS12-381 field multiplication on the given inputs.
- Executes a BLS12-381 field subtraction on the given inputs.
- Executes a Bn254 curve addition on the given points.
- Executes a Bn254 curve doubling on the given point.
- Executes a BN254 Fp2 addition on the given inputs.
- Executes a BN254 Fp2 multiplication on the given inputs.
- Executes a BN254 Fp2 subtraction on the given inputs.
- Executes a BN254 field addition on the given inputs.
- Executes a BN254 field multiplication on the given inputs.
- Executes a BN254 field subtraction on the given inputs.
- Executes an Ed25519 curve addition on the given points.
- Executes an Ed25519 curve decompression on the given point.
- Enters unconstrained mode.
- Exits unconstrained mode.
- Halts the program with the given exit code.
- Returns the length of the next element in the hint stream.
- Reads the next element in the hint stream into the given buffer.
- Executes the Keccak-256 permutation on the given state.
- Reads the bytes from the given file descriptor into the given buffer.
- Executes an Sepc256k1 curve addition on the given points.
- Executes an Secp256k1 curve decompression on the given point.
- Executes an Secp256k1 curve doubling on the given point.
- Executes the SHA-256 compress operation on the given word array and a given state.
- Executes the SHA-256 extend operation on the given word array.
- Executes an uint256 multiplication on the given inputs.
- Defers the verification of a valid SP1 zkVM proof.
- Writes the bytes in the given buffer to the given file descriptor.