Skip to main content

Native crypto functions for the NEO 3 Blockchain

Project description

CoZ logo

NEO3VM

C++ implementations of cryptographic functions used in the NEO3 Blockchain with bindings for Python 3.7 & 3.8.

The current version only supports EllipticCurve functions by wrapping micro-ecc) and exposing helper classes. SECP256R1 (a.k.a NIST256P) and SECP256K1 are the only curves exposed, but others can easily be enabled if needed.

Installation

pip install neo3crypto

Or download the wheels from the Github releases page.

Usage

import hashlib
import os
from neo3crypto import ECCCurve, ECPoint, sign, verify


curve = ECCCurve.SECP256R1
private_key = os.urandom(32)
public_key = ECPoint(private_key, curve)

signature = sign(private_key, b'message', curve, hashlib.sha256)
assert ecdsa.verify(signature, b'message', public_key, hashlib.sha256) == True

Any hashlib hashing function can be used. Further documentation on the classes can be queried from the extension module using help(neo3crypto).

Building wheels

Make sure to have wheel and CMake installed. Then call python setup.py bdist_wheel.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

neo3crypto-0.1-cp38-cp38-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

neo3crypto-0.1-cp38-cp38-manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

neo3crypto-0.1-cp38-cp38-macosx_10_9_x86_64.whl (290.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

neo3crypto-0.1-cp37-cp37m-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

neo3crypto-0.1-cp37-cp37m-manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

neo3crypto-0.1-cp37-cp37m-macosx_10_9_x86_64.whl (288.8 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file neo3crypto-0.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: neo3crypto-0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for neo3crypto-0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1c230c49d12af21b6e341b0534e081fd008af22813e829a2546e49b829c2b213
MD5 50496a44e93575b16cb6150a32485f55
BLAKE2b-256 52bf22acd5a9f2e8694fc3266ff6b670340f8c32dab397d64b9659136ec1bd62

See more details on using hashes here.

File details

Details for the file neo3crypto-0.1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: neo3crypto-0.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for neo3crypto-0.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c8abc2de4c44a5d10f7dbc45cc67418a0b70ab46bc224731e3c0128800606abb
MD5 b60d5121ced26221c5088c6a4a73c028
BLAKE2b-256 ef316b640919228540e82820a3eda117a79f744a4f479916a4c8764f73be726e

See more details on using hashes here.

File details

Details for the file neo3crypto-0.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: neo3crypto-0.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 290.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for neo3crypto-0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 78f7a0704142dc595ef49b97fbea6b3b1cc3f46a755434d8c0c9075b2cf304c7
MD5 b8a941e1f0e93e77374f18b94587a80f
BLAKE2b-256 ee24aa65507d67a6d2b1b73fe5bf1751601703879136ad09720df2d40f49e132

See more details on using hashes here.

File details

Details for the file neo3crypto-0.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: neo3crypto-0.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for neo3crypto-0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 72157e95ec12ddb69775a7b9730ebc8419882bf5b50d1590caf3119deed9e969
MD5 13c09ec7517b7edcf7b1ba0699202b9f
BLAKE2b-256 117fe7216cc2f7f1143de6372d59d19e759c34195cfcceeface0e9dc30b35e51

See more details on using hashes here.

File details

Details for the file neo3crypto-0.1-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: neo3crypto-0.1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for neo3crypto-0.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a78fdbbd2e4ab3d706db80f9a27c255baf85c54390f350a5f944a51230f79e84
MD5 1288d9765f2808c6cb6d73f34457e6e6
BLAKE2b-256 03db0a468ae54792c4a5978a465b6f6b01d3b5fbb016557f6693da7b91391eaa

See more details on using hashes here.

File details

Details for the file neo3crypto-0.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: neo3crypto-0.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 288.8 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for neo3crypto-0.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a14646ce9055c5ca5ee285778ca096d1014b4e994c8c86b5642ddfe33ded4a60
MD5 d7dc07371772452c25368f21737a9199
BLAKE2b-256 af8df9fb1633dfd2ccbb0201b76e809ef24fb64d9268a4d7d51a08d7b3b9c1b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page