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.

Windows users

If installing fails with the error No Matching distribution found then upgrade your Python installation to use the latest post release version (i.e. 3.8.8 instead of 3.8.0)

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.2.1-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

neo3crypto-0.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

neo3crypto-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl (327.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

neo3crypto-0.2.1-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

neo3crypto-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl (327.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file neo3crypto-0.2.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0d62f776da353d7838b9350ea02333197fc0edbfab27ec4188129938fa0f3933
MD5 fdcd66d653d6df390f97beb471091306
BLAKE2b-256 1c0073a02d1f9b17257d5d1142058e56ab6cc560d6bc715e9b25d0246e86728a

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8b44b3227cdaace00f38092fedf43da296c5e00167756353200acfa40d7c92aa
MD5 94fd36505eb3b2e66422f941a3339809
BLAKE2b-256 4bfbd60675854e5f36560649a78c6964766dcf13b18f40519936c84a499fe89a

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: neo3crypto-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 327.9 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for neo3crypto-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 868f29ea298a9e75a93076fdb5dca11ce1d7ed0a5eb73e39ccaf138ed4a15a21
MD5 141710030629f8d336bad3e24215890c
BLAKE2b-256 61ecc06248b5642a10b2bbdf1859ffb7a082f3603a3afcc4e9289ac5b02e3c2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neo3crypto-0.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 27d7c155b7def32f9253b9b25db439f815de920ea208fef65dc5526d38a68c3b
MD5 78f5a7d79abba9d7248fe5d8cd879e38
BLAKE2b-256 ca7a8732a54ffe7096f2ef4caabe931808e77914c86cece8a3ab6ab702418afc

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c3ae026d7cb1499cc9487cfbb228837e44d99df5dca80c1078df58a9c9976eaa
MD5 4cd07de8d853003cf9606f5b46e47176
BLAKE2b-256 82daf77afff265a76975023dffec2c96eae3e6132cdffc9c05e267ed3a391659

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neo3crypto-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 327.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for neo3crypto-0.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f7f1d0d5881e9a2ab731c65523cca0abd0c9588a5a28c812fbbddd2ec2803d21
MD5 0a3d781a2a8f1d502c4ab8ea94a31139
BLAKE2b-256 b6720b9baa3f3d915e2660332321345850e9b60060af7adce4547f326aebebab

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