Skip to main content

crates.io docs.rs CI OpenSSF Scorecard License

Overview

Stores and retrieves C2PA Manifest Stores in WARC 1.1 files (ISO 28500). The manifest is stored as a WARC record of a dedicated c2paprovenance type with Content-Type: application/c2pa, as the last record in the file.

WARC is used by national libraries, legal deposit systems, and digital preservation institutions to archive web content. This crate enables content provenance for archived web resources.

Zero dependencies.

Quick Start

[dependencies]
c2pa-warc = "0.1"

Append a manifest

use c2pa_warc::append_manifest;

let warc_data: &[u8] = /* existing WARC file bytes */;
let manifest: &[u8] = /* C2PA manifest store bytes */;
let signed = append_manifest(warc_data, manifest, "urn:uuid:12345678-1234-1234-1234-123456789012").unwrap();

Read a manifest

use c2pa_warc::read_manifest;

let manifest = read_manifest(&warc_data).unwrap();

Multiple manifests

A WARC file carries at most one manifest record, always last. An update removes the existing manifest record and appends the replacement, which leaves the bytes of every other record unchanged. When WARC files are concatenated, the combining tool appends a fresh manifest covering all records in the combined file and removes the constituent manifest records, which may be referenced as ingredients.

Example

cargo run --example make_sample_warc writes a minimal WARC (examples/sample.warc) containing a warcinfo record, one captured response record, and a trailing c2paprovenance record whose block is a real C2PA Manifest Store, then extracts it back to examples/sample.manifest.c2pa. The manifest record header:

WARC/1.1
WARC-Type: c2paprovenance
WARC-Record-ID: <urn:uuid:...>
WARC-Date: ...
Content-Type: application/c2pa
Content-Length: 3576

Design

  • Manifest stored as a WARC record of a dedicated c2paprovenance type, as the last record in the file; it carries no WARC-Target-URI
  • At most one manifest record; an update removes the existing one and appends the replacement
  • Manifest records are identified by WARC-Type: c2paprovenance together with Content-Type: application/c2pa

Scope

This crate implements embedding and extraction only. Content binding — the C2PA collection data hash, computed over each record's uncompressed bytes — is out of scope; use the official C2PA SDK to build and sign manifests.

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-text-binding Soft binding and content fingerprinting for text assets
c2pa-vtt WebVTT caption and subtitle embedding
c2pa-zip ZIP-based documents: EPUB, DOCX, ODT, OXPS
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c2pa_warc-0.2.0.tar.gz (25.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

c2pa_warc-0.2.0-cp39-abi3-win_amd64.whl (122.2 kB view details)

Uploaded CPython 3.9+Windows x86-64

c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (260.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (255.1 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

c2pa_warc-0.2.0-cp39-abi3-macosx_11_0_arm64.whl (225.3 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

c2pa_warc-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl (226.7 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file c2pa_warc-0.2.0.tar.gz.

File metadata

  • Download URL: c2pa_warc-0.2.0.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for c2pa_warc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 41d04ab53e26e4aacf3e77aa9be0ca41cef81f83d7b02d9efd7cec0d725ae542
MD5 c6a34e2d57b04ce1a62b679d399379e0
BLAKE2b-256 2545682b32004c52397018a1daa77e4829f21091233dfafaccc8583a5f4e797b

See more details on using hashes here.

Provenance

The following attestation bundles were made for c2pa_warc-0.2.0.tar.gz:

Publisher: release.yml on writerslogic/c2pa-warc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file c2pa_warc-0.2.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: c2pa_warc-0.2.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 122.2 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

Hashes for c2pa_warc-0.2.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0758c0027c34831b2123f07bb995dc9d4882bd11c51ba9a8a79cb8631351eac1
MD5 627280d3951796f991db0282660fff06
BLAKE2b-256 ececab0170d9e437486781d2f2bf7f998cdd826dd662dd368c0f225c0f846342

See more details on using hashes here.

Provenance

The following attestation bundles were made for c2pa_warc-0.2.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on writerslogic/c2pa-warc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e00d9bc913cf0d41181a33cd505f53643f23fd61e461c44bd240e7212418940f
MD5 2b23652504db9d881001a4f68e9ad92f
BLAKE2b-256 4ee13053a847c7faffe2d60847445a203eb1646a8735c313045388bbe4235d38

See more details on using hashes here.

Provenance

The following attestation bundles were made for c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on writerslogic/c2pa-warc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 788ec53b534512033c85e41e0c68a10852f8a4c563c5b2320b30ac0898668ccf
MD5 513d1aabe332f2ffb2f018d896bebc06
BLAKE2b-256 0ef5453e8b6399bd8c85bd39bd9ee8c38bace620bbdce6805f5d0fae4ed73d2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for c2pa_warc-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on writerslogic/c2pa-warc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file c2pa_warc-0.2.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for c2pa_warc-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db07c99e7b5c5f1815d341c459928785825e72f6539c30219d319682f4d59e3d
MD5 243731cb28b4c23d98453748da764093
BLAKE2b-256 ed15db24127b7e555c60855bc85965d7bd2d53fe7488b24ca86154a28912be2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for c2pa_warc-0.2.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on writerslogic/c2pa-warc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file c2pa_warc-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for c2pa_warc-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6f0a7cfa3ec970cbff1acb83d1662be3bc4406090e6adbe6c0eeed8b4d57eab3
MD5 5d60313cad18ff535bdee998b4ad26d1
BLAKE2b-256 74dd915c00de138b00145301380be16c66af0449fb76cf935265aaa9a2436c21

See more details on using hashes here.

Provenance

The following attestation bundles were made for c2pa_warc-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on writerslogic/c2pa-warc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.1

6 files

This release

0.2.0 This release

6 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page