This is a wrapper for kmackay/micro-ecc for micropython
This C-Module is intended to lift the C functionality in micro-ecc to be usable from micropython.
This is designed for micropython.
git clone --recurse-submodules https://github.com/micropython/micropython.git
to compile the project, make, gcc and arm-none-eabi-gcc is required, install them from your package manager
micro-ecc-micropython will work on any port.
First create a modules folder next to your copy of micropython.
project/
├── modules/
│ └──micro-ecc-micropython/
│ ├──...
│ └──micropython.mk
└── micropython/
├──ports/
... ├──stm32/
...
And now put this project in the modules folder.
cd modules
git clone https://gitlab.com/peterzuger/micro-ecc-micropython.git
Now that all required changes are made, it is time to build micropython, for this cd to the top level directory of micropython. From here, first the mpy-cross compiler has to be built:
make -C mpy-cross
once this is built, compile your port with:
make -C ports/your port name here/ USER_C_MODULES=../modules CFLAGS_EXTRA=-DMODULE_MICRO_ECC_ENABLED=1
and you are ready to use micro-ecc.
The module is available by just importing uECC:
import uECC
For an example of every function and object check out the test script.
Every function and its python signature is documented in the C code: here.