[][src]Crate ic_crypto

This crate provides the CryptoComponent and a set of static methods that allows Internet Computer nodes to perform crypto operations such as key generation, distributed key generation, hashing, signing, signature verification, TLS handshakes, and random number generation.

Please refer to the 'Trait Implementations' section of the CryptoComponentFatClient to get an overview of the functionality offered by the CryptoComponent.

Modules

cli

Command line interface for the crypto component.

prng

Offers cryptographically secure pseudorandom number generation (CSPRNG).

utils

Static crypto utility methods.

Structs

CryptoComponentFatClient

Allows Internet Computer nodes to perform crypto operations such as distributed key generation, signing, signature verification, and TLS handshakes.

LockableThresholdSigDataStore

A ThresholdSigDataStore that is wrapped by a RwLock.

Enums

KeyBytesContentType

Indicates the content type of serialised key bytes passed for parsing.

Constants

THRESHOLD_SIG_DATA_STORE_CAPACITY

Defines the maximum number of entries contained in the ThresholdSigDataStore.

Traits

CryptoComponentForNonReplicaProcess

A crypto component that offers limited functionality and can be used outside of the replica process.

Functions

combined_threshold_signature_and_public_key

Creates a combined threshold signature together with its public key. This is only used for testing.

crypto_hash

Creates a (typed) domain-separated cryptographic hash.

ecdsa_p256_signature_from_der_bytes

Decodes an ECDSA P-256 signature from DER.

ed25519_public_key_to_der

Encodes a raw ed25519 public key into DER.

threshold_sig_public_key_from_der

Decodes a threshold signature public key from DER.

threshold_sig_public_key_to_der

Encodes a threshold signature public key into DER.

user_public_key_from_bytes

Parses the given bytes as a DER- or COSE-encoded public key, and returns, if the parsing is successful, the key as UserPublicKey-struct and an enum that indicates the content type of the passed bytes. If parsing fails, returns an error.

verify_combined_threshold_sig

Verifies a combined threshold signature.

Type Definitions

CryptoComponent

A type alias for CryptoComponentFatClient<Csp<OsRng, ProtoSecretKeyStore>>. See the Rust documentation of CryptoComponentFatClient.