OpenIoTAcademy / psa-boot-beta

MIT License
7 stars 4 forks source link

Upgrade Package Authentication #14

Open zaya-mc opened 4 years ago

zaya-mc commented 4 years ago

Authenticate the upgrade package.

Let us use ECC-256 for authentication, otherwise use RSA 1024.

Please use the signature from Upgrade Package structure : https://github.com/OpenIoTAcademy/psa-boot-beta/issues/11

zaya-mc commented 4 years ago

@Oruccu @asenaasena please see the boot_authenticate_upgrade_package() function in \source/include/boot_security.c file to fill.

This function gets a parameter in boot_upgrade_package_t type which includes all required information about the upgrade package. Use the metadata to authenticate the image using mbedtls library.

The authentication will, of courses, fail while we don't pass a meaningful buffer yet but please try to implement the authentication and once a proper upgrade package is ready we can have a real test.

For now, you can use a dummy public key in a global buffer to authenticate the package using its signature.