Module diem_sdk::crypto::traits

Expand description

This module provides a generic set of traits for dealing with cryptographic primitives.

For examples on how to use these traits, see the implementations of the [ed25519] or [bls12381] modules.

Enums

Traits

  • A type family with a by-convention notion of genesis private key.
  • The serialized length of the data that enables macro derived serialization and deserialization.
  • A type family for key material that should remain secret and has an associated type of the PublicKey family.
  • A type for key material that can be publicly shared, and in asymmetric fashion, can be obtained from a PrivateKey reference. This convertibility requirement ensures the existence of a deterministic, canonical public key construction from a private key.
  • A type family for signature material that knows which public key type is needed to verify it, and given such a public key, knows how to verify.
  • A type family of valid keys that know how to sign.
  • A type family for schemes which know how to generate key material from a cryptographically-secure CryptoRng.
  • Key or more generally crypto material with a notion of byte validation.
  • An extension to to/from Strings for ValidCryptoMaterial.
  • A type family of public keys that are used for signing.