Native crypto functions for the NEO 3 Blockchain
Project description
NEO3VM
C++ implementations of cryptographic functions used in the NEO3 Blockchain with bindings for Python 3.13 & 3.14.
The current version supports mmh3 and EllipticCurve functions by wrapping (part of smhasher and 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.10.8 instead of 3.10.0)
Usage
import hashlib
import os
from neo3crypto import ECCCurve, ECPoint, sign, verify, mmh3_hash_bytes, mmh3_hash
curve = ECCCurve.SECP256R1
private_key = os.urandom(32)
public_key = ECPoint(private_key, curve)
signature = sign(private_key, b'message', curve, hashlib.sha256)
assert verify(signature, b'message', public_key, hashlib.sha256) == True
assert mmh3_hash("foo", signed=False) == 4138058784
assert bytes.fromhex("0bc59d0ad25fde2982ed65af61227a0e") == mmh3_hash_bytes("hello", 123)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 121.1 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6781220e8f12b907f714103c8e77aaf8e99e585e99649322b62183ac3febdbc6
|
|
| MD5 |
3b83076a51fc146da37e36dd38a21977
|
|
| BLAKE2b-256 |
bd1c55566fbf1370bb0d13f5b4e3d84df44ac971e7f6c3f88b392391bb28af10
|
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8326279ff74fb1830f180c8b7a97004206b10392dd5690415f6e74346ae69cac
|
|
| MD5 |
c1b33c205871754a7d10b48c4fa8bdff
|
|
| BLAKE2b-256 |
856bca551a689d75dd3b85bfd822c87b7f3dfa539332f2e762dedbf0937f1e8d
|
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.14, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f9399b958b20597fced9205477111ea6969785a8ff10c392bdaa9ae69d894c4
|
|
| MD5 |
e6fac0eb26c236c7d218bc79ef976e68
|
|
| BLAKE2b-256 |
9eb54e807c9246b23a47b8bb7e129b50fdba7ab702e09bb640b876b2bd0c9364
|
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 145.5 kB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a0798bdbde789ed96521ed5028c7912d91edef17d93318d7f0bdc8fd1791b4
|
|
| MD5 |
d164f2bf6f859d9576b8e853b8167af1
|
|
| BLAKE2b-256 |
68b2272c9b4840e11cc7163f677707319c1d39b5d1435af319ca4574d4843f77
|
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 136.5 kB
- Tags: CPython 3.14, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc8766585cbd2675fa4fee6d5739a39f0e2f826b0d94eceed20f3c61570cde24
|
|
| MD5 |
adb01c7bdf7157a10e4f0c896ed555ba
|
|
| BLAKE2b-256 |
504ae20d2f5cd77db3bebcc0d4422ab83f74467781cf4ee0598f03c2478d7c9c
|
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 115.4 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86160d70b168219b3e7b5e622ba5338e9af10dac7a6148a2df9eaf28c6e3b5fb
|
|
| MD5 |
fbe1e6980cdb3d5d2c233c53b3f53431
|
|
| BLAKE2b-256 |
e676ab8ce19d200ab0baac74281838173ebe66c6f280d498d767cf7a70d76735
|
File details
Details for the file neo3crypto-0.4.5-cp314-cp314-macosx_10_15_x86_64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp314-cp314-macosx_10_15_x86_64.whl
- Upload date:
- Size: 135.1 kB
- Tags: CPython 3.14, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ef60a3003dbbb31927b373711c0d30ba7ee8a8288baa4a9d08ea356a981a0c
|
|
| MD5 |
ce2b56bb11602f9dceebf4c72af9fcff
|
|
| BLAKE2b-256 |
bb0a10d80e56314ac17e6a5e670441c4ece3b394fe13a58dd923a79be686187e
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 118.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef5f0e3db3d19fa99578de0eb2fea48cd6a99b0e3c420ec8be2c70ff2a893bda
|
|
| MD5 |
7c98b0522f87dbbf5343e2643da8a52f
|
|
| BLAKE2b-256 |
8cc16914c3c51d6e5288b40c801cd8a163d0c99706783225863770f16e7478df
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c010571c4758be2721e0a5d83f173c2cb1336883539b6aa9583faac5b513e6c
|
|
| MD5 |
70aca880e9225ea512fada0afc096757
|
|
| BLAKE2b-256 |
ebfdc0d41a01215398363f3ed9931ac69500c2f9840d470814bb10de6fe5ece4
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a072ce57bf1b56f2afbb2734c99b96d6a48372288365722c069f6741a6e46c1
|
|
| MD5 |
803de9f9054c841f95e561529cd1d8b5
|
|
| BLAKE2b-256 |
9738b756553b5a85c070a7c53247004bd8b7e1eff0b964a594da8638b806336c
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 145.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7065f2fa09a4ccf5a8edb9934afc33c9ce7c8f8365bcce79bbeef0ceb089287
|
|
| MD5 |
b8a454d19308cbe10b38f41c9b824125
|
|
| BLAKE2b-256 |
1e27a4d6050865917576d7c1f1f95fd322a70391db8626e1e88cc9f3effe6ff2
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 135.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38b0d4faea20a2b4af61a31cf73b9afc0de520bc24201a1f13dd09b23074f764
|
|
| MD5 |
30fc44d89c3f4f56c5cc07dbd31af46d
|
|
| BLAKE2b-256 |
11d9e6306cc460df4ef35f6e4dc4ca501c6511dbb6a2d19239c01e5c9439ad66
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 114.9 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc027f42b7aabc2edd5bac6c1395d9101779ba96733a12427ed8e3100b35e1c9
|
|
| MD5 |
0e95e69b6bd82db61e5f34579c8be4a2
|
|
| BLAKE2b-256 |
15c9f89c9d33eb3ca8bd048124c02d5ba983163a21d32e0b4996a57a6fbf6280
|
File details
Details for the file neo3crypto-0.4.5-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: neo3crypto-0.4.5-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 135.0 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed6a82656fea2fc044791718594cc93b192531362a5290f2ae2101bc7b09a154
|
|
| MD5 |
dd34fcce7fad128831dde35239370a87
|
|
| BLAKE2b-256 |
d83f4bfa22924160621fbe47fa7b207077cfa102e584cfe8494149f39327fe66
|