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.10 & 3.11.

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


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

If you're not sure about the file name format, learn more about wheel file names.

neo3crypto-0.4.4-cp313-cp313-win_amd64.whl (108.9 kB view details)

Uploaded CPython 3.13Windows x86-64

neo3crypto-0.4.4-cp313-cp313-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

neo3crypto-0.4.4-cp313-cp313-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

neo3crypto-0.4.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (132.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

neo3crypto-0.4.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (125.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

neo3crypto-0.4.4-cp313-cp313-macosx_11_0_arm64.whl (106.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

neo3crypto-0.4.4-cp313-cp313-macosx_10_13_x86_64.whl (125.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

neo3crypto-0.4.4-cp312-cp312-win_amd64.whl (108.9 kB view details)

Uploaded CPython 3.12Windows x86-64

neo3crypto-0.4.4-cp312-cp312-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

neo3crypto-0.4.4-cp312-cp312-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

neo3crypto-0.4.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (132.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

neo3crypto-0.4.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (125.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

neo3crypto-0.4.4-cp312-cp312-macosx_11_0_arm64.whl (106.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

neo3crypto-0.4.4-cp312-cp312-macosx_10_13_x86_64.whl (125.7 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: neo3crypto-0.4.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 108.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ab3b0a9be3c408fbc6c61016537114eb654e6c466a90d1dc07fe26771693ddc0
MD5 66dda83475e2f9cfb8416c1eca6a6dfe
BLAKE2b-256 091c13ef433b2383a6b8b895b19e3af4b61eb154657dd64e232ae8c7df8d5459

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f99af15041d9c4a45d346e9aa2e9413984ea36daf7fd50c3415cbd1981651a76
MD5 56a31b5ceedd3cf0e7ee8e7ed192a33c
BLAKE2b-256 e04605ff948adddba21b0543068f75a3e2e78554174826893438548e655bfefb

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6b8646b0d49eeb5fe127bc5c5b44b9a84fd07c57e3165aca256d204e361b7738
MD5 d5e21a4c4d1a5dc89be903d443479b49
BLAKE2b-256 97c0ecb58ecf38103e0925c7bc311b4993f6eaf9b0f4d6584e80be88d71ae4a9

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 777a5dc00dc1d11bf61df803ebb4e6c6d095d5a33776ab17a1b515965f0dced2
MD5 b96818cb949654b765dc1fb3771d2dab
BLAKE2b-256 bbd2f43598a93a2849e0249f8a4314661fa5ddce69346107a1e7da8b9009c87b

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 82a1d10a020ed910c216954eccca9a8678fb7b2f3f79ac0efd88e0b8595d0bbb
MD5 0aade8b17ee83032f6f47b0acc90efc6
BLAKE2b-256 ed273ebe664d792526726c6992bebb6abf7fea5660097359f0fddc997c662a6e

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bba43423e130acf853ba5d63f39b27b1151ded3690c8a1b565be563f792392f6
MD5 7e7eb6945d99b254a51126e490d3bc41
BLAKE2b-256 85f25aed7ced6593c1ba72bec7a7ad41cab13746df0ee2c5e6f82a9e2a95a144

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1d8e5d2281925df622fe0595bcc85778309ce82fcc13a19ef58767bd14042fb9
MD5 7696f834876f3a1f06a02ec990ca13eb
BLAKE2b-256 7008c224fa03f8aa3d9c50e7524b67edfccc1862ff9da997f59ee992a16928b3

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: neo3crypto-0.4.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 108.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 77e4eab34d819944b4c700581f10ad3c8c45ee332c2ae595df8fc23e1d8693d6
MD5 5cfe1e36d1a693f4a099eb4a7966f4e7
BLAKE2b-256 78b6952cc3498cd8517865aef9d71d43f9a178f3b62f5ab8d064cc5609f09960

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 900fbcbf4464dbe95efef819d271ef9307a58aef0fdd688059d0213c9574ea73
MD5 4499c2158c1c146f1841275e33e11b4d
BLAKE2b-256 07bcb0a8660d9ad116e7811cde9a740f40bcdb507cf3fa19bc5abb6d375802d0

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 05f6c75354d8ca2ba806287fb0bbc713e5f0765e7ab435395abe3d8f68601ca6
MD5 04d2c19cadaeccf8c80b66d8289b82d7
BLAKE2b-256 6856409b5eb0cd7e60528f9b4a013165405df442d7e77a2e85401fe07144ad66

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1147e268e04c04f629257f6b3852d749a971495f31b7d2c7e4beee73884748d9
MD5 2649867500dd449df85abcd0a93944b8
BLAKE2b-256 e8a0b979709c45a19b0edcf14c719cecc8d7b54e5530398d9146af97690ba669

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dac14215330a1f665745b51dbf4cb8e712c6c70968c9d1bed39c9c290818c3f8
MD5 97ec644bbf575258f209fe9cf66af880
BLAKE2b-256 ee730ef546899885c0859c598f2f19b7866a8e5a61a5e55c13423930b5fe9d71

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4516cb836d3df73c94a9b61678bdc59285c164ec90e1a36c5cdba8f71590494
MD5 38ae6896b94860ca893a116c5ee4f2c8
BLAKE2b-256 009dad945a5a26a1e2a6144f3ddaf4beb97e7ad7fa35f953643410de973fda9a

See more details on using hashes here.

File details

Details for the file neo3crypto-0.4.4-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for neo3crypto-0.4.4-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 67418641ae4408b35ebbb58e85f70043c2a0c4a30a8d5cd799f30af5d6e2eea8
MD5 87e1d02bd78c9e3c9c57af14f8e29ae9
BLAKE2b-256 78b96f5b6ef2b98bc42716f2c7baa4cb69ded0e2998cd434ca241df8005bc67b

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