From 6922740facabcc1d1509cd9e72dd837a60a91d2c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 19 Sep 2019 13:51:34 -0400 Subject: [PATCH] Add SSKDF test vectors from RFC 8636 RFC 8636 defines the Pkinit Agility KDF, which turns out to be just a standard SSKDF with the Info built out of the ASN.1 option of SP 800 56A (See 5.8.2.1.2 of NIST SP 800-56A Rev. 3) RFC 8636 Also defines test vectors, so let's add them in addition to the tests from "non-official" test vectors. Signed-off-by: Simo Sorce Reviewed-by: Shane Lontis Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/9957) --- test/recipes/30-test_evp_data/evpkdf.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/recipes/30-test_evp_data/evpkdf.txt b/test/recipes/30-test_evp_data/evpkdf.txt index 9c9be7552c..3905f17ebc 100644 --- a/test/recipes/30-test_evp_data/evpkdf.txt +++ b/test/recipes/30-test_evp_data/evpkdf.txt @@ -6391,6 +6391,26 @@ Ctrl.hexsecret = hexsecret:abb7d7554c0de41cada5826a1f79d76f Ctrl.hexinfo = hexinfo:a80b9061879365b1669c87a8 Output = 71e29fff69198eca92f5180bcb281fbdaf409ec7c99ca704b1f56e782d3c4db10cb4158e6634d793a46c13bffb6bdb71a01101936ea9b20f7dbe302558b1356c +Title = SSKDF Test vectors from RFC 8636 Section 8 (With precoumputed ASN.1 info) + +KDF = SSKDF +Ctrl.digest = digest:SHA1 +Ctrl.hexsecret = hexsecret:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Ctrl.hexinfo = hexinfo:307e300a06082b06010502030601a01f041d301ba0071b0553552e5345a110300ea003020101a10730051b036c6861a12904273025a0071b0553552e5345a11a3018a003020101a111300f1b066b72627467741b0553552e5345a22404223020a003020112a10c040aaaaaaaaaaaaaaaaaaaaaa20b0409bbbbbbbbbbbbbbbbbb +Output = e6ab38c9413e035bb079201ed0b6b73d8d49a814a737c04ee6649614206f73ad + +KDF = SSKDF +Ctrl.digest = digest:SHA256 +Ctrl.hexsecret = hexsecret:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Ctrl.hexinfo = hexinfo:307e300a06082b06010502030602a01f041d301ba0071b0553552e5345a110300ea003020101a10730051b036c6861a12904273025a0071b0553552e5345a11a3018a003020101a111300f1b066b72627467741b0553552e5345a22404223020a003020112a10c040aaaaaaaaaaaaaaaaaaaaaa20b0409bbbbbbbbbbbbbbbbbb +Output = 77ef4e48c420ae3fec75109d7981697eed5d295c90c62564f7bfd101fa9bc1d5 + +KDF = SSKDF +Ctrl.digest = digest:SHA512 +Ctrl.hexsecret = hexsecret:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Ctrl.hexinfo = hexinfo:307e300a06082b06010502030603a01f041d301ba0071b0553552e5345a110300ea003020101a10730051b036c6861a12904273025a0071b0553552e5345a11a3018a003020101a111300f1b066b72627467741b0553552e5345a22404223020a003020110a10c040aaaaaaaaaaaaaaaaaaaaaa20b0409bbbbbbbbbbbbbbbbbb +Output = d3c78b78d75313e9a926f75dfb012363fa17fa01db + # Test vectors extracted from # https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/components/800-135testvectors/ansx963_2001.zip Title = X963 KDF tests (from NIST test vectors) -- 2.25.1