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
watermark=truegenerates an opaque 16-byte KSB binding and embeds it before C2PA signing.- A single verify request reports C2PA and watermark states as found, absent, skipped, or error.
- A found KSB payload exposes its binding hex in the report and verify UI.
- 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
| Media | Surface | Capability |
|---|---|---|
| JPEG, PNG, WebP, TIFF | API + wmark | Embed and detect |
| AVIF | wmark | Decode/detect; embed writes JPEG |
| MP4, MOV | API + wmark | Sampled-frame embed and detect; ffmpeg required |
| WebM, MKV, M4V | wmark | Sampled-frame embed and detect; ffmpeg required |
| WAV PCM | API + wmark | 16-bit mono/stereo embed and detect |
| wmark | Embedded JPEG surfaces; C2PA signing remains verify-only | |
| DOCX, PPTX, XLSX | wmark | Embedded raster parts |
HEIC/HEIF, FLAC, AAC, and MP3 watermarking are not supported. C2PA signing support is broader and is documented separately.
Robustness envelope
| JPEG recompression | Tested through quality 70; attack corpus reaches quality 50 |
|---|---|
| Resize | 50% downscale-and-back; geometric sync tests 0.7–1.4× |
| Crop | About 10% border loss, including unaligned crop + JPEG |
| Rotation | About ±15°, including rotation + scale + JPEG |
| Video transcode | Tested with a second x264 encode at CRF 28 |
| Audio gain | Mild 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.pngKeys and limits
- Production uses a Vault-Agent-rendered keyring file. New embeds use the last key; detection tries newest to oldest during rotation.
--key-hexandKRUSADE_WATERMARK_KEYare 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.