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.2-cp310-cp310-win_amd64.whl (103.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

neo3crypto-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

neo3crypto-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl (114.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

neo3crypto-0.2.2-cp39-cp39-win_amd64.whl (101.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

neo3crypto-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

neo3crypto-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl (114.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

neo3crypto-0.2.2-cp38-cp38-win_amd64.whl (103.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

neo3crypto-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

neo3crypto-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl (114.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file neo3crypto-0.2.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1d29665dd95baaa40657b40d0b5aa39d8fbd3bfe961ffd7028107fdcc86015b3
MD5 d67410ba191bcd63a064ca7a9bdc392c
BLAKE2b-256 627f304cfdeade09b73cc7d58553b15a7d13a12a1f70dfbf7082712b83efbf5a

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e9f04e0f6b45866538449dfbae7d6f60132eee01527f0fac38f0bbe40d64c39
MD5 ac6ae593461a21b5461d8b8bd2387543
BLAKE2b-256 2de88160f1cd69e28617462b6b22f5e48043fcb08cd65681984d07c7bd4606d0

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 727a0764079b0e455a5bdfdfe53eeb24e58e9b3d79f9013bd82af6189c606c26
MD5 a813dc2b2d95bcae5d8eb948e530c2f1
BLAKE2b-256 d90d110518dac4aee1c6269c1eb488697f2a0d6649a0a5d5e39e8b70569b5131

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neo3crypto-0.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 101.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for neo3crypto-0.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 28a880faf7088789b9af1e86cc0a4a592b953c0b61e0d2f172a76a01d6c7c167
MD5 4efd15c645c9d4fd1c81ad969c2527b1
BLAKE2b-256 5c5e9127cfaac0820e4c99058d60f6be9a9f85e54967ed0732ee01a6d8003987

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e3b597e9e2b7c5cf92cb6c688e82c8e8203c8f299d35e0b90fc8b4c8ed61099
MD5 1a7987dc575dd2d46f5362ebad231112
BLAKE2b-256 6cefa253ae3a7685056869b54de82dd825f3e3710b3566d9a31498eaf95e2140

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 58aeda92aadb3f45b4ee437de55a87b6ddf268d218c03cf66d86f272baf891bd
MD5 d1f3be3198888ede52c28d6dd894f760
BLAKE2b-256 645a3db2ebd3a63bcfcfcba9082bb94ad2ba2cecfefeb12d31e26bca16be1ca5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neo3crypto-0.2.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 103.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for neo3crypto-0.2.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 16c02b714fc69e5095e326e0dfafe8464a3f96611ca4971f41acf74ec016a117
MD5 422f4229561218dccb26e045e655851a
BLAKE2b-256 2198bd3aa98adc36c110ed9595d8a5f0f4331e238d519ef75477f4edb081288b

See more details on using hashes here.

File details

Details for the file neo3crypto-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f2e79cf07843a04397759719b3b9d69bc0a8a3ec52b4c702fe7295a2bb326e6
MD5 6a93d71c07fd2200128de7b8fa5ec43a
BLAKE2b-256 de3ef45da024988f29e28f5844f387082875e26800e08a3ffa9403645786e9eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neo3crypto-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 788a844812df98d14e217b086ab6545cfe20e88e6fc1a9b072665e43808e91b0
MD5 7a473ca4ce1a4c56117128f24ad1e548
BLAKE2b-256 d7e2829d0e563dde9af70ebb27846d9cc95f420d20161307026d21b82a2fff0e

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