Skip to main content

Encryption modules applied to NEM.

Project description

NEM implementation ed26619 encryption modules for Python.
NEM use Keccak hash function, not same SHA3.

Python3 (>=3.5)

how to use
Please look [test codes folder.](test)

pip install nem-ed25519
pip install git+

This version need GMP.
*For Linux*
`apt-get install python3-gmpy2`

*For windows*
Download [pythonlibs](
`pip install gmpy2‑2.0.8‑cp36‑cp36m‑win_amd64.whl` If you use Python3.6 64bit

from nem_ed25519.key import secret_key, public_key, get_address
# secret key
sk = secret_key()
# public key
pk = public_key(sk)
# compressed key
ck = get_address(pk, main_net=True)

from nem_ed25519.signature import sign, verify
# sign message
sign = sign(msg=b'hello world', sk=sk, pk=pk)
# verify message
verify(msg=b'hello world', sign=sign, pk=pk)

from nem_ed25519.encrypt import encrypt, decrypt
# encrypt/decrypt message
sk1 = secret_key()
pk1 = public_key(sk1)
enc = encrypt(sk=sk, pk=pk1, msg=b'Hot potato.')
dec = decrypt(sk=sk1, pk=pk, enc=enc)

Import setting at first, and you can select encode mode.
Please look at [](test/
from nem_ed25519.base import Encryption
ecc = Encryption()



Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
nem_ed25519-0.0.9.tar.gz (6.3 kB) Copy SHA256 hash SHA256 Source None Aug 3, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page