peterzuger / micro-ecc-micropython

micro-ecc wrapper for micropython

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uECC-micropython

Table of Contents

About

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.

Getting Started

Prerequisites

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

Installing

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.

Usage

The module is available by just importing uECC:

import uECC

For an example of every function and object check out the test script.

Documentation

Every function and its python signature is documented in the C code: here.

About

micro-ecc wrapper for micropython

License:MIT License


Languages

Language:C 54.0%Language:Python 43.5%Language:CMake 1.6%Language:Makefile 0.9%