Overview
A concrete family of text soft-binding algorithms compatible with the C2PA Soft Binding framework, each registered in the C2PA soft binding algorithm list. A soft binding derives a content-keyed value that survives reformatting, re-encoding, excerpting, and light editing, so a manifest is recoverable when the hard binding — a byte-exact hash — has been broken.
| Module | Algorithm (list id) | Kind |
|---|---|---|
simhash |
com.writerslogic.text-fingerprint.1 (41) |
surface fingerprint |
stego |
com.writerslogic.zwc-watermark.2 (42) |
zero-width watermark |
structure |
com.writerslogic.text-structure.1 (43) |
structural fingerprint |
minhash |
com.writerslogic.text-minhash.1 (44) |
excerpt/quotation fingerprint |
This crate is the perceptual/watermark recovery layer. It is distinct from the Variation-Selector transport used elsewhere in WritersProof, which is a hard binding (a c2pa.hash.data over normalized text) and is not soft binding. Registration in the algorithm list is not C2PA conformance certification.
Quick Start
[]
= "0.1"
Emit and sign a c2pa.soft-binding assertion
soft_binding builds the normative CBOR assertion (it round-trips through the
c2pa-rs reader — see tests/c2pa_roundtrip.rs); manifest signs it as a
COSE_Sign1 / EdDSA envelope.
use ;
let text = "…the document being bound…";
let secret_key = ; // caller-supplied Ed25519 secret
let assertion = from_fingerprint;
let cbor = assertion.to_cbor?; // store under SOFT_BINDING_LABEL
let signed = sign_cose?; // detached-key COSE_Sign1
# Ok::
Recover and classify a candidate
The verify path recomputes the fingerprint from the current text, compares it to
the stored value at the algorithm's registered threshold, and returns a
confidence tier. BOUND requires a durable fingerprint match (41/44, measured
zero false matches) plus the anti-transfer cross-check; a structural (43) match
or a watermark hit alone caps at LIKELY. Tier thresholds are grounded in
ROBUSTNESS.md.
use ;
let text = "…the document being bound…";
let cbor = from_fingerprint.to_cbor?;
let candidate = from_cbor?;
let tier = verify;
assert_eq!;
# Ok::
Register with the Soft Binding Resolution API
These algorithms are registered in the C2PA soft binding algorithm list, so a c2pa.soft-binding assertion referencing them can drive decentralized manifest recovery.
Related Crates
| Crate | Description |
|---|---|
| c2pa-structured-text | Structured text embedding via ASCII armour delimiters |
| c2pa-text | Unstructured text embedding via Unicode Variation Selectors |
| c2pa-rs | Official C2PA SDK |
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Built by WritersLogic