This repository contains the code for the KeyUtils library, which is a Python wrapper for the Qubic KeyUtils C++ library.
The Qubic KeyUtils library is a C++ library that provides functions for generating keys and signatures for the Qubic blockchain. It is using fourq for hash algorithm, but unfortunatly it is not implemented in Python. So for the purpose of using Qubic in Python, I implemented binding for the KeyUtils library in Python.
get_subseed_from_seed
get_private_key_from_subseed
get_public_key_from_private_key
get_identity_from_public_key
get_digest_from_siblings32
get_tx_hash_from_digest
get_public_key_from_identity
check_sum_identity
sign_with_nonce_k
sign
verify
kangaroo_twelve
- Install Python 3.10 or later
- Install Visual Studio 2022 Community Edition
- Set Environment Variables for
cl.exe
- Open a new VS2022 x64 Native Tools Command Prompt and run the following commands
cl /LD /EHsc /I. /FeKeyUtils.dll KeyUtils.cpp
- Check the exports of the DLL
dumpbin -exports KeyUtils.dll
- Install build essentials
sudo apt install build-essential
- Build the DLL
g++ -shared -fPIC -o KeyUtils.so KeyUtils.cpp
- Check DLL functions
nm -D libKeyUtils.so
- Build
clang++ -shared -o libKeyUtils.dylib KeyUtils.cpp
- Check Lib functions
nm -g libKeyUtils.dylib