cosmwasm_crypto/
lib.rs

1//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2//! This crate implements cryptography-related functions for CosmWasm contracts and internal crates.
3//!
4//! **Note:** This crate is intended to be used in internal crates / utils only.
5//! Please don't use any of these types directly, as they might change frequently,
6//! or be removed in the future. This crate does not adhere to semantic versioning.
7//!
8//! For more information, see: <https://cosmwasm.cosmos.network>
9
10extern crate alloc;
11
12mod backtrace;
13mod bls12_381;
14mod ecdsa;
15mod ed25519;
16mod errors;
17mod identity_digest;
18mod secp256k1;
19mod secp256r1;
20
21#[doc(hidden)]
22pub use crate::bls12_381::{
23    bls12_381_aggregate_g1, bls12_381_aggregate_g2, bls12_381_g1_is_identity,
24    bls12_381_g2_is_identity, bls12_381_hash_to_g1, bls12_381_hash_to_g2,
25    bls12_381_pairing_equality, HashFunction,
26};
27#[doc(hidden)]
28pub use crate::ecdsa::{ECDSA_PUBKEY_MAX_LEN, ECDSA_SIGNATURE_LEN, MESSAGE_HASH_MAX_LEN};
29#[doc(hidden)]
30pub use crate::ed25519::EDDSA_PUBKEY_LEN;
31#[doc(hidden)]
32pub use crate::ed25519::{ed25519_batch_verify, ed25519_verify};
33#[doc(hidden)]
34pub use crate::errors::{
35    Aggregation as AggregationError, CryptoError, CryptoResult,
36    PairingEquality as PairingEqualityError,
37};
38#[doc(hidden)]
39pub use crate::secp256k1::{secp256k1_recover_pubkey, secp256k1_verify};
40#[doc(hidden)]
41pub use crate::secp256r1::{secp256r1_recover_pubkey, secp256r1_verify};
42pub(crate) use backtrace::BT;