Skip to main content

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.

CI Docs PyPI Python License

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:

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.0
  • abetterinternet/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

pylongfellow-0.5.2.tar.gz (20.4 MB view details)

Uploaded Source

Built Distributions

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

pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Hashes for pylongfellow-0.5.2.tar.gz
Algorithm Hash digest
SHA256 f8abb7ddbb59b3d83a55496a462510026b19ca11c02881789208bd975a2f37e1
MD5 642c838de61a2cd5939150afbc81c1af
BLAKE2b-256 f15cad9c948e1d472218ffdc9c3fa9326083815ff9b7e4c582c9aa51b6c91358

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.5.2.tar.gz:

Publisher: release.yml on pipe23-org/pylongfellow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 177c579ae75d181592205ea85f000a37bd347e6672310e6116816404a7afde8c
MD5 ef3793c4ca88d5ff6c3ebbca224dbd34
BLAKE2b-256 0e3426266f73a646f857a70bb3120f422bb788466e8c83887cdc3e0b4f10fcf4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e78c9baa488770b3ee91f4a5287602a9763e56005de9f07972bcc91d98b08b79
MD5 9d2665d9abb7a47bc392d034ec8fd035
BLAKE2b-256 ae0444ae6e38ab9fde4f2bf36cf2fb0f8f947c053291d34a935ad581b76032ec

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bde3d2a243b896597a353d67dc36ec32c4976cc2bdac82e36148654b0bf2f314
MD5 97a2f6ecc844efd6109c5ae63ddf698e
BLAKE2b-256 5ec6d69d93c02095f54a31f55edfcb653645ac7a137256d2a2650659bbfef64f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1fe65dab0cebde86a06520bd6130377c532bfd557ed72effc145cea92380e057
MD5 bc97b08d4f65d82330c59d3459801100
BLAKE2b-256 e8299b9b2203ee906cd14a56ee5846d0bc9667f2e18053c8e3ab57e44d0d91d1

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3357e40c5a2f0293748e339e1cd5c2d1a178ea0a6d6a5f73020c166b94415995
MD5 b9dcf88a4900b916ab57d64c4e30f0f9
BLAKE2b-256 ea5960b27ec3c7f83ea4d57d1093993aee223e3a8d3bd97962dec795baf48ff2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1223ade17298884fddfc1da903994dec75a7cab1134fb1f979870c80a2edd9a7
MD5 8662044ccb02df32f1a6fc7319825d59
BLAKE2b-256 0a90294f77b543882920cf047f83c59a5c8ba0c31c905a39964ae093c3825ba4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e62fc04cd4b05cdcea3815b68c8633fabe050424e244140ebeec1d2caa4eccac
MD5 6696c4713d6f4ed72a43b145e58fba49
BLAKE2b-256 352f3f5650ca06026056d410433c5a8a60c7311fa5f03d13d76033019b99bf3b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d209af443e52e7522906ec874ea359aba1a0647cba0b2dd4b9d8e5734530ef1d
MD5 97f4d4317bdfd0d90be2b7e30e713690
BLAKE2b-256 6a630b76708c6a3f3ff63c612c5ee0341db7d32927ed8dfaa8ae848ea59c50fa

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.0

9 files

0.6.0

9 files

This release

0.5.2 This release

9 files

0.5.1

9 files

0.5.0

9 files

0.4.0

9 files

0.3.0

9 files

0.2.3

9 files

0.2.2

9 files

0.2.1

9 files

0.2.0

9 files

0.1.1

9 files

0.1.0

9 files

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