Skip to main content

Python wrapper around implementation of the X25519 and Ed25519 cryptosystems

Project description

Python wrapper around implementation of the X25519 and Ed25519 cryptosystems

X25519

Import library:

from lib25519 import x25519

Key generation:

alicepk, alicesk = x25519.keypair()
bobpk, bobsk = x25519.keypair()

Shared-secret generation:

bobk = x25519.dh(alicepk, bobsk)
alicek = x25519.dh(bobpk, alicesk)

Check:

assert (alicek == bobk)

Ed25519

Import library:

from lib25519 import ed25519

Key generation:

alicepk, alicesk = ed25519.keypair()

Signature generation:

m = b'Hello'
sm = ed25519.sign(m, alicesk)

Signature verification and message recovery:

recoveredm = ed25519.open(sm, alicepk)

Check:

assert (m == recoveredm)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lib25519-20241004.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

lib25519-20241004.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file lib25519-20241004.1.tar.gz.

File metadata

  • Download URL: lib25519-20241004.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for lib25519-20241004.1.tar.gz
Algorithm Hash digest
SHA256 61b1d76df2d1f95078275bf4d8fd445c98812c51b4baaddd69fac984e310614f
MD5 9770df2611528c5a47fbc67d586fdcf7
BLAKE2b-256 ca74aab020af9b008a798eca814144aa5b5d4fe3b1e0e88da38fd75d7a77551b

See more details on using hashes here.

File details

Details for the file lib25519-20241004.1-py3-none-any.whl.

File metadata

  • Download URL: lib25519-20241004.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for lib25519-20241004.1-py3-none-any.whl
Algorithm Hash digest
SHA256 715cd23fb39d8f54017ebc8fac2cfc65c3a756777da2167fac63518f9035195d
MD5 3c301b7a9a412464c3d0ee33f978db09
BLAKE2b-256 c4957daf3e4df079619d5df44447055295ca61b9b62e272bf998e895cb63e099

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page