From 9a837f220ad1320c51ad2b57b2466fbe28670a45 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 28 Apr 2017 10:00:09 -0400 Subject: Ensure blank lines between tests. Also add a comment describing the file format. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/3337) --- test/evptests.txt | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 161 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/evptests.txt b/test/evptests.txt index adc35e42a0..c5c364ae83 100644 --- a/test/evptests.txt +++ b/test/evptests.txt @@ -6,6 +6,12 @@ # 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. + # SIPHASH tests - default values: 2,4 rounds, 16-byte mac # There are no official test vectors, they are simple vectors 1, 2, 3, etc @@ -145,7 +151,6 @@ Digest = SHA1 Input = 616263 Output = a9993e364706816aba3e25717850c26c9cd0d89d - # MD5 tests Digest = MD5 Input = @@ -179,21 +184,27 @@ Output = 57edf4a22be3c955ac49da2e2107b67a 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 @@ -202,24 +213,31 @@ Output = e33b4ddc9c38f2199c3e7b164fcc0536 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 @@ -228,27 +246,35 @@ Output = 9b752e45573d4b39f4dbd3323cab82bf63326bfb 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 @@ -850,7 +876,6 @@ Operation = ENCRYPT Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223 Ciphertext = C1CF48A89F2FFDD9CF4652E9EFDB72D74540A42BDE6D7836D59A5CEAAEF3105325B2072F - Cipher = aes-192-ctr Key = 16AF5B145FC9F579C175F93E3BFB0EED863D06CCFDB78515 IV = 0000004836733C147D6D93CB00000001 @@ -872,7 +897,6 @@ Operation = ENCRYPT Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223 Ciphertext = 96893FC55E5C722F540B7DD1DDF7E758D288BC95C69165884536C811662F2188ABEE0935 - Cipher = aes-256-ctr Key = 776BEFF2851DB06F4C8A0542C8696F6C6A81AF1EEC96B4D37FC1D689E6C1C104 IV = 00000060DB5672C97AA8F0B200000001 @@ -894,7 +918,6 @@ Operation = ENCRYPT Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223 Ciphertext = EB6C52821D0BBBF7CE7594462ACA4FAAB407DF866569FD07F48CC0B583D6071F1EC0E6B8 - # Self-generated vector to trigger false carry on big-endian platforms Cipher = aes-128-ctr Key = 7E24067817FAE0D743D6CE1F32539163 @@ -940,7 +963,6 @@ Key = FEDCBA9876543210 Plaintext = 0123456789ABCDEF Ciphertext = ED39D950FA74BCC4 - # DESX-CBC tests (from destest) Cipher = DESX-CBC Key = 0123456789abcdeff1e0d3c2b5a49786fedcba9876543210 @@ -948,7 +970,6 @@ IV = fedcba9876543210 Plaintext = 37363534333231204E6F77206973207468652074696D6520666F722000000000 Ciphertext = 846B2914851E9A2954732F8AA0A611C115CDC2D7951B1053A63C5E03B21AA3C4 - # DES EDE3 CBC tests (from destest) Cipher = DES-EDE3-CBC Key = 0123456789abcdeff1e0d3c2b5a49786fedcba9876543210 @@ -956,7 +977,6 @@ IV = fedcba9876543210 Plaintext = 37363534333231204E6F77206973207468652074696D6520666F722000000000 Ciphertext = 3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675 - # RC4 tests (from rc4test) Cipher = RC4 Key = 0123456789abcdef0123456789abcdef @@ -988,8 +1008,6 @@ Key = ef012345ef012345ef012345ef012345 Plaintext = 00000000000000000000 Ciphertext = d6a141a7ec3c38dfbd61 - - # Camellia tests from RFC3713 # For all ECB encrypts and decrypts, the transformed sequence is # CAMELLIA-bits-ECB:key::plaintext:ciphertext:encdec @@ -1008,7 +1026,6 @@ Key = 0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff Plaintext = 0123456789abcdeffedcba9876543210 Ciphertext = 9acc237dff16d76c20ef7c919e3a7509 - # ECB-CAMELLIA128.Encrypt Cipher = CAMELLIA-128-ECB Key = 000102030405060708090A0B0C0D0E0F @@ -2520,71 +2537,85 @@ Algorithm = SHA1 Input = "Sample message for keylen=blocklen" Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F Output = 5FD596EE78D5553C8FF4E72D266DFD192366DA29 + MAC = HMAC Algorithm = SHA1 Input = "Sample message for keylen