Invisible watermarking

Krusade embeds a keyed, invisible identifier as a soft-binding recovery signal when platforms strip C2PA metadata. C2PA remains the primary cryptographic provenance record. The mark is not DRM, encryption, or proof that pixels were never edited.

Current product contract

  1. watermark=true generates an opaque 16-byte KSB binding and embeds it before C2PA signing.
  2. A single verify request reports C2PA and watermark states as found, absent, skipped, or error.
  3. A found KSB payload exposes its binding hex in the report and verify UI.
  4. Durable ID-to-manifest lookup is parked pending remote-manifest retention and production trust clearance. Detection does not currently recover a hosted credential.

Supported media

MediaSurfaceCapability
JPEG, PNG, WebP, TIFFAPI + wmarkEmbed and detect
AVIFwmarkDecode/detect; embed writes JPEG
MP4, MOVAPI + wmarkSampled-frame embed and detect; ffmpeg required
WebM, MKV, M4VwmarkSampled-frame embed and detect; ffmpeg required
WAV PCMAPI + wmark16-bit mono/stereo embed and detect
PDFwmarkEmbedded JPEG surfaces; C2PA signing remains verify-only
DOCX, PPTX, XLSXwmarkEmbedded raster parts

HEIC/HEIF, FLAC, AAC, and MP3 watermarking are not supported. C2PA signing support is broader and is documented separately.

Robustness envelope

JPEG recompressionTested through quality 70; attack corpus reaches quality 50
Resize50% downscale-and-back; geometric sync tests 0.7–1.4×
CropAbout 10% border loss, including unaligned crop + JPEG
RotationAbout ±15°, including rotation + scale + JPEG
Video transcodeTested with a second x264 encode at CRF 28
Audio gainMild gain on WAV PCM

Perspective warps, heavy crops, aggressive denoise, and deliberate visible damage may erase the signal. Erasure reports absent; it does not create provenance.

Sign and verify API

curl -X POST https://api.krusade.dev/api/v1/sign \
  -H "Authorization: Bearer krsd_your_key_here" \
  -F "[email protected]" -F "watermark=true" \
  -o photo.signed.jpg

curl -X POST https://api.krusade.dev/api/verify \
  -F "[email protected]"

Watermarking cannot be combined with a sidecar sign because the returned sidecar intentionally leaves asset bytes untouched.

Engine CLI

export KRUSADE_WATERMARK_KEY_FILE=/run/secrets/watermark-keyring
wmark embed --payload-hex 4b53420100112233445566778899aabbccddeeff input.png marked.png
wmark detect marked.png

Keys and limits

  • Production uses a Vault-Agent-rendered keyring file. New embeds use the last key; detection tries newest to oldest during rotation.
  • --key-hex and KRUSADE_WATERMARK_KEY are development-only; command-line secrets are visible in process listings.
  • Raster input: 64 MiB compressed, 16,384 px per side, 80 megapixels total, minimum 64×64.
  • Video input: 512 MiB, 10 minutes, 4,096 px per side; streaming frame processing marks at most 90 sampled frames.
  • PDF: 128 MiB and 2,000 pages. Audio: 256 MiB WAV.
  • OOXML: 256 MiB per container and 64 MiB per uncompressed zip entry.

See also Signing API, verification, and the trust model.