Trezor-crypto python binding
Project description
# 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.
`bash sudo apt-get install libsodium-dev `
## 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
`bash 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:
`bash python trezor_crypto/cffi_build.py -a cffi_h --debug `
[trezor-crypto]: https://github.com/ph4r05/trezor-crypto [ctypeslib2]: https://github.com/trolldbois/ctypeslib [pycparser]: https://github.com/eliben/pycparser
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 Distribution
Built Distribution
Hashes for py_trezor_crypto_ph4-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c224939d6b059c7b26a5b6101655b6a994988bd596e949323ea945c426e575e3 |
|
MD5 | 9938ebd35114a95c9c4c87858621c48e |
|
BLAKE2b-256 | ed35cb709b7f503ed9c7c96789918bfc93dad1bab38eed07fcf4a51bac966f77 |
Hashes for py_trezor_crypto_ph4-0.0.2-py3.6-macosx-10.12-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | b94f2f41e687299473e10c6874f41e6b02343701f4705c7188828305d6844fde |
|
MD5 | 8eb482ddba5ebe0ba95cb11f0d98cb55 |
|
BLAKE2b-256 | 7b86deb565582722499e686e1a06245d65a99c1aeaf374ba016ebf3b3c3ed4f4 |