Elamur: **Mova** · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Mova](https://md.mova.elamur.ai/free/en/) · [this page in HTML](https://mova.elamur.ai/free/en/docs/tools/watermark/)

[Mova](https://md.mova.elamur.ai/free/en/) / [docs](https://md.mova.elamur.ai/free/en/docs/) / [tools](https://md.mova.elamur.ai/free/en/docs/tools/) / mova-watermark: keyed watermarks for published texts

# mova-watermark: keyed watermarks for published texts

Every text Mova publishes can carry a watermark under a named key: «mova» by default, «elamur» for Elamur pages (for example the research articles written by Sol). The key and the modes are chosen per text class in a config. The method follows SynthID-Text (Dathathri et al., Nature 2024): keyed pseudorandom g-values of (context, candidate), a tournament among candidates, and a detector that scores a text against a key. See [Text watermarks](https://md.mova.elamur.ai/free/en/docs/repo-docs/watermark/) for how it works, the measurements and the limits.

```
mova-watermark keygen NEW_KEY_FILE NAME...                      fresh secrets, mode 0600, outside Git
mova-watermark mark CONFIG CLASS SOURCE DATE IN NEW_OUT         the class's modes: choice, then registry
mova-watermark choice [--config CFG] --key NAME IN NEW_OUT      choice mode only
mova-watermark register LEDGER KEY CLASS SOURCE DATE FILE       registry mode only
mova-watermark check LEDGER FILE                                exact and normalized ledger matches
mova-watermark detect [--config CFG] [--key NAME] [--test choice|tokens] FILE
mova-watermark points FILE                                      choice points by class, no key
mova-watermark diff [--config CFG] --key NAME [--max N] FILE... the edits choice mode would make
mova-watermark measure [--config CFG] NEW_TSV FILE|DIR...       mova and elamur: points, z, false positives
mova-watermark calibrate [--config CFG] NEW_TSV FILE|DIR...     every key on unmarked files: null p-values
```

Output files are never overwritten. `detect` prints one JSON line per key (all keys of the key file without `--key`): the score, its expectation without a watermark, the scored points, z, the exact one-sided p-value and the verdict (`watermarked`, `not watermarked`, or `too few points` when even a perfect score could not reach the level 1e-4). `--test tokens` scores generation-mode texts.

## Modes

- `registry`: SHA-256 of the raw bytes and of the normalized text (NFC, whitespace collapsed) with the key name, class, source id and date, appended to a JSONL ledger. `check` reports `exact` and `normalized` matches. The text does not change.
- `choice`: post-hoc, for texts Mova did not sample (Sol's). At each choice point (a form from a curated class of equivalent forms) the key picks the form. Protected spans never change.
- `generation`: `mova_watermark::generation::tournament_pick(key, context, candidates)` for Mova's own generators when they choose one word among weighted candidates. No production generator calls it yet.

## Config

```
{
  "keys_file": "/path/outside/git/watermark-keys.json",
  "ledger": "/path/outside/git/watermark-ledger.jsonl",
  "default": { "key": "mova", "modes": ["registry", "choice"] },
  "classes": {
    "mova-page": { "key": "mova", "modes": ["registry", "choice"] },
    "research-article": { "key": "elamur", "modes": ["registry", "choice"] },
    "mova-generated": { "key": "mova", "modes": ["registry", "generation"] }
  }
}
```

A class not listed takes `default`; without `default` it is `{ "key": "mova", "modes": ["registry", "choice"] }`. `choice` and `generation` exclude each other in one class. Unknown fields and modes are errors.

## Keys

The key file is JSON, `{"mova": "<hex>", "elamur": "<hex>"}`, at least 16 bytes per secret. It is found through `MOVA_WATERMARK_KEYS` (wins) or the config's `keys_file`. It is refused when it is readable by group or others (it must be mode 0600) or when it lies inside a Git checkout. `keygen` writes a new one from `/dev/urandom` with mode 0600. Tests and measurements use throwaway keys; never commit a key file.

## Tests

```
cargo test --offline -p mova-watermark
```

Unit tests per module and `tests/cli.rs`: an unmarked text is not detected; a «mova» mark is not read as «elamur» and the reverse; choice mode leaves headings, code, links, quotations, math, tables, emphasis and numbers byte-identical under 32 keys (with the red control that the same words in prose do change); the registry matches a rewrapped text and not a text with one word changed; the binary's marking and detection are byte-identical across two runs; a key file with mode 0644 is refused.

- [← previous value — what a component is worth, by ablation](https://md.mova.elamur.ai/free/en/docs/tools/value/)
- [next → mova-whale-world — document dossiers and one global world for Whale epochs](https://md.mova.elamur.ai/free/en/docs/tools/whale-world/)
- [↑ back to tools](https://md.mova.elamur.ai/free/en/docs/tools/)

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://mova.elamur.ai/sitemap.xml) · [llms.txt](https://mova.elamur.ai/llms.txt)
