Overview
Implements the ZIP embedding method from the C2PA Technical Specification. Many document formats are ZIP archives with a fixed internal layout — EPUB, Office Open XML (DOCX/XLSX/PPTX), OpenDocument (ODT/ODS/ODP) and OpenXPS — and all embed a C2PA Manifest Store through this single transport.
The Manifest Store is stored as a dedicated ZIP entry at a fixed location:
| Property | Value |
|---|---|
| Path | META-INF/content_credential.c2pa |
| Compression | Stored (method 0, uncompressed) |
| Encryption | None |
| General-purpose bit flag | 0 |
| Media type | As recommended for external manifests |
Embedding appends the manifest entry before the central directory, so existing entries keep their byte offsets; the central directory and end-of-central-directory record are then rebuilt. All parsing is bounds-checked against untrusted input, and ZIP64 archives are rejected (fail-closed) rather than mis-parsed.
Zero dependencies.
Quick Start
[dependencies]
c2pa-zip = "0.1"
Embed a manifest
use c2pa_zip::embed_manifest;
let doc: &[u8] = /* .epub / .docx / .odt / .oxps bytes */;
let manifest: &[u8] = /* C2PA Manifest Store bytes */;
// Insert (or replace) the manifest entry; existing entries stay byte-stable.
let signed = embed_manifest(doc, manifest).unwrap();
Read a manifest
use c2pa_zip::read_manifest;
// Some(bytes) when a manifest is present, None when the archive has none.
let manifest = read_manifest(&signed).unwrap();
Remove a manifest
use c2pa_zip::remove_manifest;
let stripped = remove_manifest(&signed).unwrap();
Verify structurally
use c2pa_zip::verify;
let report = verify(&signed).unwrap();
// report.has_manifest, report.manifest_len, report.is_valid_zip
Design
- The Manifest Store is a single stored (uncompressed) ZIP entry at
META-INF/content_credential.c2pa embed_manifestreplaces any existing manifest entry, so the archive always carries at most one; when none is present the existing entries keep their exact byte offsetsremove_manifestrebuilds the archive without the manifest entry, recomputing local-header offsets and the central directoryverifyreports transport-level structure only: whether the archive parses and whether a manifest is present- ZIP64 archives (identified by sentinel values in the EOCD or central directory) are rejected; a trailing ZIP comment is tolerated when locating the EOCD
Scope
This crate is the ZIP transport only: it reads, writes, and removes a C2PA Manifest Store stored as a ZIP entry. Manifest construction, signing, and hard/soft binding (the collection-data-hash) are out of scope; use the c2pa SDK for those. verify performs structural checks (presence + parseability), not hard-binding validation.
Related Crates
| Crate | Description |
|---|---|
| c2pa-fonts | OpenType/TrueType (SFNT) font embedding |
| c2pa-warc | WARC web archive embedding (ISO 28500) |
| c2pa-structured-text | Structured text embedding via ASCII armour delimiters |
| c2pa-text-binding | Soft binding and content fingerprinting for text assets |
| c2pa-rs | 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
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_zip-0.1.0.tar.gz.
File metadata
- Download URL: c2pa_zip-0.1.0.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52f4181ae5759fba8b84cc6d959d2403adcf69cd71c7c81780ae3bc0e2297e4c
|
|
| MD5 |
4ac572280c5030a5093ad0a08602135b
|
|
| BLAKE2b-256 |
437218189dc83709964527f64402985046a050ba655e643f211e76c431d02033
|
Provenance
The following attestation bundles were made for c2pa_zip-0.1.0.tar.gz:
Publisher:
release.yml on writerslogic/c2pa-zip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_zip-0.1.0.tar.gz -
Subject digest:
52f4181ae5759fba8b84cc6d959d2403adcf69cd71c7c81780ae3bc0e2297e4c - Sigstore transparency entry: 2305333204
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-zip@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_zip-0.1.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: c2pa_zip-0.1.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 122.4 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdc2c35bf439e3796cad9e6c5ac7e770e8197e5b6d7471b3d9dafde09b59e46d
|
|
| MD5 |
204b180d85c357046e697086b646392e
|
|
| BLAKE2b-256 |
5d63369150aa89a12a7f68c91865f45ddbb66324d17c69ecb0047300262e4a7c
|
Provenance
The following attestation bundles were made for c2pa_zip-0.1.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on writerslogic/c2pa-zip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_zip-0.1.0-cp39-abi3-win_amd64.whl -
Subject digest:
fdc2c35bf439e3796cad9e6c5ac7e770e8197e5b6d7471b3d9dafde09b59e46d - Sigstore transparency entry: 2305333595
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-zip@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 256.3 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ff0f3f677b284b94ec469ece5dea90ad75a0778473faa859c336b8b714a5c2b
|
|
| MD5 |
88d3fe410d292ffc2e9d39faf89e7a12
|
|
| BLAKE2b-256 |
7cab48efa07722261b7b83ace3f82300e7ab36228b383ac5044b62a24bab1d3f
|
Provenance
The following attestation bundles were made for c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on writerslogic/c2pa-zip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
7ff0f3f677b284b94ec469ece5dea90ad75a0778473faa859c336b8b714a5c2b - Sigstore transparency entry: 2305333524
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-zip@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 251.1 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d5ef1719026532a5bd2378c5c7ab826d7a3a6106681820e59837c7cd07d641f
|
|
| MD5 |
ff5d1c12d8b7f651cfd6e991651b5cf1
|
|
| BLAKE2b-256 |
9e77f9a6b6e77055071016c4ef8416ee1af5e261e4e197b3b046bb959a4890b7
|
Provenance
The following attestation bundles were made for c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on writerslogic/c2pa-zip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_zip-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
9d5ef1719026532a5bd2378c5c7ab826d7a3a6106681820e59837c7cd07d641f - Sigstore transparency entry: 2305333440
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-zip@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_zip-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: c2pa_zip-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 226.6 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84c343dacca48f2234c735001eab777a606b356a78e37c8f3053364425b18762
|
|
| MD5 |
ee2c5774fecfafcc20746751f1956bff
|
|
| BLAKE2b-256 |
bfef11dd281e62dd0be2b3052c7900228a2ed72afeef15096694dcf7d0693d84
|
Provenance
The following attestation bundles were made for c2pa_zip-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on writerslogic/c2pa-zip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_zip-0.1.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
84c343dacca48f2234c735001eab777a606b356a78e37c8f3053364425b18762 - Sigstore transparency entry: 2305333267
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-zip@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file c2pa_zip-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: c2pa_zip-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 229.1 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf6f8fe2c4b40980587defabad1cc98d3c7d5f284b8f91fb358a4aa94d38d8f6
|
|
| MD5 |
1e5e982a28fe922575b9d5c205aca140
|
|
| BLAKE2b-256 |
771e5941380fe18132010f4e9c272e28995c7d5701ed2ff281b8dc88b471ad9e
|
Provenance
The following attestation bundles were made for c2pa_zip-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on writerslogic/c2pa-zip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
c2pa_zip-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
bf6f8fe2c4b40980587defabad1cc98d3c7d5f284b8f91fb358a4aa94d38d8f6 - Sigstore transparency entry: 2305333357
- Sigstore integration time:
-
Permalink:
writerslogic/c2pa-zip@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/writerslogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@352ee554bdd3f3fcdc07ad4f3d3727b9ad0f2a3b -
Trigger Event:
push
-
Statement type: