c537e74ba3
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3472)
303 lines
11 KiB
Text
303 lines
11 KiB
Text
#
|
|
# Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
|
|
#
|
|
# Licensed under the OpenSSL license (the "License"). You may not use
|
|
# this file except in compliance with the License. You can obtain a copy
|
|
# in the file LICENSE in the source distribution or at
|
|
# https://www.openssl.org/source/license.html
|
|
|
|
# Tests start with one of these keywords
|
|
# Cipher Decrypt Derive Digest Encoding KDF MAC PBE
|
|
# PrivPubKeyPair Sign Verify VerifyRecover
|
|
# and continue until a blank line. Lines starting with a pound sign,
|
|
# like this prolog, are ignored.
|
|
|
|
# BLAKE2 tests, using same inputs as MD5
|
|
# There are no official BLAKE2 test vectors we can use since they all use a key
|
|
# Which is currently unsupported by OpenSSL. They were generated using the
|
|
# reference implementation. RFC7693 also mentions the 616263 / "abc" values.
|
|
|
|
Title = BLAKE tests
|
|
|
|
Digest = BLAKE2s256
|
|
Input =
|
|
Output = 69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 61
|
|
Output = 4a0d129873403037c2cd9b9048203687f6233fb6738956e0349bd4320fec3e90
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 616263
|
|
Output = 508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 6d65737361676520646967657374
|
|
Output = fa10ab775acf89b7d3c8a6e823d586f6b67bdbac4ce207fe145b7d3ac25cd28c
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 6162636465666768696a6b6c6d6e6f707172737475767778797a
|
|
Output = bdf88eb1f86a0cdf0e840ba88fa118508369df186c7355b4b16cf79fa2710a12
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839
|
|
Output = c75439ea17e1de6fa4510c335dc3d3f343e6f9e1ce2773e25b4174f1df8b119b
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
|
|
Output = fdaedb290a0d5af9870864fec2e090200989dc9cd53a3c092129e8535e8b4f66
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F
|
|
Output = 1FA877DE67259D19863A2A34BCC6962A2B25FCBF5CBECD7EDE8F1FA36688A796
|
|
|
|
Digest = BLAKE2s256
|
|
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F8081
|
|
Output = C80ABEEBB669AD5DEEB5F5EC8EA6B7A05DDF7D31EC4C0A2EE20B0B98CAEC6746
|
|
|
|
Digest = BLAKE2b512
|
|
Input =
|
|
Output = 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 61
|
|
Output = 333fcb4ee1aa7c115355ec66ceac917c8bfd815bf7587d325aec1864edd24e34d5abe2c6b1b5ee3face62fed78dbef802f2a85cb91d455a8f5249d330853cb3c
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 616263
|
|
Output = ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 6d65737361676520646967657374
|
|
Output = 3c26ce487b1c0f062363afa3c675ebdbf5f4ef9bdc022cfbef91e3111cdc283840d8331fc30a8a0906cff4bcdbcd230c61aaec60fdfad457ed96b709a382359a
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 6162636465666768696a6b6c6d6e6f707172737475767778797a
|
|
Output = c68ede143e416eb7b4aaae0d8e48e55dd529eafed10b1df1a61416953a2b0a5666c761e7d412e6709e31ffe221b7a7a73908cb95a4d120b8b090a87d1fbedb4c
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839
|
|
Output = 99964802e5c25e703722905d3fb80046b6bca698ca9e2cc7e49b4fe1fa087c2edf0312dfbb275cf250a1e542fd5dc2edd313f9c491127c2e8c0c9b24168e2d50
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
|
|
Output = 686f41ec5afff6e87e1f076f542aa466466ff5fbde162c48481ba48a748d842799f5b30f5b67fc684771b33b994206d05cc310f31914edd7b97e41860d77d282
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F
|
|
Output = 2319E3789C47E2DAA5FE807F61BEC2A1A6537FA03F19FF32E87EECBFD64B7E0E8CCFF439AC333B040F19B0C4DDD11A61E24AC1FE0F10A039806C5DCC0DA3D115
|
|
|
|
Digest = BLAKE2b512
|
|
Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F8081
|
|
Output = DF0A9D0C212843A6A934E3902B2DD30D17FBA5F969D2030B12A546D8A6A45E80CF5635F071F0452E9C919275DA99BED51EB1173C1AF0518726B75B0EC3BAE2B5
|
|
|
|
Title = SHA tests from (RFC6234 section 8.5 and others)
|
|
|
|
Digest = SHA1
|
|
Input = "abc"
|
|
Output = a9993e364706816aba3e25717850c26c9cd0d89d
|
|
|
|
Digest = SHA1
|
|
Input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
|
Output = 84983e441c3bd26ebaae4aa1f95129e5e54670f1
|
|
|
|
Digest = SHA1
|
|
Input = "a"
|
|
Ncopy = 1000
|
|
Count = 1000
|
|
Output = 34aa973cd4c4daa4f61eeb2bdbad27316534016f
|
|
|
|
Digest = SHA224
|
|
Input = "abc"
|
|
Output = 23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7
|
|
|
|
Digest = SHA224
|
|
Input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
|
Output = 75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525
|
|
|
|
Digest = SHA224
|
|
Input = "a"
|
|
Ncopy = 64
|
|
Count = 15625
|
|
Output = 20794655980c91d8bbb4c1ea97618a4bf03f42581948b2ee4ee7ad67
|
|
|
|
Digest = SHA256
|
|
Input = "abc"
|
|
Output = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
|
|
|
|
Digest = SHA256
|
|
Input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
|
Output = 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1
|
|
|
|
Digest = SHA256
|
|
Input = "a"
|
|
Ncopy = 288
|
|
Count = 3472
|
|
Input = "a"
|
|
Ncopy = 64
|
|
Output = cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0
|
|
|
|
Digest = SHA384
|
|
Input = "abc"
|
|
Output = cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
|
|
|
|
Digest = SHA384
|
|
Input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
|
|
Output = 09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039
|
|
|
|
Digest = SHA384
|
|
Input = "a"
|
|
Ncopy = 64
|
|
Count = 15625
|
|
Output = 9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b07b8b3dc38ecc4ebae97ddd87f3d8985
|
|
|
|
Digest = SHA512
|
|
Input = "abc"
|
|
Output = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f
|
|
|
|
Digest = SHA512
|
|
Input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
|
|
Output = 8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909
|
|
|
|
Digest = SHA512
|
|
Input = "a"
|
|
Ncopy = 288
|
|
Count = 3472
|
|
Input = "a"
|
|
Ncopy = 64
|
|
Output = e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b
|
|
|
|
Title = MD5 tests
|
|
|
|
Digest = MD5
|
|
Input =
|
|
Output = d41d8cd98f00b204e9800998ecf8427e
|
|
|
|
Digest = MD5
|
|
Input = 61
|
|
Output = 0cc175b9c0f1b6a831c399e269772661
|
|
|
|
Digest = MD5
|
|
Input = 616263
|
|
Output = 900150983cd24fb0d6963f7d28e17f72
|
|
|
|
Digest = MD5
|
|
Input = 6d65737361676520646967657374
|
|
Output = f96b697d7cb7938d525a2f31aaf161d0
|
|
|
|
Digest = MD5
|
|
Input = 6162636465666768696a6b6c6d6e6f707172737475767778797a
|
|
Output = c3fcd3d76192e4007dfb496cca67e13b
|
|
|
|
Digest = MD5
|
|
Input = 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839
|
|
Output = d174ab98d277d9f5a5611c2c9f419d9f
|
|
|
|
Digest = MD5
|
|
Input = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
|
|
Output = 57edf4a22be3c955ac49da2e2107b67a
|
|
|
|
Title = MD4 tests
|
|
|
|
Digest = MD4
|
|
Input = ""
|
|
Output = 31d6cfe0d16ae931b73c59d7e0c089c0
|
|
|
|
Digest = MD4
|
|
Input = "a"
|
|
Output = bde52cb31de33e46245e05fbdbd6fb24
|
|
|
|
Digest = MD4
|
|
Input = "abc"
|
|
Output = a448017aaf21d8525fc10ae87aa6729d
|
|
|
|
Digest = MD4
|
|
Input = "message digest"
|
|
Output = d9130a8164549fe818874806e1c7014b
|
|
|
|
Digest = MD4
|
|
Input = "abcdefghijklmnopqrstuvwxyz"
|
|
Output = d79e1c308aa5bbcdeea8ed63df412da9
|
|
|
|
Digest = MD4
|
|
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
|
Output = 043f8582f241db351ce627e153e7f0e4
|
|
|
|
Digest = MD4
|
|
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
|
Output = e33b4ddc9c38f2199c3e7b164fcc0536
|
|
|
|
Title = RIPEMD160 tests
|
|
|
|
Digest = RIPEMD160
|
|
Input = ""
|
|
Output = 9c1185a5c5e9fc54612808977ee8f548b2258d31
|
|
|
|
Digest = RIPEMD160
|
|
Input = "a"
|
|
Output = 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
|
|
|
|
Digest = RIPEMD160
|
|
Input = "abc"
|
|
Output = 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc
|
|
|
|
Digest = RIPEMD160
|
|
Input = "message digest"
|
|
Output = 5d0689ef49d2fae572b881b123a85ffa21595f36
|
|
|
|
Digest = RIPEMD160
|
|
Input = "abcdefghijklmnopqrstuvwxyz"
|
|
Output = f71c27109c692c1b56bbdceb5b9d2865b3708dbc
|
|
|
|
Digest = RIPEMD160
|
|
Input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
|
Output = 12a053384a9c0c88e405a06c27dcf49ada62eb2b
|
|
|
|
Digest = RIPEMD160
|
|
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
|
Output = b0e20b6e3116640286ed3a87a5713079b21f5189
|
|
|
|
Digest = RIPEMD160
|
|
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
|
Output = 9b752e45573d4b39f4dbd3323cab82bf63326bfb
|
|
|
|
Title = Whirlpool (from ISO/IEC 10118-3 test vector set)
|
|
|
|
Digest = whirlpool
|
|
Input = ""
|
|
Output = 19FA61D75522A4669B44E39C1D2E1726C530232130D407F89AFEE0964997F7A73E83BE698B288FEBCF88E3E03C4F0757EA8964E59B63D93708B138CC42A66EB3
|
|
|
|
Digest = whirlpool
|
|
Input = "a"
|
|
Output = 8ACA2602792AEC6F11A67206531FB7D7F0DFF59413145E6973C45001D0087B42D11BC645413AEFF63A42391A39145A591A92200D560195E53B478584FDAE231A
|
|
|
|
Digest = whirlpool
|
|
Input = "abc"
|
|
Output = 4E2448A4C6F486BB16B6562C73B4020BF3043E3A731BCE721AE1B303D97E6D4C7181EEBDB6C57E277D0E34957114CBD6C797FC9D95D8B582D225292076D4EEF5
|
|
|
|
Digest = whirlpool
|
|
Input = "message digest"
|
|
Output = 378C84A4126E2DC6E56DCC7458377AAC838D00032230F53CE1F5700C0FFB4D3B8421557659EF55C106B4B52AC5A4AAA692ED920052838F3362E86DBD37A8903E
|
|
|
|
Digest = whirlpool
|
|
Input = "abcdefghijklmnopqrstuvwxyz"
|
|
Output = F1D754662636FFE92C82EBB9212A484A8D38631EAD4238F5442EE13B8054E41B08BF2A9251C30B6A0B8AAE86177AB4A6F68F673E7207865D5D9819A3DBA4EB3B
|
|
|
|
Digest = whirlpool
|
|
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
|
Output = DC37E008CF9EE69BF11F00ED9ABA26901DD7C28CDEC066CC6AF42E40F82F3A1E08EBA26629129D8FB7CB57211B9281A65517CC879D7B962142C65F5A7AF01467
|
|
|
|
Digest = whirlpool
|
|
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
|
Output = 466EF18BABB0154D25B9D38A6414F5C08784372BCCB204D6549C4AFADB6014294D5BD8DF2A6C44E538CD047B2681A51A2C60481E88C5A20B2C2A80CF3A9A083B
|
|
|
|
Digest = whirlpool
|
|
Input = "abcdbcdecdefdefgefghfghighijhijk"
|
|
Output = 2A987EA40F917061F5D6F0A0E4644F488A7A5A52DEEE656207C562F988E95C6916BDC8031BC5BE1B7B947639FE050B56939BAAA0ADFF9AE6745B7B181C3BE3FD
|
|
|
|
Digest = whirlpool
|
|
Input = "aaaaaaaaaa"
|
|
Count = 100000
|
|
Output = 0C99005BEB57EFF50A7CF005560DDF5D29057FD86B20BFD62DECA0F1CCEA4AF51FC15490EDDC47AF32BB2B66C34FF9AD8C6008AD677F77126953B226E4ED8B01
|
|
|
|
|