Skip to main content

Encryption modules applied to NEM.

Project description

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

Require
-------
Python3 (>=3.5)

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

Install
------
```commandline
pip install nem-ed25519
or
pip install git+https://github.com/namuyan/nem-ed25519.git
```

Samples1
------
```python
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)
```

Samples2
--------
```python
from nem_ed25519.base import Ed25519 as ecc
sk = ecc.secret_key()
pk = ecc.public_key(sk)
ck = ecc.get_address(pk)
ecc.is_address(ck)
ecc.sign()
ecc.verify()
ecc.encrypt()
ecc.decrypt()
```

Author
------
[@namuyan_mine](http://twitter.com/namuyan_mine/)

Licence
-------
MIT

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

nem_ed25519-0.0.2.tar.gz (10.0 kB view details)

Uploaded Source

File details

Details for the file nem_ed25519-0.0.2.tar.gz.

File metadata

  • Download URL: nem_ed25519-0.0.2.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nem_ed25519-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9febd5efd5969cb034406edc27ca5e5ef4e71762d7f3c68c29c15d0c190cbe41
MD5 a0d06a5e708a3f9affeb01dffe6c2d8b
BLAKE2b-256 f9fa9d3fd318020ad67abeda8a262cee7adff28b41e78f59c5d51b32de920540

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