1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/micro-ecc
Gaëtan Harter ca5d13cc2a pkg/*: adapt to new state file targets
Prepare for handling pkg state with files. So it requires having the
path defined before declaring targets. In addition, it cleans up the
old git-download target.
2020-01-08 20:55:19 +01:00
..
patches pkg/micro-ecc: rename deprecated FEATURE_PERIPH_x 2017-12-13 11:01:46 +01:00
doc.txt fixup! pkg: enhance doxygen packages documentation 2017-07-03 11:18:47 +02:00
Makefile pkg/*: adapt to new state file targets 2020-01-08 20:55:19 +01:00
Makefile.dep pkg/micro-ecc: blacklist arch 16bit requirement 2019-10-30 11:43:40 +01:00
Makefile.include micro-ecc: blacklist LLVM/clang 2018-09-09 16:15:16 +02:00
README.md pkg/micro-ecc: support boards without hwrng feature 2017-01-04 02:32:40 -08:00

Micro-ECC for RIOT

This port of Micro-ECC to RIOT is based on the Micro-ECC upstream and adds hwrng_read (provided by RIOT) as the default RNG function if it is available on the target platform. This port also fixes a minor issue with unused variables in the upstream code.

Usage

Build

Add

USEPKG += micro-ecc

to your Makefile.

Choosing the right API

Before using the Micro-ECC library, you need to check the Makefile.features of your target board to see if periph_hwrng is provided.

If it is provided, you may safely use uECC_make_key to generate ECDSA key pairs and call uECC_sign/uECC_verify to sign/verify the ECDSA signatures.

If not, you cannot use uECC_make_key or uECC_sign APIs anymore. The ECDSA keys have to be generated on a platform with HWRNG support (e.g., native) and transferred to your target device. You need to use uECC_sign_deterministic to perform ECDSA deterministic signing (standardized by RFC 6979). You can still use uECC_verify to verify the signatures from both signing APIs.

WARNING Calling uECC_make_key and uECC_sign APIs on platforms without HWRNG support will lead to compile failure.

Examples of using these uECC APIs can be found in the test folder of the Micro-ECC upstream.