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.1.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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: pylongfellow-0.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 33fe942c099a1240edc0f298f25f4fff7365c636d2d8c1a0b37e46d09259dc03
MD5 89ca99b77dec200d1ff0d05266f4b0b2
BLAKE2b-256 50c05c8e3a411a1f1e276d424e868f39f404390ad54837e5920e938e4d117423

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 372987c35ef292467ef78938c9efe0408b608cc4088d56e2ea98f1315e4538f2
MD5 7de42efe4a9410ad10c04ba9277c5079
BLAKE2b-256 ebc276011816bac46352458310e2f69e2e1475acd8d5838d9904c21cef11077b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a80f2682a1cbe47b92d85ba4f3eda7b2a4c746835a20fbeddd4c6da664e44d18
MD5 430b6dd8796b4f698a82049f39069cbd
BLAKE2b-256 d053479c8f2cdd82a55539dad66c8b3fefe2c29138a5bab100d3f4ba5e6b32b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d61c4377e33a6c4dc1412cd44506576f34cc22fb2bbb4bc1b783e576e7269b65
MD5 3da87679b90a748ace69aec61a84c826
BLAKE2b-256 957d0223f54a9441d26d5269b760cf39f2e22dc73d1bb59571eee9269989cd69

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a2d85dbb1ab981910e64827edbf094695bedd882255eac5a5e0270aab5a030ab
MD5 bbd3be9b47f6b117b68bc42b79294004
BLAKE2b-256 9033dc6069de4ea1f675eb7578bc04ccbbb260b6fa63744d8d11b6923134e7c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d5257b593943d9dabbac8708ec72beae300480dfad310f7c6b86155fb04c3b19
MD5 59e1c514d28bb5a8740f1d664c1955f6
BLAKE2b-256 1495ef96013352f6e45e972f8465a7eef10ee1d5e835fb4324681c94d6df937b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8660303843f8c92a077e7b5dc170d1a8d57fca05bdd0b427bb4965831bb66c60
MD5 9f1696bd659b3829537d3533b14ac14c
BLAKE2b-256 69c75e62e5188f0ebc8002ebd142178b39951c701d0f884cab3c56b36cf4b29c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 988108f24a43418a2ad6dde4d98c85cd6d43609843371b1318af4667e50a2e82
MD5 d942ee97c2d0d20a3327ab001284e79f
BLAKE2b-256 3dd310d8d483a889603a3dbefece0c6451b48292b423db80ffd7311cf151e5d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6340b30c3182fa5b6125730ec4713f23f05491e3c5085a0859668fea0c55a1d4
MD5 0fdc9b58a25bcc6e03b3dae5ecd1e274
BLAKE2b-256 91120f4d2da6f2504ebb0fe5964468984f07706c570ea939775eeefa261565cb

See more details on using hashes here.

Provenance

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

0.5.2

9 files

This release

0.5.1 This release

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