Python library and CLI for Domain-based Integrity Verification Enforcement (DIVE)
Project description
OpenDIVE: Python Client for Domain-based Integrity Verification Enforcement (DIVE)
OpenDIVE is a Python client library for the DIVE protocol (Domain-based Integrity Verification Enforcement), a cryptographic protocol that leverages DNSSEC to verify the integrity and authenticity of web resources. DIVE operates as an additional security layer above HTTP/HTTPS, ensuring that resources are signed and validated against DNS-published keys.
Features
- DNSSEC-backed verification: Uses DNS TXT records (
_dive,_divekey) to publish policies and public keys. - Cryptographic signatures: Supports Ed25519 and Ed448 for signing, and SHA-256/384/512 for hashing.
- CLI tool: Includes commands for verification, key generation, signing, and DNS inspection.
- Incremental deployment: Works alongside existing infrastructure without breaking non-DIVE clients.
- Reporting: Sends verification failure reports to a configurable endpoint.
Installation
From PyPI (Alpha Release)
pip install opendive-client
From Source
git clone https://github.com/diveprotocol/opendive-client.git
cd opendive-client
pip install -e .
Dependencies
- Python 3.8+
dnspython(DNSSEC resolution)cryptography(Ed25519/Ed448 support)httpx(HTTP client)click(CLI)
Usage
CLI Commands
OpenDIVE provides a CLI for common operations:
# Verify a resource
opendive verify https://example.com/file.tar.gz
# Download a resource (only if DIVE verification passes)
opendive download https://example.com/file.tar.gz
# Generate a key pair
opendive keygen --alg ed25519 --key-id mykey --domain example.com
# Sign a file
opendive sign myfile.tar.gz --private-key <base64_private_key> --key-id mykey
# Inspect DNS records
opendive dns example.com --key-id mykey
Python Library
from dive.client import DiveClient
client = DiveClient(require_dnssec=True)
result = client.verify("https://example.com/file.tar.gz")
if result.accepted:
print("Resource is authentic!")
else:
print(f"DIVE rejected resource: {result.failure_reason}")
Documentation
DIVE Protocol
- Draft RFC (Work in Progress)
- DIVE Website
OpenDIVE API
- CLI Reference (TODO)
- Python API (TODO)
Development
Running Tests
pytest tests/
Contributing
Pull requests are welcome! For major changes, please open an issue first.
License
MIT License. See LICENSE for details.
Security
For security issues, see SECURITY.md.
Contact
- Author: Matéo Florian CALLEC
- Email: mateo@callec.net
- GitHub: @diveprotocol
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 opendive_client-0.2.0.tar.gz.
File metadata
- Download URL: opendive_client-0.2.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ed747e7bfee0a59e22ed6ba4e2b9dd7b13d1aee68321b019190d20d6112abc3
|
|
| MD5 |
49a54c44e319483190a6f7845eae0a74
|
|
| BLAKE2b-256 |
549bc0eb3bbc6962f570789db6d4a699eb60809497e7b8b82680c632bd5310f2
|
Provenance
The following attestation bundles were made for opendive_client-0.2.0.tar.gz:
Publisher:
publish.yml on diveprotocol/opendive-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opendive_client-0.2.0.tar.gz -
Subject digest:
2ed747e7bfee0a59e22ed6ba4e2b9dd7b13d1aee68321b019190d20d6112abc3 - Sigstore transparency entry: 1370833396
- Sigstore integration time:
-
Permalink:
diveprotocol/opendive-client@0daee1591ad7846707ad33ed690b4e6971dabe7f -
Branch / Tag:
refs/tags/v0.2.0+draft-01 - Owner: https://github.com/diveprotocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0daee1591ad7846707ad33ed690b4e6971dabe7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file opendive_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: opendive_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27582108eafc086ac931402d9b3b1a29e61a384e1dd54437467e54cdf47f88aa
|
|
| MD5 |
d44223d49d88148503e6147fa632c998
|
|
| BLAKE2b-256 |
4c13035c91bbe4600be3a395077abb8bd02edd58893d10cd218b1ab1b5450a45
|
Provenance
The following attestation bundles were made for opendive_client-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on diveprotocol/opendive-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opendive_client-0.2.0-py3-none-any.whl -
Subject digest:
27582108eafc086ac931402d9b3b1a29e61a384e1dd54437467e54cdf47f88aa - Sigstore transparency entry: 1370833460
- Sigstore integration time:
-
Permalink:
diveprotocol/opendive-client@0daee1591ad7846707ad33ed690b4e6971dabe7f -
Branch / Tag:
refs/tags/v0.2.0+draft-01 - Owner: https://github.com/diveprotocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0daee1591ad7846707ad33ed690b4e6971dabe7f -
Trigger Event:
release
-
Statement type: