Skip to main content

Module info

Module info 

Source
Expand description

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.

Constants§

ASSET_FILE_V1
Per-file asset key: HKDF(ikm=AMK, salt=file_id || nonce_prefix, info=ASSET_FILE_V1). The fresh nonce_prefix is folded into the salt so a same-epoch replace re-rolls the key, not merely the nonce (see https://docs/design/cryptography/encryption/#re-keying-on-rewrite).
ASSET_KEYWRAP_V1
Wrap key for an externally-chosen file key (key_mode = wrapped; an adopted web-upload drop): HKDF(ikm=AMK, salt=file_id || wrap_nonce, info=ASSET_KEYWRAP_V1). The sealing/unsealing functions land with the wrapped-key slice; the label is the contract (see https://docs/design/cryptography/encryption/).
DEFAULT_ALBUM_ID_V1
Default-album identifier derived from the account master key (an ID, not a key).
METADATA_BLOB_V1
Per-metadata-blob key: HKDF(ikm=AMK, salt=blob_id || nonce, info=METADATA_BLOB_V1). The blob’s fresh nonce is folded into the salt, re-rolling the key per write even though blob_id is constant across a metadata-update.
SHARE_METADATA_V1
Share-link metadata key: HKDF(ikm=link_secret, salt=opaque_id, info=SHARE_METADATA_V1) derives the key that seals the share metadata record a viewer starts from — the blob at the link’s metadata_hash (SSoT: Share Links). A label of its own, so the record key and the scope-wrap key never coincide.
SHARE_SCOPE_WRAP_V1
Share-link scope-key wrap: HKDF(ikm=link_secret, salt=opaque_id, info=SHARE_SCOPE_WRAP_V1) derives the key that encapsulates a share link’s scope decryption material around the random link secret (SSoT: Share Links).