pylongfellow
pylongfellow provides a Python interface to implementations of
Longfellow zero-knowledge proofs over ISO 18013-5 mdoc
credentials.
Two backends are supported:
The package is experimental and unstable.
Installation
pip install pylongfellow
Wheels containing both backends are published for CPython 3.11–3.14 on Linux x86_64
(manylinux and musllinux). On any other platform pip falls back to the source distribution,
which builds both backends locally — see the
development page.
Usage
import cbor2
from pylongfellow import Pylongfellow, mdoc
from pylongfellow.backends.google_cpp import find_zk_spec
longfellow = Pylongfellow(backend="google-cpp")
# The circuit_hash is pre-shared between prover and verifier.
spec = find_zk_spec("longfellow-libzk-v1", circuit_hash)
circuit = longfellow.generate_circuit(spec) # or Path(...).read_bytes()
longfellow.load_circuit(spec, circuit)
claims = [mdoc.RequestedAttribute("org.iso.18013.5.1", "age_over_18", cbor2.dumps(True))]
issuer_public_key = mdoc.PublicKey(x, y)
proof = longfellow.prove(credential, issuer_public_key, transcript, claims, now)
longfellow.verify(issuer_public_key, transcript, claims, now, proof, doctype) # raises on failure
Examples are in examples/.
Documentation
https://pylongfellow.readthedocs.io/en/stable/. The API reference is generated from the docstrings and carries the exact types of every function.
Upstream
Both backends are vendored as git submodules and built from source into each wheel:
google/longfellow-zk— pinned to v0.9 (fe83ec6).abetterinternet/zk-cred-longfellow— pinned tob22d84e. Upstream publishes no tags.
The pins do not float: upstream ABIs and circuits can change between releases. A nightly canary runs the differential suite against both upstream HEADs.
Development
git submodule update --init --recursive
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypy
Build prerequisites and single-backend builds are on the development page.
Status
You should not rely on this code.
- Wheels cover CPython 3.11–3.14 on Linux x86_64 only; other platforms build from source.
- The API changes between minor versions.
License
pylongfellow is licensed Apache-2.0.
The vendored backends are licensed as follows:
google/longfellow-zk— Apache-2.0abetterinternet/zk-cred-longfellow— MPL-2.0
pylongfellow is not affiliated with Google, ISRG, or the European Commission.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 pylongfellow-0.5.2.tar.gz.
File metadata
- Download URL: pylongfellow-0.5.2.tar.gz
- Upload date:
- Size: 20.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8abb7ddbb59b3d83a55496a462510026b19ca11c02881789208bd975a2f37e1
|
|
| MD5 |
642c838de61a2cd5939150afbc81c1af
|
|
| BLAKE2b-256 |
f15cad9c948e1d472218ffdc9c3fa9326083815ff9b7e4c582c9aa51b6c91358
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2.tar.gz:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2.tar.gz -
Subject digest:
f8abb7ddbb59b3d83a55496a462510026b19ca11c02881789208bd975a2f37e1 - Sigstore transparency entry: 2373482074
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
177c579ae75d181592205ea85f000a37bd347e6672310e6116816404a7afde8c
|
|
| MD5 |
ef3793c4ca88d5ff6c3ebbca224dbd34
|
|
| BLAKE2b-256 |
0e3426266f73a646f857a70bb3120f422bb788466e8c83887cdc3e0b4f10fcf4
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl -
Subject digest:
177c579ae75d181592205ea85f000a37bd347e6672310e6116816404a7afde8c - Sigstore transparency entry: 2373482412
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e78c9baa488770b3ee91f4a5287602a9763e56005de9f07972bcc91d98b08b79
|
|
| MD5 |
9d2665d9abb7a47bc392d034ec8fd035
|
|
| BLAKE2b-256 |
ae0444ae6e38ab9fde4f2bf36cf2fb0f8f947c053291d34a935ad581b76032ec
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl -
Subject digest:
e78c9baa488770b3ee91f4a5287602a9763e56005de9f07972bcc91d98b08b79 - Sigstore transparency entry: 2373482150
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bde3d2a243b896597a353d67dc36ec32c4976cc2bdac82e36148654b0bf2f314
|
|
| MD5 |
97a2f6ecc844efd6109c5ae63ddf698e
|
|
| BLAKE2b-256 |
5ec6d69d93c02095f54a31f55edfcb653645ac7a137256d2a2650659bbfef64f
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl -
Subject digest:
bde3d2a243b896597a353d67dc36ec32c4976cc2bdac82e36148654b0bf2f314 - Sigstore transparency entry: 2373482598
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fe65dab0cebde86a06520bd6130377c532bfd557ed72effc145cea92380e057
|
|
| MD5 |
bc97b08d4f65d82330c59d3459801100
|
|
| BLAKE2b-256 |
e8299b9b2203ee906cd14a56ee5846d0bc9667f2e18053c8e3ab57e44d0d91d1
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl -
Subject digest:
1fe65dab0cebde86a06520bd6130377c532bfd557ed72effc145cea92380e057 - Sigstore transparency entry: 2373482696
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3357e40c5a2f0293748e339e1cd5c2d1a178ea0a6d6a5f73020c166b94415995
|
|
| MD5 |
b9dcf88a4900b916ab57d64c4e30f0f9
|
|
| BLAKE2b-256 |
ea5960b27ec3c7f83ea4d57d1093993aee223e3a8d3bd97962dec795baf48ff2
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl -
Subject digest:
3357e40c5a2f0293748e339e1cd5c2d1a178ea0a6d6a5f73020c166b94415995 - Sigstore transparency entry: 2373482256
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1223ade17298884fddfc1da903994dec75a7cab1134fb1f979870c80a2edd9a7
|
|
| MD5 |
8662044ccb02df32f1a6fc7319825d59
|
|
| BLAKE2b-256 |
0a90294f77b543882920cf047f83c59a5c8ba0c31c905a39964ae093c3825ba4
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
1223ade17298884fddfc1da903994dec75a7cab1134fb1f979870c80a2edd9a7 - Sigstore transparency entry: 2373482333
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e62fc04cd4b05cdcea3815b68c8633fabe050424e244140ebeec1d2caa4eccac
|
|
| MD5 |
6696c4713d6f4ed72a43b145e58fba49
|
|
| BLAKE2b-256 |
352f3f5650ca06026056d410433c5a8a60c7311fa5f03d13d76033019b99bf3b
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl -
Subject digest:
e62fc04cd4b05cdcea3815b68c8633fabe050424e244140ebeec1d2caa4eccac - Sigstore transparency entry: 2373482479
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d209af443e52e7522906ec874ea359aba1a0647cba0b2dd4b9d8e5734530ef1d
|
|
| MD5 |
97f4d4317bdfd0d90be2b7e30e713690
|
|
| BLAKE2b-256 |
6a630b76708c6a3f3ff63c612c5ee0341db7d32927ed8dfaa8ae848ea59c50fa
|
Provenance
The following attestation bundles were made for pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on pipe23-org/pylongfellow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl -
Subject digest:
d209af443e52e7522906ec874ea359aba1a0647cba0b2dd4b9d8e5734530ef1d - Sigstore transparency entry: 2373482529
- Sigstore integration time:
-
Permalink:
pipe23-org/pylongfellow@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/pipe23-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91f25215a4aefecb61e0aa53c6789cda51ad71d3 -
Trigger Event:
push
-
Statement type: