From 1be58af0776a8281c7c0ea0e9bfbe6f1d2261785 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 4 Aug 2021 17:21:57 -0700 Subject: [PATCH] ANDROID: fips140: remove non-prediction-resistant DRBG test The lab has confirmed that this test is not required. Bug: 153614920 Bug: 188620248 Change-Id: Ie55031beacd00f093db3a7ba30fe0844a2ce363b Signed-off-by: Eric Biggers (cherry picked from commit ea902862eaeb9b84a94652656b95bf5ac4287a73) --- crypto/fips140-selftests.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/crypto/fips140-selftests.c b/crypto/fips140-selftests.c index 6679e675fe03..df1ac71c67ce 100644 --- a/crypto/fips140-selftests.c +++ b/crypto/fips140-selftests.c @@ -855,43 +855,9 @@ static const struct fips_test fips140_selftests[] __initconst = { * resistance support must be tested. Therefore we have chosen test * vectors that have a nonempty personalization string and nonempty * additional input, and we test the prediction-resistant variant. - * Just in case, we also test the non-prediction-resistant variant; - * however, it's unclear whether it's required. + * Testing the non-prediction-resistant variant is not required. */ { - .alg = "drbg_nopr_hmac_sha256", - .func = fips_test_drbg, - .drbg = { - .entropy = - "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94" - "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15" - "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4" - "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed", - .entropy_size = 48, - .output = - "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5" - "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf" - "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d" - "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6" - "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16" - "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62" - "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d" - "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4" - "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec" - "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f" - "\x50\x9a\x8c\x85\x90\x87\x03\x9c", - .out_size = 128, - .add_a = - "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d" - "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf" - "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b", - .add_b = - "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9" - "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14" - "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0", - .add_size = 32, - } - }, { .alg = "drbg_pr_hmac_sha256", .func = fips_test_drbg, .drbg = {