Adamant VaultAdamant Vault
Open-Core Specification · Version 1.1

Cryptographic Architecture & Threat Model

Everything required to verify how Adamant encrypts, authenticates, wipes, and isolates vaults natively on iOS (CryptoKit) and in our browser tools (WebCrypto).

1. Constant-Size 16-Slot Pool (VaultCore/slots.bin)

Unlike designs that share a device-wide Keychain salt or grow directory pools in bands of 64, Adamant pre-allocates exactly 65,536 bytes (16 × 4,096 B) filled with CSPRNG bytes on first launch. Unused slots hold 4,096 bytes of uniform entropy with zero magic bytes. Every unlock trial-decrypts all 16 slots silently.

OffsetLengthFieldPurpose
[0 .. 32)32 BpatternSaltIndependent per-slot CSPRNG salt for PBKDF2 Pattern KEK
[32 .. 44)12 BpatternIVRandom AES-256-GCM IV
[44 .. 60)16 BpatternTagAES-GCM authentication tag (aad: "adamant-slot-v1")
[60 .. 92)32 BwrappedVMK256-bit Vault Master Key sealed by Pattern KEK
[92 .. 124)32 BrecoverySaltIndependent CSPRNG salt for 9-word Recovery KEK
[124 .. 136)12 BrecoveryIVRandom AES-256-GCM IV
[136 .. 152)16 BrecoveryTagAES-GCM tag (aad: "adamant-recovery-v1")
[152 .. 184)32 BrecoveryWrappedVMKVMK sealed under 9-word BIP-39 phrase
[184 .. 200)16 BvaultUUIDRFC 4122 v4 UUID referencing encrypted manifest
[200 .. 201)1 BflagsBit 0 (0x01) = isDuress flag; upper bits random
[201 .. 4096)3,895 BpaddingUniform CSPRNG padding

2. Chunked Streaming (ADMTBLB1)

Enables constant ~2 MB RAM scrubbing of gigabyte-scale 4K videos via loopback Range streams:

  • Header (32 B): "ADMTBLB1" || 12B baseNonce || uint32(65536) || 8B zeros
  • chunkIV_i = baseNonce XOR uint64_be(i)
  • AAD_i = uint64_be(i) || uint8(isFinal ? 1 : 0)
  • Frame_i = uint32_be(ctLen) || AES-256-GCM(VMK, chunkIV_i, P_i, AAD_i)

3. Known Answer Test (KAT) Vector

Reproducible PBKDF2-HMAC-SHA512 derivation tested automatically in CI (cryptoVectors.test.ts):

Input: adamant:v1:grid5x5:0-1-2-7-12-17

Salt: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

1,000 iters: 04f095854d32ea56c132a03db3a36ee4b24ee62844637a70a835840bf13995db

600,000 iters: 4cc81adb92eb4abe109d8cca15d13be2a899b81963bc467c60f0a48cb0276ef5

4. Honest Forensic Boundaries & Threat Limits

  • App Container Ciphertext Presence: A full-disk forensic extraction sees slots.bin (65,536 B) and opaque .enc blobs in VaultCore/blobs/. While 1 active slot vs. 16 is indistinguishable inside slots.bin, separate .manifest.enc files exist per active vault until a Duress Wipe synchronously unlinks them.
  • Pattern Entropy: AES-256-GCM uses random 256-bit VMKs, and 600,000 PBKDF2-SHA512 iterations slow cracking sharply—but trivial patterns remain guessable on seized hardware. Use longer multi-turn patterns and enable Stealth Line.
  • Unlocked RAM Lifecycle: Decryption runs inside native CryptoKit / JCA process RAM. On backgrounding, manual lock, or Flip/Shake panic, VMKs are overwritten with zeros (memset_s / Arrays.fill).