Module crypto

Module crypto 

Source
Expand description

RE crypto library

Macros§

define_wrapped_hash

Structs§

Bls12381G1PrivateKey
Bls12381G1PublicKey
Represents a BLS12-381 G1 public key.
Bls12381G2Signature
Represents a BLS12-381 G2 signature (variant with 96-byte signature and 48-byte public key)
Ed25519PrivateKey
Ed25519PublicKey
Represents an ED25519 public key.
Ed25519PublicKeyHash
Ed25519Signature
Represents an ED25519 signature.
Hash
Represents a 32-byte hash digest.
HashAccumulator
Represents a 32-byte hash accumulator.
Secp256k1PublicKey
Represents a compressed ECDSA Secp256k1 public key, which is the default format used in the Radix stack.
Secp256k1PublicKeyHash
Secp256k1Signature
Represents an ECDSA Secp256k1 signature.
Secp256k1UncompressedPublicKey
Represents an uncompressed ECDSA Secp256k1 public key.

Enums§

ParseBlsPublicKeyError
Represents an error when retrieving BLS public key from hex or when aggregating.
ParseBlsSignatureError
Represents an error when retrieving BLS signature from hex or when aggregating.
ParseEd25519PublicKeyError
Represents an error when parsing ED25519 public key from hex.
ParseEd25519SignatureError
ParseHashError
Represents an error when parsing hash.
ParseSecp256k1PublicKeyError
Represents an error when parsing ED25519 public key from hex.
ParseSecp256k1SignatureError
PublicKey
Represents any natively supported public key.
PublicKeyHash
The hash of a given public key.

Constants§

BLS12381_CIPHERSITE_V1
BLS12-381 ciphersuite v1 It has following parameters

Traits§

HasPublicKeyHash
IsHash
IsPublicKeyHash

Functions§

aggregate_verify_bls12381_v1
Performs BLS12-381 G2 aggregated signature verification of multiple messages each signed with different key. Domain specifier tag: BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_
blake2b_256_hash
fast_aggregate_verify_bls12381_v1
Performs BLS12-381 G2 aggregated signature verification one message signed with multiple keys. Domain specifier tag: BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_ This method validates provided input keys when aggregating.
fast_aggregate_verify_bls12381_v1_anemone
Performs BLS12-381 G2 aggregated signature verification one message signed with multiple keys. Domain specifier tag: BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_ This method does not validate provided input keys when aggregating, it is left here for backward compatibility. It is recommended to use fast_aggregate_verify_bls12381_v1() method instead.
hash
Computes the hash digest of a message.
hash_public_key_bytes
keccak256_hash
verify_bls12381_v1
Performs BLS12-381 G2 signature verification. Domain specifier tag: BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_
verify_ed25519

Type Aliases§

Blake2b256