cadrumo.adapters.persistence.storage.custody.records module¶
Strict, current-format records for password-wrapped profile custody.
- PROFILE_CUSTODY_ENVELOPE_FILENAME: Final¶
The password envelope’s name inside a capsule’s
custody/directory. Named beside its size bound and its sentinel/recovery siblings, which already carry one; it was the last capsule member whose filename was a literal repeated at each publication and read site.
- PROFILE_CUSTODY_ENVELOPE_MAX_BYTES: Final¶
all fixed-width fields, a present predecessor digest, and the ten-digit maximum password generation.
- Type:
Largest possible canonical v1 envelope
- class ProfileCustodyKdfParameters(**data)[source]¶
Bases:
BaseModelThe finite Argon2id parameter grid accepted by custody v1.
- Parameters:
data (Any)
- algorithm: KdfAlgorithm¶
- version: KdfVersion¶
- memory_mib: KdfMemoryMib¶
- iterations: KdfIterations¶
- parallelism: KdfParallelism¶
- salt_b64: str¶
- output_bytes: KdfOutputBytes¶
- class ProfileCustodyWrappedDek(**data)[source]¶
Bases:
BaseModelAuthenticated AES-GCM payload carrying exactly one 32-byte DEK.
- Parameters:
data (Any)
- nonce_b64: str¶
- ciphertext_b64: str¶
- tag_b64: str¶
- class ProfileCustodyEnvelope(**data)[source]¶
Bases:
_ProfileCustodyEnvelopePayload,CustodyDigestModelImmutable v1 authority for one profile’s normal password unlock.
- Parameters:
self_digest (str)
- self_digest: str¶
- classmethod create(*, profile_id, password_generation, dek_epoch, kdf, wrapped_dek, previous_envelope_digest=None)[source]¶
Build a validated envelope with its canonical self-digest.
- Return type:
- Parameters:
profile_id (UUID)
password_generation (int)
dek_epoch (str)
wrapped_dek (ProfileCustodyWrappedDek)
previous_envelope_digest (str | None)