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 generate_circuit

longfellow = Pylongfellow(backend="google-cpp")

circuit = generate_circuit(7, 1)  # or Path(...).read_bytes()
longfellow.load_circuit(circuit, 7, 1)

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 test 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.6.0.tar.gz (17.0 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.6.0-cp314-cp314-musllinux_1_2_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylongfellow-0.6.0-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.6.0.tar.gz.

File metadata

  • Download URL: pylongfellow-0.6.0.tar.gz
  • Upload date:
  • Size: 17.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pylongfellow-0.6.0.tar.gz
Algorithm Hash digest
SHA256 bc5ddc55b8483ccaca926a889de3ee8f63f75ac4db38b8cd4b0f5da58eb3fde9
MD5 a9b59eaf6aef9ebc8338fcf8bc913441
BLAKE2b-256 d39d2097aff39f6132fa618efd322b1399fe725b62b59281710a5a0904d34970

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0.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.6.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ae30da5fa8963438024a60aa0b770de42c3c2ae8cf335d3b7813046ee733adf1
MD5 91216c46f5986db00c9d9acfef053e21
BLAKE2b-256 7921c607e06c3d1bd113f052069e0104f66138ed89200c6f192e87f3a0f54eed

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e52fb562dc96e6ac59c3bc76b6a3f930adac0ff12becff528a38837018befdcc
MD5 117b8b9f91b49edb94c29c86e6216d0c
BLAKE2b-256 72c18b45990a49a516863fa065e454a54898e5c539ccbefea7e4fbb4728611b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e8e3ee240603f64f1852b7597ebcd508dc5d59cd32eff0b0dd575a68b780bcb3
MD5 00eadc2521f2542665decb67f5e40573
BLAKE2b-256 dd363fa8e2e6b71202e9da010a2d5226437650b2503361ade55986dc652c0b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1ebdd92411412d9fc958c1fde0f0cb01b14da64920ca4e29fbf6a23171cd543a
MD5 f74bc689cea00885f8e366d1509c1822
BLAKE2b-256 75d336efae487bc4c2f6e295381e3b20822414d72aa32c8e03b5592916df7f1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f697593c213f10f4353a76a6f6d79384ed091b7bdec795eee7304f4071c5f5a9
MD5 7073ddeddd92ddc4762d96e0fbfaa967
BLAKE2b-256 774a3f014bd3a119deaf6a843468bf90bc4a1ad8740b24268401dad7e88fdd63

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 674690cfaaca8f3443042c827009e831bf85648493de13c005c51cd679173dd0
MD5 b1d6faa3eda4dcdd15bcc1d12df4d71e
BLAKE2b-256 2c2583936c0182bd44e9d8a93157dde608277325b184853504612b2caf6344bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4c33018233ab3b4d902d901e43c7490ccf795578f585baff7c9503d784a28b4b
MD5 ed740e8331ffb452984fbdd08f16498f
BLAKE2b-256 096f26528a9e4575d9a702a1f22583aff4e78d8991b485f6b6332aef4092135e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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.6.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylongfellow-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0ffffd46eac44b7315bad7466ed7a1232856390942e435ed7d666ba2c8d9c471
MD5 d4769c47b32e5c36b6cefe3355246662
BLAKE2b-256 230bbb0c094d2c554d406b10bea52b9ac2556e353205afd5340ac9a8c34f07dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylongfellow-0.6.0-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

This release

0.6.0 This release

9 files

0.5.2

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