Skip to main content

Crate corium_crypt

Crate corium_crypt 

Source
Expand description

Cryptographic primitives and key resolution for Corium.

This crate deliberately has no storage or async-runtime dependency. It owns stored encryption formats and secret-key hygiene; callers own where keys and ciphertext live.

Structs§

BlobHeader
Parsed metadata from an encrypted blob header.
KeyId
A key identity stored in a manifest or protection-class entity.
LogHeader
Parsed metadata from an encrypted log-record payload header.
SecretKey
Opaque, zeroized 256-bit key material.
StaticKeyring
In-memory keyring for tests and keys loaded from files or environment variables by a higher-level configuration layer.

Enums§

CryptError
Failures while encrypting or decrypting stored data.
KeyError
Failures while resolving or wrapping keys.

Constants§

BLOB_MAGIC
Magic prefix for an encrypted content-addressed blob.
LOG_MAGIC
Magic prefix for an encrypted transaction-log record payload.
STATIC_KEY_EPOCH
Epoch a locally held key resolves at.

Traits§

Keyring
Resolves key material without coupling Corium to a KMS implementation.

Functions§

decrypt_blob
Authenticates and decrypts an encrypted blob.
decrypt_log_record
Authenticates and decrypts one transaction-log record payload.
derive_key
Derives a separate 256-bit key for a domain-specific context.
encrypt_blob
Encrypts a blob deterministically for a given key epoch and plaintext.
encrypt_log_record
Encrypts one transaction-log record payload.
is_encrypted_log_record
Reports whether a log-record payload carries the encrypted-record header.
load_key
Reads the material one locally resolvable key identity names.
parse_blob_header
Parses and validates an encrypted blob’s cleartext header.
parse_log_header
Parses and validates an encrypted log record’s cleartext header.