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.

Licensing

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.0.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.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.5.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.5.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.5.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.5.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.5.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.5.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.5.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.5.0.tar.gz.

File metadata

  • Download URL: pylongfellow-0.5.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f6ec719767c19c9ff0ea236e4d3aa73f6b9f341410bb64389b3431f0566414aa
MD5 cea1ffe87837e2d6fe41ab693b814120
BLAKE2b-256 05a513c86bc09256a611dde307c578a54e7b88cbb7046870498ddadb32407c98

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2a2f61003462ec45464d59b30422f0b16f10a024091ee4608fe4189c520c69e3
MD5 5533fdb966efccbceecfda941999c325
BLAKE2b-256 b7d4747ca661270bb66602249a81933aa40583417dd7fe3d5f69204c0abd9a8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 81d8a371843df39c21ad32c63187811ec6ab9267dfdbb3f95611a79c5f671ae5
MD5 aa9a5ecf52fbfccd53c1323982be8b81
BLAKE2b-256 053c12154cd9cc5bf0f2d9f9092af972d8ac426f4ed35a8296d7f1a96181ee04

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9a12afe3ab806de0a833b0da30ae5a6e0f1aaaebe7e8f14ab51fa78d9e65e978
MD5 113e1bcbc6bb74540f5b93c7b28387e1
BLAKE2b-256 f89b8c189510f7adc7abee2d1476c84e635aa47198adace101b5dd80a8fbea70

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 320a2829f2ec4f4f1199f45b67c6eaa371fedd78d278ffafceab851459b07c59
MD5 57a68a2325ec3df0d94803e822ebfceb
BLAKE2b-256 d2ac09ef3447ad0fc4cbd30096994b5479a357e5548dedfe2b29c8a674590df5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cc0ee31520d158817af5decc83bb06758462ef86a9184391bca112999a2ee8e3
MD5 fabcadf4b11d29981e7295ba4b09b7fa
BLAKE2b-256 16e557e7c8f24a96f834a6a9d77854dbd5cfc487d082e1a53e54aaef6820eaf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b86d142c22fd2c07aca44b9c83cf16ddc36e4ef1487597fc03cfc736ae185966
MD5 ea5e504c0425dfd2072f6a469db502dc
BLAKE2b-256 9f32c5dce203c425cdac22e1aebb2a2f1a21ef7b827660896173f117357a7c7e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 713fc2f283bd9cf04df950707edfa9795449553faf0676251a35f48b6a99b3e1
MD5 d240ab49a5aa57206d7313ba18131e4a
BLAKE2b-256 ab729c660cc821f0abc09510e21f2d838f0634123dedcf5b94338a31f31aa83f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylongfellow-0.5.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b9298d38473875534b09b6ed47fe91dffa17dee51a3723b5982b4d68031a1ae
MD5 01b7fd9cb72dc96a130c73c759fa958f
BLAKE2b-256 2ece2e75aead7f655c40398daa7e568348a4109805bf3b760f78ca7f4fbde249

See more details on using hashes here.

Provenance

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

0.6.0

9 files

0.5.2

9 files

0.5.1

9 files

This release

0.5.0 This release

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