c2pa-text
Open-source reference implementation for embedding and verifying C2PA manifests in text. It implements all three text embedding methods defined by the C2PA 2.4 specification, and ships libraries for Python, Rust, TypeScript, and Go. MIT licensed.
Install
| Python | pip install c2pa-text |
| TypeScript | npm install c2pa-text |
| Rust | cargo add c2pa-text |
| Go | go get github.com/encypherai/c2pa-text/go/v3 |
Three embedding methods (C2PA 2.4)
| Method | Spec | Mechanism | Typical assets |
|---|---|---|---|
| Unstructured | A.8 | Invisible Unicode variation selectors appended to the text | text/plain, text/markdown, copy-paste-safe snippets |
| Structured | A.9 | ASCII armour block inside a comment or front matter | source code, YAML, TOML, XML |
| HTML | A.7 | script or link element in the document head | text/html |
Scope
This project embeds one C2PA manifest per text asset or document. It does not provide sentence-level or segment-level provenance, attribution, or tamper localization. Sentence and segment-level tracking is Encypher's proprietary layer, available free in the hosted API and in Enterprise: encypher.com.