Skip to main content

Module bundle

Module bundle 

Source
Expand description

Top-level codec: ties container framing, crypto, and compression into pack/open for whole bundles. This is the single place that generates a fresh salt + nonce, derives the key, and assembles the plaintext header.

Structs§

BundleParams
Inputs for packing a bundle. meta is the opaque header metadata (stream manifest and/or task spec, built by the evidence/task layers).

Constants§

DEFAULT_M_COST
Default Argon2id cost (memory in KiB, iterations, parallelism). Tuned for an interactive in-browser unlock; stored per-bundle so it can evolve.
DEFAULT_P_COST
DEFAULT_T_COST

Functions§

open_bytes
Open a sealed FCB container to its kind, plaintext header, and decrypted + decompressed payload bytes. The plaintext prefix preceding the payload is the AEAD additional authenticated data, so any header tamper fails as Corrupt.
pack_bytes
Pack payload bytes into a sealed FCB container (compress-then-encrypt) with a fresh random salt and nonce.