Skip to main content

Trezor-crypto python binding

This is the ctypes and cffi python binding for trezor-crypto used in Monero implementation.

The python module builds trezor-crypto as a shared library. Currently only ctypes is fully supported. CFFI module is built but the python method wrappers are not implemented yet (no the roadmap).

The module automatically generates the bindings from the trezor-crypto header files using ctypeslib2 and pycparser.

Note the forked version of the original trezor-crypto is used in order to support library mode (for now).

Requirements:

  • gcc / clang

  • pkg-config

  • libsodium

In order to use this module please install libsodium.

sudo apt-get install libsodium-dev

Pypi

pip install py_trezor_crypto_ph4

Dev Requirements:

In order to generate bindings from the trezor-crypto header files the following tools are needed:

  • clang

  • ctypeslib2

  • pycparser

  • libclang.so / libclang.dylib

Roadmap

  • Code generate CFFI wrappers in the similar manner as ctype wrappers.

Refresh Ctype bindings

In order to refresh method definitions and regenerate ctype wrappers from trezor-crypto header files run

python trezor_crypto/cffi_build.py -a ctypes --debug

Refresh CFFI bindings

In order to refresh data/cffi.h from trezor-crypto header files run:

python trezor_crypto/cffi_build.py -a cffi_h --debug

Release files for py-trezor-crypto-ph4 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-trezor-crypto-ph4 0.1.1
File Size Uploaded
py_trezor_crypto_ph4-0.1.1.tar.gz 3.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-trezor-crypto-ph4 0.1.1
File Interpreter ABI Platform
py_trezor_crypto_ph4-0.1.1-cp36-cp36m-macosx_10_12_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.12+ x86-64 Details

Total release size: 3.7 MB

Release files / py_trezor_crypto_ph4-0.1.1.tar.gz

Download URL py_trezor_crypto_ph4-0.1.1.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c523afd73949ac083bb7c5ef67416f0a971edc1921f4046a8cd40f87e43133ff
BLAKE2b-256 checksum
How to use checksums
3886a4bc56272dbb5ac2d3e880785d1858a895208dbe9e874aefb6f65f694975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release files / py_trezor_crypto_ph4-0.1.1-cp36-cp36m-macosx_10_12_x86_64.whl

Download URL py_trezor_crypto_ph4-0.1.1-cp36-cp36m-macosx_10_12_x86_64.whl
Size 594.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
525b10f58e6190714c1bd5c984f01302f8d03b74deee7c1a3f925429da3d9598
BLAKE2b-256 checksum
How to use checksums
3313e4dae402482cdd1607450dd737a47c40c54792a47af0538553de3d3c6f12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page