Crate safe_crypto[][src]

This is a convenience library providing abstractions for cryptographic functions required by other SAFE Network libraries.

Structs

PublicKeys

Represents a set of public keys, consisting of a public signature key and a public encryption key.

SecretKeys

Secret counterpart of the public key set, consisting of a secret signing key and a secret encryption key.

SharedSecretKey

Precomputed shared secret key. Can be created from a pair of our secret key and the recipient's public key. As a result, we'll get the same key as the recipient with their secret key and our public key.

Signature

Detached signature.

SymmetricKey

Secret key for authenticated symmetric encryption.

Enums

Error

This error is returned if encryption or decryption fail. The encryption failure is rare and mostly connected to serialisation failures. Decryption can fail because of invalid keys, invalid data, or deserialisation failures.

Functions

hash

Produces a 256-bit crypto hash out of the provided data.

init

Initialise random number generator for the key generation functions.

Type Definitions

PublicSignKey

Represents public signature key.