C2PA soft binding and content fingerprinting for text assets (watermark + fingerprint family)
Project description
c2pa-text-binding
C2PA soft binding and content fingerprinting for text assets
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
[dependencies]
c2pa-text-binding = "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 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.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file c2pa_text_binding-0.2.0.tar.gz.
File metadata
- Download URL: c2pa_text_binding-0.2.0.tar.gz
- Upload date:
- Size: 75.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbdf399c3941c153dd3b81f55cfbe501debf67f01229cbc6f8debe7ab061d22f
|
|
| MD5 |
1621529c4e861fe5e41c3ca04d158570
|
|
| BLAKE2b-256 |
c142d8866d26c0300420619f2b9e8ccdf7963087674258b5b2129c4dcf212be3
|
Provenance
The following attestation bundles were made for c2pa_text_binding-0.2.0.tar.gz:
Publisher:
release.yml on writerslogic/c2pa-text-binding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_text_binding-0.2.0.tar.gz -
Subject digest:
cbdf399c3941c153dd3b81f55cfbe501debf67f01229cbc6f8debe7ab061d22f - Sigstore transparency entry: 2165066198
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-text-binding@e10a66cdc441f3a315eea1473b0860deeec33784 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e10a66cdc441f3a315eea1473b0860deeec33784 -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_text_binding-0.2.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: c2pa_text_binding-0.2.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 501.2 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff0e3a15d7682454e7d295584cbc2804892281b5a09604280303a9b3af24db3c
|
|
| MD5 |
ef10e993fb2937ed2aa78b363df760fa
|
|
| BLAKE2b-256 |
23f5a63683837763bd3a740a25acf24129f9f22e029e24ab62b65e0f2666b4d0
|
Provenance
The following attestation bundles were made for c2pa_text_binding-0.2.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on writerslogic/c2pa-text-binding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_text_binding-0.2.0-cp39-abi3-win_amd64.whl -
Subject digest:
ff0e3a15d7682454e7d295584cbc2804892281b5a09604280303a9b3af24db3c - Sigstore transparency entry: 2165066241
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-text-binding@e10a66cdc441f3a315eea1473b0860deeec33784 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e10a66cdc441f3a315eea1473b0860deeec33784 -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 657.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d0f4aae193f6b1e8435a1179e0221f19bdb303af6fafe6151a28a6ee7ccf668
|
|
| MD5 |
cc8e99d261ff3901000f640f5134af4c
|
|
| BLAKE2b-256 |
38a0f53f69567c153cf4c9000d7d3923c546862d27ada56f3204a9ece8a2dacb
|
Provenance
The following attestation bundles were made for c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on writerslogic/c2pa-text-binding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
1d0f4aae193f6b1e8435a1179e0221f19bdb303af6fafe6151a28a6ee7ccf668 - Sigstore transparency entry: 2165066250
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-text-binding@e10a66cdc441f3a315eea1473b0860deeec33784 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e10a66cdc441f3a315eea1473b0860deeec33784 -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 629.8 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41e6edc6e3cfe8bc0abdddc889623b88b5ca5c5c0ecd849521f89ae8bb46f73f
|
|
| MD5 |
3fd79ec7b7d544cdf0b0023d57b9ff29
|
|
| BLAKE2b-256 |
88f17db2a8047d101e74b9f7e00c5d8c1fb5e5fb3faacef1df38dfe474a5be5c
|
Provenance
The following attestation bundles were made for c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on writerslogic/c2pa-text-binding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_text_binding-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
41e6edc6e3cfe8bc0abdddc889623b88b5ca5c5c0ecd849521f89ae8bb46f73f - Sigstore transparency entry: 2165066227
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-text-binding@e10a66cdc441f3a315eea1473b0860deeec33784 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e10a66cdc441f3a315eea1473b0860deeec33784 -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_text_binding-0.2.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: c2pa_text_binding-0.2.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
965a9befb2476c401f1e6ad98d5610d39d144ed78d0f943611f386028d57bdc2
|
|
| MD5 |
3558b74e903256293c233295175a35bf
|
|
| BLAKE2b-256 |
21de97226fbdfa644fd7854436bdc97a4d544dc6e943a57a5fb2d2f21139b7ad
|
Provenance
The following attestation bundles were made for c2pa_text_binding-0.2.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on writerslogic/c2pa-text-binding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_text_binding-0.2.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
965a9befb2476c401f1e6ad98d5610d39d144ed78d0f943611f386028d57bdc2 - Sigstore transparency entry: 2165066213
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-text-binding@e10a66cdc441f3a315eea1473b0860deeec33784 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e10a66cdc441f3a315eea1473b0860deeec33784 -
Trigger Event:
push
-
Statement type: