Expand description
CLI-side consumer helpers for vta_sdk::sealed_transfer.
Generates ephemeral Ed25519 keypairs (exposed as did:key on the wire)
and persists the seed under <config_dir>/bootstrap-secrets/<bundle_id>.key
(mode 0600 on Unix) so a subsequent open call can retrieve it. At open
time the X25519 HPKE secret is derived from the seed via
vta_sdk::sealed_transfer::ed25519_seed_to_x25519_secret.
The pnm-cli and cnm-cli bootstrap subcommands both route through this
module — the only per-CLI concern is which config_dir to use.
Structs§
- Created
Provision Request - The outcome of
create_provision_request: the signed VP plus the bookkeeping fields callers need to hand to the operator / match the returned sealed bundle. - Created
Request - The outcome of
create_bootstrap_request: the serialized request body and the bundle id (for thesecret stored at <path>banner). - Opened
Armored - The result of
open_armored_bundle— the full sealed payload plus the producer assertion, ready for caller-specific trust verification.
Functions§
- create_
bootstrap_ request - Generate a fresh Ed25519 keypair + nonce, persist the seed (not the
derived X25519 secret) under
config_dir, and return aBootstrapRequestready to hand to the producer. - create_
provision_ request - Generate a fresh ephemeral Ed25519 keypair, persist the seed under
<config_dir>/bootstrap-secrets/<bundle_id_hex>.key, and return a signed VP-framedvta_sdk::provision_integration::BootstrapRequestready to hand to the VTA operator’svta bootstrap provision-integrationCLI. - extract_
admin_ credential - Extract the
CredentialBundlefrom an opened payload. - hex_
lower - Encode a byte slice as lowercase hex, two chars per byte.
- open_
armored_ bundle - Read an armored sealed bundle from
bundle_path, load the corresponding secret fromconfig_dir, open and verify. The caller is responsible for passing anexpect_digestunlessno_verify_digestis set. - secrets_
dir - Resolve the per-config bootstrap secrets directory, creating it on first
use with owner-only permissions (0700 on Unix, user-only DACL on
Windows via
icacls). Seecrate::secure_file::restrict_dir_to_owner. - validate_
digest_ flags - Validate the
(--expect-digest, --no-verify-digest)combination and fire the opt-out warning when applicable. - warn_
no_ verify_ digest - Emit the canonical
--no-verify-digestwarning to stderr. - zero_
overwrite_ and_ remove - Overwrite a file’s bytes with zeros, fsync, then unlink.