u-boot/include/u-boot
Andrew Duda da29f2991d rsa: Verify RSA padding programatically
Padding verification was done against static SHA/RSA pair arrays which
take up a lot of static memory, are mostly 0xff, and cannot be reused
for additional SHA/RSA pairings. The padding can be easily computed
according to PKCS#1v2.1 as:

  EM = 0x00 || 0x01 || PS || 0x00 || T

where PS is (emLen - tLen - 3) octets of 0xff and T is DER encoding
of the hash.

Store DER prefix in checksum_algo and create rsa_verify_padding
function to handle verification of a message for any SHA/RSA pairing.

Signed-off-by: Andrew Duda <aduda@meraki.com>
Signed-off-by: aduda <aduda@meraki.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-11-21 14:07:30 -05:00
..
crc.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
md5.h GCC47: Fix warning in md5.c 2012-04-29 14:14:08 +02:00
rsa-checksum.h rsa: Verify RSA padding programatically 2016-11-21 14:07:30 -05:00
rsa-mod-exp.h Correct License and Copyright information on few files 2015-08-12 20:47:46 -04:00
rsa.h Kconfig: Move CONFIG_FIT and related options to Kconfig 2016-03-14 19:18:07 -04:00
sha1.h rsa: Verify RSA padding programatically 2016-11-21 14:07:30 -05:00
sha256.h rsa: Verify RSA padding programatically 2016-11-21 14:07:30 -05:00
u-boot.lds.h start a linker script helper file 2009-08-23 22:33:33 +02:00
zlib.h lib/zlib: sparse fixes 2012-11-04 11:00:36 -07:00