Skip to main content

c2pa-verify

Verificación offline y determinista de manifiestos C2PA, pensada para trabajo forense. Informa el estado de la firma y lo que el manifiesto declara, con la trazabilidad necesaria para reproducir el resultado.

Idioma: por ahora, la herramienta y su documentación están solo en español.

Language: for now, this tool and its documentation are available in Spanish only, including the API, the output and the state names. It does offline, deterministic C2PA manifest verification on top of c2pa-python, with hash-pinned trust lists and separate states for "valid" and "trusted".

Qué no hace

  • No dice si el contenido es verdadero. Una firma confiable indica quién firmó y que el archivo no cambió desde entonces.
  • No detecta IA. Informa lo que el manifiesto declara; no analiza píxeles ni puntúa.
  • AUSENTE no descarta nada: la mayoría de los archivos no tiene manifiesto, y las plataformas de mensajería suelen quitarlo.

Cuándo usar otra herramienta

c2pareader (MIT) lee lo que el archivo declara, en Python puro y sin dependencias, pero no verifica firmas. Este paquete hace el paso siguiente, verificar, a cambio de depender de c2pa-python y su biblioteca nativa. Son complementarios: uno sirve para leer rápido en cualquier lado, y el otro para saber si lo declarado tiene respaldo de firma.

Instalación y uso

Requiere Python 3.10 o posterior.

pip install git+https://github.com/Maxitelmo/c2pa-verify.git
c2pa-verify foto.jpg video.mp4
c2pa-verify --json foto.jpg
from c2pa_verify import verificar

r = verificar("foto.jpg")
print(r["estado"], r["etiqueta"], r["firmante"])

Estados

Estado Significado
CONFIABLE Manifiesto íntegro y firmante validado contra la lista de firmantes C2PA
VALIDO_NO_CONFIABLE Manifiesto íntegro; el firmante no está en la lista cargada
INVALIDO + invalidez: "credencial" Contenido íntegro, pero el certificado no es apto, venció o fue revocado
INVALIDO + invalidez: "integridad" El contenido no coincide con el firmado, o la firma no verifica
MALFORMADO Hay un manifiesto, pero no se puede leer
REMOTO El archivo remite a un manifiesto en internet, que no se descarga (hacerlo le avisaría a quien controla esa dirección)
AUSENTE No hay manifiesto
None No se pudo determinar; ver motivo. No significa que no haya manifiesto

Garantías

  • Sin red: sin OCSP, sin manifiestos remotos y con la lista de hosts vacía. Los tests lo comprueban con una escucha local y un control positivo.
  • Sin escrituras: el archivo solo se lee.
  • Listas fijadas: una lista cuyo SHA-256 no coincide con el fijado no se carga, y entonces nadie sale confiable.
  • Confianza atribuible: CONFIABLE exige que el SDK haya validado contra la lista de firmantes, no contra la de sellos de tiempo.
  • Trazable: cada resultado registra SHA-256 del archivo, fecha de lectura, versiones, hash de las listas y EKU aceptados.

El resultado depende de la fecha

Una firma sin sello de tiempo de una TSA anclada se valida con la fecha de lectura: cuando el certificado vence, el mismo archivo pasa a INVALIDO por credencial. Registrá siempre fecha_lectura_utc junto con el resultado.

Limitaciones conocidas

  • El SDK corre dentro del proceso: un archivo que haga fallar la biblioteca nativa puede cerrar el programa. Para lotes no confiables, conviene aislarlo en un proceso hijo.
  • Se detecta una biblioteca nativa ajena en la carpeta de trabajo y no se la carga, pero no se verifica el hash de la biblioteca efectivamente cargada.
  • Las identidades CAWG no se decodifican ni se resuelven.
  • Instalado pesa bastante: el paquete c2pa de c2pa-python ocupa unos 300 MB en Windows.
  • Las listas envejecen: actualizarlas requiere publicar una versión nueva (ver trust/README.md).

Ver también docs/HALLAZGOS-SDK.md.

Cómo verificar el método

El método está pensado para que cualquiera lo revise y lo reproduzca.

  1. Leer las reglas: los estados salen de _estado_c2pa, _tipo_invalidez y _extraer_info_c2pa, en verificador.py. La configuración del SDK está en settings_c2pa, en listas.py.

  2. Correr los tests:

    git clone https://github.com/Maxitelmo/c2pa-verify.git
    
    cd c2pa-verify
    
    pip install -e .[dev]
    
    python -m pytest
    

    Firman sus propios archivos con una CA y una TSA descartables, contra el SDK real, y cubren cada estado.

  3. Cotejar las listas: el SHA-256 de cada lista debe coincidir con el archivo original de conformance-public en el commit indicado en trust/README.md.

  4. Contrastar resultados: lo declarado se puede comparar con c2pareader o c2patool. El estado de la firma solo es comparable si la otra herramienta carga las mismas listas y acepta los mismos EKU.

Límite de la validación: el repositorio no incluye imágenes reales. También se midió sobre un banco propio de 54 archivos que no se publica porque incluye material de terceros, así que esa medición no se puede reproducir desde acá. Los tests sí.

Si encontrás un resultado incorrecto, abrí un issue. No subas evidencia ni archivos de una causa: alcanza con los códigos de --json, sin datos que identifiquen, o con un archivo de prueba propio.

Licencia

Apache-2.0 (ver LICENSE y NOTICE). Las listas de confianza son de C2PA Conformance, bajo CC BY 4.0.

Metadata

Release files for c2pa-verify 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for c2pa-verify 0.1.0
File Size Uploaded Provenance Actions
c2pa_verify-0.1.0.tar.gz 80.8 kB With provenance Details for c2pa_verify-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for c2pa-verify 0.1.0
File Interpreter ABI Platform Actions
c2pa_verify-0.1.0-py3-none-any.whl Python 3 none any Details for c2pa_verify-0.1.0-py3-none-any.whl

Total release size: 154.4 kB

Release files / c2pa_verify-0.1.0.tar.gz

Download URL c2pa_verify-0.1.0.tar.gz
Size 80.8 kB
Tags Source
SHA-256 checksum
How to use checksums
436d470341b68b366a00c4ee941467322860d163280fa84d091c4da0467372a3
BLAKE2b-256 checksum
How to use checksums
5e84394349a910ed59e08d2a094fe62bac26ef24790992a65e0bc8b16db23614
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 4, 2026.

Transparency log

Release files / c2pa_verify-0.1.0-py3-none-any.whl

Download URL c2pa_verify-0.1.0-py3-none-any.whl
Size 73.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c574953e249b03b3d3eb17743cb8a8d33efd20e983b10fd79b470715dad7c8e
BLAKE2b-256 checksum
How to use checksums
29ad97fca2ab82de98d92a02ce90b64831c6a0e702391475286384c897537133
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 4, 2026.

Transparency log

Security for c2pa-verify 0.1.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.

Select from 2 files

Attestation for c2pa_verify-0.1.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 4, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page