c2pa-verify
Offline, deterministic verification of C2PA manifests, built for forensic work. It reports the state of the signature and what the manifest declares, with the traceability needed to reproduce the result.
What it does not do
- It does not say whether the content is true. A trusted signature tells you who signed and that the file has not changed since.
- It does not detect AI. It reports what the manifest declares; it does not analyze pixels and does not score anything.
ABSENTrules nothing out: most files have no manifest, and messaging platforms usually remove it.
When to use another tool
c2pareader (MIT) reads what a file declares, in pure Python with no dependencies, but it does not verify signatures. This package takes the next step, verification, at the cost of depending on c2pa-python and its native library. They are complementary: one reads quickly anywhere, the other tells you whether what is declared is backed by a signature.
Install and use
Requires Python 3.10 or later.
pip install c2pa-verify
c2pa-verify --lang en photo.jpg video.mp4
c2pa-verify --lang en --json photo.jpg
from c2pa_verify import verify
r = verify("photo.jpg")
print(r["state"], r["label"], r["signer"])
The default language of the command is Spanish, so pass --lang en. The language
is always chosen explicitly and never taken from the machine's settings: the same
file gives the same output on any computer. In Python, verify() returns English and
verificar() returns Spanish. Both run the same verification. Code comments are in
Spanish for now.
Building your own result
For tools that build their own report on top of the same verification, version 0.3.0
exposes the read that verificar() uses internally. These functions use the Spanish
field names, with no English translation, and verificar() and verify() do not
change.
-
leer_manifiesto(path): the raw SDK read. It does not compute the file's SHA-256, does not look for JUMBF boxes and does not callsdk_no_lee(): that is left to the caller. It returnsNoneif c2pa-python is not available, or a dict that is one of these:{"presente": False, "estado_c2pa": "AUSENTE"}: there is no manifest.{"presente": False, "error": ...}: the SDK could not read the file or the manifest. The caller decides whether it isMALFORMADO.{"presente": False, "no_soportado": True}: the SDK does not read the format.{"presente": False, "estado_c2pa": "REMOTO", "url_remota": ...}: the manifest is at a remote address that is not downloaded.- the dict from
extraer_info(), withpresente: Truewhen there is an active manifest.
Every dict also carries
listas_confianzaandeku_aceptados. This dict is a stable contract. -
extraer_info(manifest_store, uri_firmantes=None): the pure parser of the manifest JSON, with no I/O and no SDK. Useful for tests. -
sdk_disponible(): whether c2pa-python can be loaded in this process. -
motivo_sin_sdk(): why c2pa-python was not loaded (for example, a foreign native library in the working directory), orNone. It reflects the lastsdk_disponible(),version_c2pa_python()orverificar()and does not try to load it. -
sdk_no_lee(header): whether the first bytes belong to a format the installed SDK does not read. It is decided by the header, not by the extension. -
reiniciar(): discards the cached SDK context, so the next read loads the trust lists again.
from c2pa_verify import leer_manifiesto, motivo_sin_sdk, sdk_disponible
if not sdk_disponible():
print(motivo_sin_sdk() or "c2pa-python is not available")
else:
info = leer_manifiesto("photo.jpg")
print(info.get("estado_c2pa"), info.get("firmante"))
States
| State | Meaning |
|---|---|
TRUSTED |
Manifest intact, and signer validated against the C2PA signers list |
VALID_UNTRUSTED |
Manifest intact, but the signer is not on the loaded trust list |
INVALID + invalidity: "credential" |
Content intact, but the certificate is unsuitable, expired or revoked |
INVALID + invalidity: "integrity" |
The content does not match what was signed, or the signature does not verify |
MALFORMED |
There is a manifest, but it cannot be read |
REMOTE |
The file points to a manifest on the internet, which is not downloaded (doing so would alert whoever controls that address) |
ABSENT |
There is no manifest |
None |
Could not be determined; see reason. It does not mean there is no manifest |
VALID_UNTRUSTED does not mean the signature is fake. The signature verifies and
the content is the one signed. It only means the signer is not on the list loaded in
this version, so its identity is not vouched for by that list.
SDK validation codes such as assertion.dataHash.mismatch are C2PA standard names
and are not translated.
Guarantees
- No network: no OCSP, no remote manifests, and an empty list of allowed hosts. The tests check this with a local listener and a positive control.
- No writes: the file is only read.
- Pinned lists: a list whose SHA-256 does not match the pinned one is not loaded, and then nobody comes out as trusted.
- Attributable trust:
TRUSTEDrequires that the SDK validated against the signers list, not the time-stamp list. - Traceable: each result records the file's SHA-256, the read date, versions, the hash of the lists and the accepted EKUs.
The result depends on the date
A signature without a time-stamp from an anchored TSA is validated against the read
date: once the certificate expires, the same file becomes INVALID by credential.
Always record read_at_utc with the result.
Known limitations
- The SDK runs inside the process: a file that makes the native library fail can close the program. For untrusted batches, isolate it in a child process.
- A foreign native library in the working directory is detected and not loaded, but the hash of the library actually loaded is not verified.
- CAWG identities are neither decoded nor resolved.
- The install is heavy: the
c2papackage from c2pa-python takes about 300 MB on Windows. - Lists age: an installation keeps the lists of its version until updated. A weekly
job opens an issue in this repository when the source changes, but updating them
takes a review and a new release (see
trust/README.en.md).
To see which lists were used, check
trust_listsin the result.
See also docs/SDK-FINDINGS.md.
How to verify the method
The method is meant to be reviewed and reproduced by anyone.
-
Read the rules: states come from
_estado_c2pa,_tipo_invalidezand_extraer_info_c2pa, in verificador.py. The SDK configuration is insettings_c2pa, in listas.py. The English output is produced from that same result in english.py. -
Run the tests:
git clone https://github.com/Maxitelmo/c2pa-verify.git
cd c2pa-verify
pip install -e .[dev]
python -m pytest
They sign their own files with a throwaway CA and TSA, against the real SDK, and cover each state.
-
Check the lists: the SHA-256 of each list must match the original file in conformance-public at the commit given in trust/README.en.md.
-
Compare results: what is declared can be compared with c2pareader or c2patool. The signature state is only comparable if the other tool loads the same lists and accepts the same EKUs.
Limit of the validation: the repository contains no real images. It was also measured on a private set of 54 files, not published because it includes third-party material, so that measurement cannot be reproduced from here. The tests can.
If you find a wrong result, please open an issue. Do not upload evidence or files
from a case: the codes from --json are enough, without identifying data, or a test
file of your own.
License
Apache-2.0 (see LICENSE and NOTICE). The trust lists are from C2PA Conformance, under CC BY 4.0.
Metadata
Release files for c2pa-verify 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_verify-0.3.0.tar.gz | 95.9 kB | With provenance | Details for c2pa_verify-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| c2pa_verify-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for c2pa_verify-0.3.0-py3-none-any.whl |
Total release size: 178.0 kB
Release files / c2pa_verify-0.3.0.tar.gz
| Download URL | c2pa_verify-0.3.0.tar.gz |
|---|---|
| Size | 95.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a91bfd6f1789769eeb11f70f9f2ca8ed0ab6186136105194f4d5bad3d21c8aca
|
|
BLAKE2b-256 checksum How to use checksums |
7692a4f314783a83311ad302bf7e7d39495c260e93bf6a35de0689e6fd2c8708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 9, 2026.
Transparency logRelease files / c2pa_verify-0.3.0-py3-none-any.whl
| Download URL | c2pa_verify-0.3.0-py3-none-any.whl |
|---|---|
| Size | 82.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fe8f50a0dd67c29aff145940e9e383f0b342b96c81e2016f3a95d2be1e67c01
|
|
BLAKE2b-256 checksum How to use checksums |
d870c9476b990ac94e32f6920f54bceafc1ea2db760319da14273236acff58cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 9, 2026.
Transparency logSecurity for c2pa-verify 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
Both files in this release have been uploaded with provenance metadata.
Attestation for c2pa_verify-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 Nov 9, 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.