Module snapper_box::crypto::key[][src]

Expand description

Keys and other sensitive cryptographic material HAZMAT.

This module provides both originating keys (RootKey) and derived keys (DerivedKey) as well as nonce types and other hazardous material.

Originating keys (RootKey) are randomly generated, and have methods for their usage in generating derived keys, as well methods for encrypting the key with a password for safe at-rest storage.

Derived keys (DerivedKey) are generated via a KDF over the originating key’s entropy pool and a context string incorporating both a random nonce and a namespace.

DANGER

This module deals in low level cryptographic details. It is advisable to not deal with this module directly, and instead use a higher level API.

Structs

A key that has been derived from a RootKey

A DerivedKey that has been encrypted with a RootKey

A RootKey that has been encrypted with an argon2 derivation of a users password

Nonce/Salt value used in encryption

Originating Key

Traits

Allows access to the subkeys of a key-like structure