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-20230630.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lib25519-20230630.1.tar.gz
Algorithm Hash digest
SHA256 9d78dad9342532a11507541f6a7dafd62f240110aa09d2cd79c6954e46aa3a5c
MD5 04c1b530ea6a8974ea945c8c46e17408
BLAKE2b-256 2b3b15a92736808b97ee8ba66d83fb81a53653207f244ee4ea5f45c9f9df0975

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lib25519-20230630.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-20230630.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4327a00142fd2dffea6f0c5daf85f523624179c3a21b7ace7196092fe3033e8b
MD5 9b9620ef9e9f4edef64734eeaefc9b91
BLAKE2b-256 ce63b4117957ae56ad8f3e3644026e05dc2dbe6a83198ea0d883fb80d73cf17f

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