From 83bd850f3fd45648bb811f6080efac396c8a2062 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Tue, 7 Feb 2017 11:40:59 +0800 Subject: vboot_reference: Add support for 2048-bit exponent 3 keys This also adds the required tests (keys, testcases). BRANCH=none BUG=chromium:684354 TEST=make runtests Change-Id: I5e148f8792ea325f813d76089271f3c4bcc2935d Reviewed-on: https://chromium-review.googlesource.com/438951 Commit-Ready: Nicolas Boichat Tested-by: Nicolas Boichat Reviewed-by: Randall Spangler --- utility/dumpRSAPublicKey.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utility') diff --git a/utility/dumpRSAPublicKey.c b/utility/dumpRSAPublicKey.c index b3b7b96b..fc238d7f 100644 --- a/utility/dumpRSAPublicKey.c +++ b/utility/dumpRSAPublicKey.c @@ -23,8 +23,9 @@ int check(RSA* key) { int public_exponent = BN_get_word(key->e); int modulus = BN_num_bits(key->n); - if (public_exponent != 65537) { - fprintf(stderr, "WARNING: Public exponent should be 65537 (but is %d).\n", + if (public_exponent != 3 && public_exponent != 65537) { + fprintf(stderr, + "WARNING: Public exponent should be 3 or 65537 (but is %d).\n", public_exponent); } -- cgit v1.2.1