agmiAgent Memory Integrity GitHub

Store, measured at rest

WhiteMagic Memory Crystals

LocalCrystalStore default, commitment kept off the store

WhiteMagic Memory Crystals was seeded through its own API and edited behind its back ten ways. 0 edits served as genuine, 0 reported on audit, 10 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

Every one of the ten edits is refused when the agent next reads, the whole-store rollback and the erasure resurrection included. The shipped LocalCrystalStore keeps its signed, erasure-aware commitment outside the store directory, under XDG_STATE_HOME/whitemagic/anchors, refuses an anchor path inside the store or behind a symlink, and only lets the commitment move forward. The composition engine, chaining storage moves up to two at a time, found no sequence that landed where its single moves did not. The result holds while the anchors directory stays out of the attacker's reach; the in-store row shows what happens when it does not.

The 10 verdicts

Detection point: the read path. 10 of the ten edits were refused there, 0 served as genuine, 0 not applicable.

Level L4. What L4 means.

EditVerdictWhat the tool said
T1
Content tamper
rejecteddetected on reload (CrystalVerificationError: client_sig Ed25519 verification failed: )
T2
Tail truncation
rejecteddetected on reload (CrystalRollbackError: crystal set: revision mismatch: store is at 3, anchor committed to 5)
T3
Middle deletion
rejecteddetected on reload (CrystalRollbackError: crystal set: revision mismatch: store is at 4, anchor committed to 5)
T4
Reordering
rejecteddetected on reload (CrystalLineageError: lineage link broken at index 1: parent_crystal_id sha256:0d9b5c5001c916876fef8ac0b8f587e0ff063403749cdeb3451151775b2cde18 != previous sha256:e17f58c84dec63b45cbb2158598a2fa6e01078)
T5
Forged insertion
rejecteddetected on reload (CrystalRollbackError: crystal set: revision mismatch: store is at 6, anchor committed to 5)
T6
Cross-context replay
rejecteddetected on reload (CrystalContextError: cross-context crystal replay at index 4: tenant_hash sha256:744315f5559aa17a772831e0f384954e007e57d9f3013bc7a7822377277e2c3a != sha256:be62333906959e38d1e89c3c52ed672f71534d3def6a)
T7
Rollback replay
rejecteddetected on reload (CrystalLineageError: duplicate crystal_id at index 4: sha256:9c644a7cdefaa1d031fdf626260cf5b6a66eecc1ae1e4e07b100db543ec21306)
T8
Metadata tamper
rejecteddetected on reload (CrystalVerificationError: client_sig Ed25519 verification failed: )
T9
Snapshot rollback
rejectedthe store noticed it was older than its last committed state (CrystalRollbackError: crystal set: revision mismatch: store is at 5, anchor committed to 6)
T10
Erasure resurrection
rejectedthe store noticed that a record it had erased was back (CrystalRollbackError: crystal set: 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 --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.html)

Related rows

The whole scorecard · All stores