agmiAgent Memory Integrity GitHub

Store, measured at rest

WhiteMagic Memory Crystals

signed-ciphertext audit without the key-encryption key

WhiteMagic Memory Crystals was seeded through its own API and edited behind its back ten ways. 0 edits served as genuine, 10 reported on audit, 0 rejected on read.

Measured on
whitemagic crystal_client.py at 273b177b (sha256 e44b13f2), Python 3.12, macOS
Date
Source
github.com/lbailey94/whitemagic
Attack versions
tamper@v1, truncate@v1, delete_middle@v1, reorder@v1, forge@v1, cross_replay@v1, rollback_replay@v1, metadata_tamper@v1, snapshot_rollback@v1, erase_resurrect@v1

What this means

A third party holding the signed ciphertext but not the key-encryption key runs LocalCrystalStore.verify_third_party() and is told about every one of the ten edits. It is an audit, not the read path: it shows that someone without the plaintext can check the store, not that the agent is stopped from reading an edited record. The row was narrowed to this from a plaintext read after a detached-plaintext case showed the earlier claim was too broad; the maintainer posted that correction to the W3C interop list himself.

The 10 verdicts

Detection point: the audit, a separate call the operator has to make; the read path serves the edit first.

Level L0, Measured. The store has a published row. Any verdicts. What L0 means.

EditVerdictWhat the tool said
T1
Content tamper
reporteddetected on reload (CrystalVerificationError: crystal signature verification failed at index 2: client_sig Ed25519 verification failed: )
T2
Tail truncation
reporteddetected on reload (CrystalRollbackError: crystal set (third-party): revision mismatch: store is at 3, anchor committed to 5)
T3
Middle deletion
reporteddetected on reload (CrystalRollbackError: crystal set (third-party): revision mismatch: store is at 4, anchor committed to 5)
T4
Reordering
reporteddetected on reload (CrystalLineageError: lineage link broken at index 1: parent_crystal_id sha256:8089c8d48caf65845267d6664420dfb88e75f8aedca61316a0f2dc99aa4c0f07 != previous sha256:cfdf86a333488fc1df2233f6694afc9b3619d4)
T5
Forged insertion
reporteddetected on reload (CrystalRollbackError: crystal set (third-party): revision mismatch: store is at 6, anchor committed to 5)
T6
Cross-context replay
reporteddetected on reload (CrystalContextError: cross-context crystal replay at index 4: tenant_hash sha256:744315f5559aa17a772831e0f384954e007e57d9f3013bc7a7822377277e2c3a != sha256:be62333906959e38d1e89c3c52ed672f71534d3def6a)
T7
Rollback replay
reporteddetected on reload (CrystalLineageError: duplicate crystal_id at index 4: sha256:9bfc55a6c81754d5d47bb351abddaa99aa88a724c89b03d06ccdc86261dcc38b)
T8
Metadata tamper
reporteddetected on reload (CrystalVerificationError: crystal signature verification failed at index 2: client_sig Ed25519 verification failed: )
T9
Snapshot rollback
reportedthe store noticed it was older than its last committed state (CrystalRollbackError: crystal set (third-party): revision mismatch: store is at 5, anchor committed to 6)
T10
Erasure resurrection
reportedthe store noticed that a record it had erased was back (CrystalRollbackError: crystal set (third-party): erasure_count mismatch: store has 0, anchor committed to 1)

A verdict is what the tool did, not an opinion. "Accepted" means it loaded the altered store, raised nothing, and the agent carried on from the altered memory as if it were true. Every cell has a control that proves the edit landed before the verdict counts.

Where the attacker stands

The attacker reads and writes the WhiteMagic store directory, as a mounted volume, a shared disk or a restored backup would allow. He holds no signing key. In the default and audit rows he cannot reach the anchors directory under XDG_STATE_HOME; in the in-store row the commitment sits inside the directory he controls. An attacker who holds a key or the anchors directory is a different measurement and these rows do not speak for it.

Reproduce this row

Everything runs offline. The run seeds a fresh store through the client's own API, applies each edit beneath it, reopens the store and records what came back.

pip install agent-memory-integrity
curl -sL -o crystal_client.py https://raw.githubusercontent.com/lbailey94/whitemagic/273b177b5c59eb3148b721a85683ab929041d246/scripts/crystal_client.py   # sha256 e44b13f2
export AGMI_WHITEMAGIC_CRYSTAL_CLIENT=<path to crystal_client.py>
python agmi/full_runner.py --json results/scorecard.json   # every row, this one included
python -m agmi.agent --target whitemagic-crystals+ciphertext-audit --compose

Badge

Maintainers can link their row from their README. The badge points here and changes nothing on your side:

[![agmi: measured](https://img.shields.io/badge/agmi-measured-0F4C5C)](https://agentmemoryintegrity.org/stores/whitemagic-crystals-ciphertext-audit.html)

Related rows

The whole scorecard · All stores