Skip to content

The keyring

Worked example: footer revision 4 file

The keyring is the first thing a reader needs, because every other region is sealed with a data key that lives in it. The fixture’s keys file is 86 bytes. Its layout is described on Keyring file.

keys, 86 bytes
  1. magic4 B"STKR"
  2. version2 B01 00
  3. nonce12 B
  4. sealed body52 B
  5. tag16 B
Offset Size Field Value
0 4 magic "STKR"
4 2 version 01 00, version 1
6 12 nonce random, fresh on every rewrite
18 52 sealed body AES-256-GCM ciphertext
70 16 tag GCM tag, appended after the body

The body is sealed with the master key and the AAD "strata-keyring-v1"; see AAD per object. Decrypted, it is 52 bytes:

Field Value
epoch 3
next_id 2
current 1
count 1
key id 1
key 32 bytes (not reproduced)

The epoch of 3 is the nonce epoch last handed out. Opening a keyring persists epoch + 1, so each process lifetime owns a fresh epoch; see Nonces and epochs.