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 freshnonce_prefixis folded into the salt so a same-epochreplacere-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 freshnonceis folded into the salt, re-rolling the key per write even thoughblob_idis constant across ametadata-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’smetadata_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).