Crates.io | py-ed25519-bindings |
lib.rs | py-ed25519-bindings |
version | 0.1.2 |
source | src |
created_at | 2020-08-28 10:19:33.962941 |
updated_at | 2020-11-15 13:00:58.007492 |
description | Python bindings for the ed25519-dalek RUST crate |
homepage | https://github.com/polkascan/py-ed25519-bindings |
repository | https://github.com/polkascan/py-ed25519-bindings |
max_upload_size | |
id | 281815 |
size | 24,665 |
Python bindings for the ed25519-dalek RUST crate
https://docs.rs/py-ed25519-bindings
pip install py-ed25519-bindings
pip install -r requirements.txt
maturin develop
pip install -r requirements.txt
# Build local OS wheelhouse
maturin build
# Build manylinux1 wheelhouse
docker build . --tag polkasource/maturin
docker run --rm -i -v $(pwd):/io polkasource/maturin build
import bip39
import ed25519
message = b"test"
# Get private and public key from seed
seed = bip39.bip39_to_mini_secret('daughter song common combine misery cotton audit morning stuff weasel flee field','')
private_key, public_key = ed25519.ed_from_seed(bytes(seed))
# Generate signature
signature = ed25519.ed_sign(public_key, private_key, message)
print(signature.hex())
# Verify message with signature
if ed25519.ed_verify(signature, message, public_key):
print('Verified')
https://github.com/polkascan/py-ed25519-bindings/blob/master/LICENSE