1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// SPDX-License-Identifier: MIT OR Apache-2.0
//! Reference implementation of the WritersLogic C2PA text soft-binding family.
//!
//! Each algorithm links text content to its C2PA manifest without a byte-exact
//! hash, so provenance is recoverable after copying, reformatting, excerpting,
//! or light editing. All algorithms are registered in the C2PA Soft Binding
//! Algorithm List and referenced from a `c2pa.soft-binding` assertion.
//!
//! | Module | Algorithm | Kind |
//! | --- | --- | --- |
//! | [`stego`] | `com.writerslogic.zwc-watermark.2` | watermark (embedded) |
//! | [`simhash`] | `com.writerslogic.text-fingerprint.1` | fingerprint (surface) |
//! | [`minhash`] | `com.writerslogic.text-minhash.1` | fingerprint (excerpt) |
//! | [`structure`] | `com.writerslogic.text-structure.1` | fingerprint (structural) |
//!
//! [`normalize`] is the shared canonical stream; [`soft_binding`] emits the
//! `c2pa.soft-binding` assertion (CBOR that round-trips through the c2pa-rs
//! reader); [`crosscheck`] recomputes a candidate's fingerprint from the current
//! text and classifies it into a BOUND / LIKELY / REVIEW confidence tier, whose
//! boundaries are grounded in the measured false-match rates in
//! `examples/threshold_sweep.rs`.
//!
//! Everything here compiles to `wasm32-unknown-unknown`. All cryptography is
//! pure Rust with no C bindings (sha2, hmac, blake2, ed25519-dalek, coset); the
//! soft-binding assertion is CBOR via ciborium, and reed-solomon-erasure backs
//! watermark recovery. Registration in the C2PA algorithm list is not the same
//! as C2PA conformance certification, which is a separate program this crate
//! makes no claim to.
/// The A.8 variation-selector transport, re-exported from
/// [`c2pa-unstructured-text`](https://crates.io/crates/c2pa-unstructured-text).
///
/// This was previously a module of this crate. It is a *hard-binding* carrier,
/// which never belonged alongside the soft-binding family here, so it now lives
/// in the crate that owns A.8. The re-export keeps it reachable for the
/// survivability comparison in `examples/transport_survivability.rs`, which
/// measures the hard-binding carrier against the soft-binding ones.
///
/// The API changed with the move: extraction returns `Result<Wrapper, Error>`
/// rather than a `Decoded` enum, since a wrapper now carries its byte range as
/// well as its payload.
pub use wrapper as vs;
/// The byte-level selector codec, re-exported alongside [`vs`].
pub use vs as vs_codec;
/// SHA-256 for the v2 wrapper checksum, over this crate's existing `sha2`.
///
/// The transport crate injects its digest rather than depending on one, so
/// supplying it here keeps that crate's contribution to this dependency tree at
/// zero: everything it needs is already present for the soft-binding family.
;
pub use ;
pub use Error;
pub use ;
pub use MinHash;
pub use ;
pub use ;
pub use ;