Skip to main content

Module primitives

Module primitives 

Source
Expand description

The single source of truth, in code, for Capsule’s cryptographic primitive set.

Mirrors the inventory in Cryptography — Primitives. Every on-disk and on-wire structure that depends on a primitive carries a SuiteId (crypto_suite_id), so two structures encrypted under different suite versions can coexist without a flag day. Retiring a primitive does not edit a row — it adds a new SuiteId variant.

Modules§

info
Versioned HKDF info labels. Including a version string lets the KDF be rotated later without a flag day; the SSoT for each label is the doc that derives that key.

Structs§

Argon2Params
Argon2id cost parameters: memory in KiB, iteration count t, parallelism p.

Enums§

DeviceTier
Device hardware tier, selecting Argon2id cost parameters at wrap time. The chosen parameters are recorded in the wrapped blob, so unwrap works on any tier.
SuiteId
Identifies a complete bundle of cryptographic primitives.

Constants§

CRYPTO_SUITE_ID
crypto_suite_id of the current primitive bundle (the SuiteId::V1 inventory).
PROTOCOL_VERSION
The date-based wire protocol_version this build writes. Pinned per album at creation.