Expand description
§airbender-crypto

Documentation: API docs | Crypto guide
[!WARNING] airbender-platform project is under active development and is in alpha state. Use at your own risk.
[!NOTE] Support crate. For guest programs, enable the
cryptofeature onairbender-sdkto access crypto throughairbender::crypto. For host programs, this crate can be used directly.
airbender-crypto provides shared crypto primitives for Airbender host and guest programs. The same Rust API can be used on both sides, while guest builds can opt into delegated backends for proving-oriented workloads.
§What It Provides
- Hashing modules such as
sha256,sha3,ripemd160, andblake2s. - Curve and field modules including
secp256k1,secp256r1,bn254, andbls12_381. - Re-exports of supporting crates such as
k256,p256, and arkworks types used by the Airbender integrations.
§Features
proving: enables delegation-oriented features used onriscv32Airbender guests.- Default features keep host usage available and enable the secp256k1 static context.
§Usage
[dependencies]
airbender-crypto = { git = "https://github.com/matter-labs/airbender-platform", branch = "main" }Use features = ["proving"] for guest builds, or enable the crypto feature on airbender-sdk if you want the same API through the SDK re-export.
§License
Licensed under either Apache License, Version 2.0 or MIT license at your option.
Re-exports§
pub use k256 as rust_k256;pub use blake2 as blake2_ext;pub use ark_ec;pub use ark_ff;pub use ark_serialize;
Modules§
Macros§
Structs§
- BigInt
- Fp
- Represents an element of the prime field F_p, where
p == P::MODULUS. This type can represent elements in any field of size at most N * 64 bits.
Enums§
Traits§
- BigInteger
- This defines a
BigInteger, a smart wrapper around a sequence ofu64limbs, least-significant limb first. - Mini
Digest
Functions§
- init_
lib - parse_
u256_ be - Parse the byte array as a BE 32-byte BigInt. If length is less than 32 bytes, it will be left-padded (most significant bytes) with zeroes.