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

File metadata

  • Download URL: pylongfellow-0.7.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.7.0.tar.gz
Algorithm Hash digest
SHA256 82e9a2c5fc081a17fadafe95c854be4fd9940e5347f0708edfbd84e587041952
MD5 cb65462d7a5c1476a963eb20652c2d9f
BLAKE2b-256 4a65eeef1bc4302a5298da6ea5536a3c409979587c9d09bbf49967da906be3e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 193f6f2ee6db628394fbfe1b20b19ed199671a0b8b2041c1c2003dcfb2be75b1
MD5 56ca05aef77729bbc1486fdd68c04f32
BLAKE2b-256 1ceae3a6c36b43b0133d507d5c48b94b2a4ea14ec0dd2c90d59c8e22772b5eb2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 079942e0b425465ac1b7d47e954429725f6ca44d508813972cd9ba004c3554fe
MD5 f3a7b4e120e54a7748fdfec4d61a7c3a
BLAKE2b-256 f21935aae467cace49dec5a9247969f0059ebc8193a57f88d0e8b077c7c00244

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 414c75b121bf64c9d84edee30515d07ccdf5db4f6b39a6e2b6bbab14ae50717c
MD5 8f73949f98508b52cf41c9008a960e83
BLAKE2b-256 5e8aa23f4827ec29f1b30a14ff531cacaaf67e0daab3bbef9f48372e51bc16b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d01ddd1406254ca009c57cfe2452f4104a2cf2990837664aea3442629537fa1
MD5 863e3728f53ea985c4d643c59f3be903
BLAKE2b-256 32f1a0f101bccec958a356bad3669022a1665107e46a7ff7bb424274d2ec4699

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b1fcb7f77f94cb637780c8b6cb973fec5bcd50edc4786b0c57bca0f468020a08
MD5 53fdb582021cdfec5c5f8839aa6275aa
BLAKE2b-256 e47523ba0b86dd02219fb3f749fc78a95073fbff7bff71e293fda1de96eaa595

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 478ec11ef93886612538c7788ae6595acec2b29dfa0f5144a88108b3f85a6cfa
MD5 95189c1c92650b3e4b805d314591a873
BLAKE2b-256 d2ecf4503d89251910ebfd039f29909e3ece4e5975aadc013404e17dc3947c77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 09caea05a17dede431f68d325e46cde5d13182f21209175b703eae2d9f2f0504
MD5 3b8d97b86391b22aad2627df2ae36e0c
BLAKE2b-256 07dfd73815a68b3117820fef9af36425b8039690b9a0c2645d1bfe3ef5ed502b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.7.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b059133d6ae156d41354eda6ce0027024a994aab32b06e8df45222a6f48016bb
MD5 0fc985faba7d6c36c1f9ad9bff933e27
BLAKE2b-256 98319381ee9d2463037d9402a55448e6bb499acfbed1f996ee214218f4ad8359

See more details on using hashes here.

Provenance

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

This release

0.7.0 This release

9 files

0.6.0

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