Merge branch '2020-03-12-rsa-improvements' into next
authorTom Rini <trini@konsulko.com>
Thu, 12 Mar 2020 16:45:27 +0000 (12:45 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 12 Mar 2020 16:45:27 +0000 (12:45 -0400)
(Description from AKASHI Takahiro)

extend rsa_verify() for UEFI secure boot:

The current rsa_verify() requires five parameters for a RSA public key
for efficiency while RSA, in theory, requires only two. In addition,
those parameters are expected to come from FIT image.

So this function won't fit very well when we want to use it for the
purpose of implementing UEFI secure boot, in particular, image
authentication as well as variable authentication, where the essential
two parameters are set to be retrieved from one of X509 certificates in
signature database.

So, in this patch, additional three parameters will be calculated on the
fly when rsa_verify() is called without fdt which should contain
parameters above.

This calculation heavily relies on "big-number (or multi-precision)
library." Therefore some routines from BearSSL under MIT license are
imported in this implementation.


Trivial merge