zephyriot / zephyr-issues

0 stars 0 forks source link

Upgrade to TinyCrypt 0.2.7 has significant API changes #2425

Open nashif opened 7 years ago

nashif commented 7 years ago

Reported by David Brown:

The upgrade to TinyCrypt 0.2.7 GH-2218 mentions that there are some API changes. Unfortunately, the API changes to the ecc code are non-trivial, and I'm not finding them to really be documented anywhere. We're probably just going to have to make the 1.0 release of mcuboot have to state that ECDSA signatures are not possible with Zephyr 1.9.

It really isn't going to work to have a library included like this that has such drastic API changes. API changes will have to be managed by the app, and not Zephyr. In the case of mcuboot, we will need to use our own copy of tinycrypt (or not use it at all). Since the app needs to work across several versions of Zephyr, as well as with other OSes, it will need a consistent version of the library.

I don't really know how to fix this, but I want to make sure that people are aware that API changes like this inside of Zephyr have a much worse impact than they do in just the third part project itself.

(Imported from Jira ZEP-2596)

nashif commented 7 years ago

by Johan Hedberg:

Bluetooth uses ECC (ECDH and not ECDSA however). Commit 2d57272f6584abc01fa0f1f62c6b99e027b3a56d might still be helpful since it shows the changes we had to do to update to the new API.

nashif commented 7 years ago

by Johan Hedberg:

Note that it looks like there's not only API (as in input/output parameters) change, but also a byte order change, considering that we had to switch from memcpy() to sys_memcpy_swap() in a few places.