HKDF-SHA512.txt at [d371821677]

File tests/test_vectors/KDF/HKDF-SHA512.txt artifact 3b3b416e62 part of check-in d371821677


# HKDF-SHA512
# From https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values
# and RFC 6234 SHA and SHA-based HMAC and HKDF
# and RFC 5869 HKDF
# SHA2 from https://github.com/brycx/Test-Vector-Generation/blob/master/HKDF/hkdf-hmac-sha2-test-vectors.md

# RFC 5869 - A.1.  Test Case 1, Basic test case with SHA-256
Hash = SHA512
Klen = 22
IKM  = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
Slen = 13
salt = 000102030405060708090a0b0c
Ilen = 10
info = f0f1f2f3f4f5f6f7f8f9
L    = 42
OKM = 832390086cda71fb47625bb5ceb168e4c8e26a1a16ed34d9fc7fe92c1481579338da362cb8d9f925d7cb

# RFC 5869 - A.2.  Test Case 2, Test with SHA-256 and longer inputs/outputs
Hash = SHA512
Klen = 80
IKM  = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f
Slen = 80
salt = 606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeaf
Ilen = 80
info = b0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
L    = 82
OKM = ce6c97192805b346e6161e821ed165673b84f400a2b514b2fe23d84cd189ddf1b695b48cbd1c8388441137b3ce28f16aa64ba33ba466b24df6cfcb021ecff235f6a2056ce3af1de44d572097a8505d9e7a93

# RFC 5869 - A.3.  Test Case 3, Test with SHA-256 and zero-length salt/info
Hash = SHA512
Klen = 22
IKM  = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
Slen = 0
salt =
Ilen = 0
info =
L    = 42
OKM = f5fa02b18298a72a8c23898a8703472c6eb179dc204c03425c970e3b164bf90fff22d04836d0e2343bac

# RFC 5869 - A.4.  Test Case 4, Basic test case with SHA-1
Hash = SHA512
Klen = 11
IKM  = 0b0b0b0b0b0b0b0b0b0b0b
Slen = 13
salt = 000102030405060708090a0b0c
Ilen = 10
info = f0f1f2f3f4f5f6f7f8f9
L    = 42
OKM = 7413e8997e020610fbf6823f2ce14bff01875db1ca55f68cfcf3954dc8aff53559bd5e3028b080f7c068

# RFC 5869 - A.7.  Test Case 7, Test with SHA-1, salt not provided (defaults to HashLen zero octets), zero-length info
Hash = SHA512
Klen = 22
IKM  = 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
Slen = 0
salt =
Ilen = 0
info =
L    = 42
OKM = 1407d46013d98bc6decefcfee55f0f90b0c7f63d68eb1a80eaf07e953cfc0a3a5240a155d6e4daa965bb