Mova0.6 pre-release

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 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

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.

This page in Markdown https://md.mova.elamur.ai/free/en/docs/tools/watermark/