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 | Registered alg identifier |
Kind |
|---|---|---|
simhash |
com.writerslogic.text-fingerprint.1 |
surface fingerprint |
stego |
com.writerslogic.zwc-watermark.2 |
zero-width watermark |
structure |
com.writerslogic.text-structure.1 |
structural fingerprint |
minhash |
com.writerslogic.text-minhash.1 |
excerpt/quotation fingerprint |
The alg string is what a c2pa.soft-binding assertion carries and what a
recovery service matches on; it is the identifier that matters.
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
[dependencies]
c2pa-text-binding = "0.2"
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 c2pa_text_binding::{simhash::Fingerprint, soft_binding, sign_cose, SOFT_BINDING_LABEL};
let text = "…the document being bound…";
let secret_key = [7u8; 32]; // caller-supplied Ed25519 secret
let assertion = soft_binding::from_fingerprint(&Fingerprint::compute(text));
let cbor = assertion.to_cbor()?; // store under SOFT_BINDING_LABEL
let signed = sign_cose(&cbor, &secret_key)?; // detached-key COSE_Sign1
# Ok::<(), c2pa_text_binding::Error>(())
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 c2pa_text_binding::{simhash::Fingerprint, soft_binding::{self, SoftBinding}, verify, Confidence};
let text = "…the document being bound…";
let cbor = soft_binding::from_fingerprint(&Fingerprint::compute(text)).to_cbor()?;
let candidate = SoftBinding::from_cbor(&cbor)?;
let tier = verify(text, &candidate, /*watermark_verified=*/ false, /*crosscheck_ok=*/ true);
assert_eq!(tier, Confidence::Bound);
# Ok::<(), c2pa_text_binding::Error>(())
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.
Transport Survivability Research
The soft-binding layer above exists because hard bindings are fragile in text pipelines. TRANSPORT.md is a reproducible benchmark quantifying that fragility, comparing every invisible-text carrier — A.8 variation selectors (v1 and a proposed v2), the zero-width Reed-Solomon watermark, Unicode Tag smuggling, naive zero-width binary — against the fingerprint recovery layer, across deterministic probes and real transports (HTML sanitizers, Office, email, Markdown, pandoc, macOS RTF).
Key results, all reproducible with cargo run --release --example transport_survivability and harness/tier1.py:
- Carrier survival is not provenance survival. Email, Markdown, and
pandocround trips leave the invisible carrier intact but reflow the visible text, breaking the A.8 hard binding. Only the reflow-tolerant fingerprint survives. - A.8 needs a checksum, not just a length. Property testing shows the v1 length field is self-corruptible — a single dropped length byte yields a wrong payload. Only an integrity field (this crate's HMAC watermark, or a v2 checksum) fails safe.
- Error correction is decisive. The Reed-Solomon watermark tolerates ~30–40% code-point loss where every un-coded carrier fails by 20%.
- Sanitizers preserve invisible payloads. Ten of thirteen real pipelines — including
bleachandnh3— pass the payload through untouched; a security-relevant result.
Interoperability. This crate's A.8 codec is byte-identical to Encypher's c2pa-text reference library in both directions (tests/interop.rs, harness/interop.py), so the comparison is against the real deployed format, not a stand-in.
Runs are reproducible via a pinned venv (harness/requirements.txt) or the Dockerfile, which stamps tool and library versions with every result.
Related Crates
Part of a family of single-purpose crates, one per C2PA embedding method. Each is standalone and independently versioned.
| Crate | Description |
|---|---|
| c2pa-structured-text | Structured text: ASCII-armoured manifest in a comment or front matter |
| c2pa-unstructured-text | Unstructured text: invisible Unicode variation-selector run |
| c2pa-html | HTML: script and link elements in the document head |
| c2pa-http | HTTP: the c2pa-manifest Link header, with a Tower middleware |
| c2pa-vtt | WebVTT caption and subtitle embedding |
| c2pa-zip | ZIP-based documents: EPUB, DOCX, ODT, OXPS |
| c2pa-warc | WARC web archive embedding (ISO 28500) |
| c2pa-fonts | OpenType/TrueType (SFNT) font embedding |
| c2pa-ml | ML model containers: GGUF, SafeTensors, ONNX |
| c2pa | Official C2PA SDK |
Security
Found a vulnerability? Please report it privately — see SECURITY.md.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Built by WritersLogic
Metadata
Release files for c2pa-text-binding 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| c2pa_text_binding-0.3.0.tar.gz | 101.8 kB | With provenance | Details for c2pa_text_binding-0.3.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| c2pa_text_binding-0.3.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for c2pa_text_binding-0.3.0-cp39-abi3-win_amd64.whl |
| c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| c2pa_text_binding-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 | Details for c2pa_text_binding-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 3.1 MB
Release files / c2pa_text_binding-0.3.0.tar.gz
| Download URL | c2pa_text_binding-0.3.0.tar.gz |
|---|---|
| Size | 101.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1c2c3a35a4b95682f7cfbba359f9403cc3cb62f5a0f686c8cd79016c6a190db
|
|
BLAKE2b-256 checksum How to use checksums |
1baed27daea1ec8c8e123c0b04b794b731bbeb48bbcea896a2d111bf16020a84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / c2pa_text_binding-0.3.0-cp39-abi3-win_amd64.whl
| Download URL | c2pa_text_binding-0.3.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 503.6 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
25ed30c1ffef55e932e5abc82d14fb9ade5f35628b1529d2b621e5e1a0baf9c9
|
|
BLAKE2b-256 checksum How to use checksums |
fd2cfaff360a02b739a295faaf57cb84a1d9ec80d080d7812324490e6175e6ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 659.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
36bc2a9190130d85bfe70fe5899cc3855b302f0f453d0504d3be2338a641a244
|
|
BLAKE2b-256 checksum How to use checksums |
329136030d51e98abcfdacd875037e97be4a6bf29977eb014923ffbffe0f8c18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | c2pa_text_binding-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 631.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
66d59f8b1a87dca49a37d1c19a8940393605c555857823238b20d0bd2f036f03
|
|
BLAKE2b-256 checksum How to use checksums |
8192640d10f9e91e7a388c0f3170c2cfe01330c1c77d7441784ff70299fa75b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / c2pa_text_binding-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | c2pa_text_binding-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d0fa45c02803beda9b022d5fe7f12894c040fe6f8aeabfc5c7409d96a80f76ac
|
|
BLAKE2b-256 checksum How to use checksums |
8fd56ad6dec2eb48e26e2ea20f86d708013914e0ae08318e00d6fa40858c3f32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for c2pa-text-binding 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for c2pa_text_binding-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.