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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d78dad9342532a11507541f6a7dafd62f240110aa09d2cd79c6954e46aa3a5c
|
|
| MD5 |
04c1b530ea6a8974ea945c8c46e17408
|
|
| BLAKE2b-256 |
2b3b15a92736808b97ee8ba66d83fb81a53653207f244ee4ea5f45c9f9df0975
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4327a00142fd2dffea6f0c5daf85f523624179c3a21b7ace7196092fe3033e8b
|
|
| MD5 |
9b9620ef9e9f4edef64734eeaefc9b91
|
|
| BLAKE2b-256 |
ce63b4117957ae56ad8f3e3644026e05dc2dbe6a83198ea0d883fb80d73cf17f
|