Skip to main content

A Python tool for verifying entries in the Sigstore Rekor transparency log

Project description

Rekor Log Verification

A Python tool for verifying entries in the Sigstore Rekor transparency log. This project provides functionality to cryptographically verify artifact signatures, inclusion proofs, and consistency proofs against the Rekor public instance.

Overview

Rekor is an immutable, append-only transparency log designed to store metadata about software artifacts. This verifier allows you to:

  • Retrieve log entries by index from the Rekor transparency log
  • Verify inclusion proofs to confirm an entry exists in the log at a specific tree state
  • Verify consistency proofs to ensure the log satisfies the append-only property
  • Validate artifact signatures using public key cryptography
  • Fetch the latest checkpoint from the Rekor server

Features

  • ✅ Merkle tree inclusion proof verification (RFC 6962 compliant)
  • ✅ Merkle tree consistency proof verification
  • ✅ ECDSA signature verification for artifacts
  • ✅ Integration with Sigstore's Rekor public instance
  • ✅ Command-line interface with debug mode
  • ✅ Comprehensive error handling and input validation

Installation

Prerequisites

  • Python 3.9
  • pip3

Setup

pip3 install -r requirements.txt

Usage

Basic Command

python3 main.py --help

Get Latest Checkpoint

Retrieve the current state of the Rekor transparency log:

python3 main.py --checkpoint

With debug output (saves checkpoint to checkpoint.json):

python3 main.py --checkpoint --debug

Verify Inclusion Proof

Verify that a specific log entry exists in the transparency log and validate the artifact signature:

python3 main.py --inclusion <LOG_INDEX> --artifact <ARTIFACT_FILE>

Example:

python3 main.py --inclusion 126574567 --artifact artifact.md

Verify Consistency Proof

Verify that the log has grown consistently between two checkpoints:

python3 main.py --consistency \
  --tree-id <TREE_ID> \
  --tree-size <PREVIOUS_TREE_SIZE> \
  --root-hash <PREVIOUS_ROOT_HASH>

Example:

python3 main.py --consistency \
  --tree-id "737086e2-081a-4a2a-b8e2-60cff8839c3c" \
  --tree-size 150000000 \
  --root-hash "abcd1234..." \
  --debug

Project Structure

.
├── main.py              # Main CLI application with verification logic
├── merkle_proof.py      # Merkle tree proof verification (RFC 6962)
├── util.py              # Cryptographic utilities (key extraction, signature verification)
├── requirements.txt     # Python dependencies
├── artifact.md          # Sample artifact file
├── tests                # Unit tests folder         
└── README.md            

Dependencies

  • sigstore (3.6.5): Official Sigstore Python client
  • cryptography (≥41.0.0): Cryptographic operations and certificate handling
  • requests (≥2.28.0): HTTP client for Rekor API calls

Debug Mode

Enable verbose output and save intermediate results:

python3 main.py --checkpoint --debug

Template Source

Template code adapted from:

Course Information

This project was developed for CS-GY 9223 Assignment 1.

Repository: https://github.com/ssannkkallpp/cs-9223-assignment-1

References

License

MIT

Project details


Download files

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

Source Distribution

rekor_log_verifier-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

rekor_log_verifier-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file rekor_log_verifier-0.1.0.tar.gz.

File metadata

  • Download URL: rekor_log_verifier-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Darwin/24.5.0

File hashes

Hashes for rekor_log_verifier-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1fc86c26e2c4f868216cce828220a831a466f954d3afc96c3c8d3a18ab4ef1ac
MD5 298dcfe49e45daaf4285c0191b3b68de
BLAKE2b-256 8e035627f3f25ca81df15ec2bb96930c0c300e20d060e06de4210b303893d19a

See more details on using hashes here.

File details

Details for the file rekor_log_verifier-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rekor_log_verifier-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Darwin/24.5.0

File hashes

Hashes for rekor_log_verifier-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af49715bf189f5c185db95d6e2eb3c8d5194e48a032d44fb1637cc36abf2db2e
MD5 7b4c166bfd1616d124c075913c7af402
BLAKE2b-256 7a59fcd51126e7469fb325dc498ddbe8b393945d7624efb0d5315ca40a72cd5a

See more details on using hashes here.

Supported by

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