| /* |
| * Algorithm testing framework and tests. |
| * |
| * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> |
| * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org> |
| * Copyright (c) 2007 Nokia Siemens Networks |
| * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au> |
| * Copyright (c) 2019 Google LLC |
| * |
| * Updated RFC4106 AES-GCM testing. Some test vectors were taken from |
| * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/ |
| * gcm/gcm-test-vectors.tar.gz |
| * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com) |
| * Adrian Hoban <adrian.hoban@intel.com> |
| * Gabriele Paoloni <gabriele.paoloni@intel.com> |
| * Tadeusz Struk (tadeusz.struk@intel.com) |
| * Copyright (c) 2010, Intel Corporation. |
| * |
| * This program is free software; you can redistribute it and/or modify it |
| * under the terms of the GNU General Public License as published by the Free |
| * Software Foundation; either version 2 of the License, or (at your option) |
| * any later version. |
| * |
| */ |
| #ifndef _CRYPTO_TESTMGR_H |
| #define _CRYPTO_TESTMGR_H |
| |
| #include <linux/oid_registry.h> |
| |
| #define MAX_IVLEN 32 |
| |
| /* |
| * hash_testvec: structure to describe a hash (message digest) test |
| * @key: Pointer to key (NULL if none) |
| * @plaintext: Pointer to source data |
| * @digest: Pointer to expected digest |
| * @psize: Length of source data in bytes |
| * @ksize: Length of @key in bytes (0 if no key) |
| * @setkey_error: Expected error from setkey() |
| * @digest_error: Expected error from digest() |
| */ |
| struct hash_testvec { |
| const char *key; |
| const char *plaintext; |
| const char *digest; |
| unsigned short psize; |
| unsigned short ksize; |
| int setkey_error; |
| int digest_error; |
| }; |
| |
| /* |
| * cipher_testvec: structure to describe a symmetric cipher test |
| * @key: Pointer to key |
| * @klen: Length of @key in bytes |
| * @iv: Pointer to IV. If NULL, an all-zeroes IV is used. |
| * @iv_out: Pointer to output IV, if applicable for the cipher. |
| * @ptext: Pointer to plaintext |
| * @ctext: Pointer to ciphertext |
| * @len: Length of @ptext and @ctext in bytes |
| * @wk: Does the test need CRYPTO_TFM_REQ_FORBID_WEAK_KEYS? |
| * ( e.g. test needs to fail due to a weak key ) |
| * @fips_skip: Skip the test vector in FIPS mode |
| * @generates_iv: Encryption should ignore the given IV, and output @iv_out. |
| * Decryption takes @iv_out. Needed for AES Keywrap ("kw(aes)"). |
| * @setkey_error: Expected error from setkey() |
| * @crypt_error: Expected error from encrypt() and decrypt() |
| */ |
| struct cipher_testvec { |
| const char *key; |
| const char *iv; |
| const char *iv_out; |
| const char *ptext; |
| const char *ctext; |
| unsigned char wk; /* weak key flag */ |
| unsigned short klen; |
| unsigned short len; |
| bool fips_skip; |
| bool generates_iv; |
| int setkey_error; |
| int crypt_error; |
| }; |
| |
| /* |
| * aead_testvec: structure to describe an AEAD test |
| * @key: Pointer to key |
| * @iv: Pointer to IV. If NULL, an all-zeroes IV is used. |
| * @ptext: Pointer to plaintext |
| * @assoc: Pointer to associated data |
| * @ctext: Pointer to the full authenticated ciphertext. For AEADs that |
| * produce a separate "ciphertext" and "authentication tag", these |
| * two parts are concatenated: ciphertext || tag. |
| * @novrfy: Decryption verification failure expected? |
| * @wk: Does the test need CRYPTO_TFM_REQ_FORBID_WEAK_KEYS? |
| * (e.g. setkey() needs to fail due to a weak key) |
| * @klen: Length of @key in bytes |
| * @plen: Length of @ptext in bytes |
| * @alen: Length of @assoc in bytes |
| * @clen: Length of @ctext in bytes |
| * @setkey_error: Expected error from setkey() |
| * @setauthsize_error: Expected error from setauthsize() |
| * @crypt_error: Expected error from encrypt() and decrypt() |
| */ |
| struct aead_testvec { |
| const char *key; |
| const char *iv; |
| const char *ptext; |
| const char *assoc; |
| const char *ctext; |
| unsigned char novrfy; |
| unsigned char wk; |
| unsigned char klen; |
| unsigned short plen; |
| unsigned short clen; |
| unsigned short alen; |
| int setkey_error; |
| int setauthsize_error; |
| int crypt_error; |
| }; |
| |
| struct cprng_testvec { |
| const char *key; |
| const char *dt; |
| const char *v; |
| const char *result; |
| unsigned char klen; |
| unsigned short dtlen; |
| unsigned short vlen; |
| unsigned short rlen; |
| unsigned short loops; |
| }; |
| |
| struct drbg_testvec { |
| const unsigned char *entropy; |
| size_t entropylen; |
| const unsigned char *entpra; |
| const unsigned char *entprb; |
| size_t entprlen; |
| const unsigned char *addtla; |
| const unsigned char *addtlb; |
| size_t addtllen; |
| const unsigned char *pers; |
| size_t perslen; |
| const unsigned char *expected; |
| size_t expectedlen; |
| }; |
| |
| struct akcipher_testvec { |
| const unsigned char *key; |
| const unsigned char *params; |
| const unsigned char *m; |
| const unsigned char *c; |
| unsigned int key_len; |
| unsigned int param_len; |
| unsigned int m_size; |
| unsigned int c_size; |
| bool public_key_vec; |
| bool siggen_sigver_test; |
| enum OID algo; |
| }; |
| |
| struct kpp_testvec { |
| const unsigned char *secret; |
| const unsigned char *b_secret; |
| const unsigned char *b_public; |
| const unsigned char *expected_a_public; |
| const unsigned char *expected_ss; |
| unsigned short secret_size; |
| unsigned short b_secret_size; |
| unsigned short b_public_size; |
| unsigned short expected_a_public_size; |
| unsigned short expected_ss_size; |
| bool genkey; |
| }; |
| |
| static const char zeroed_string[48]; |
| |
| /* |
| * RSA test vectors. Borrowed from openSSL. |
| */ |
| static const struct akcipher_testvec rsa_tv_template[] = { |
| { |
| #ifndef CONFIG_CRYPTO_FIPS |
| .key = |
| "\x30\x81\x9A" /* sequence of 154 bytes */ |
| "\x02\x01\x01" /* version - integer of 1 byte */ |
| "\x02\x41" /* modulus - integer of 65 bytes */ |
| "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F" |
| "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5" |
| "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93" |
| "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1" |
| "\xF5" |
| "\x02\x01\x11" /* public key - integer of 1 byte */ |
| "\x02\x40" /* private key - integer of 64 bytes */ |
| "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44" |
| "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64" |
| "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9" |
| "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51" |
| "\x02\x01\x00" /* prime1 - integer of 1 byte */ |
| "\x02\x01\x00" /* prime2 - integer of 1 byte */ |
| "\x02\x01\x00" /* exponent1 - integer of 1 byte */ |
| "\x02\x01\x00" /* exponent2 - integer of 1 byte */ |
| "\x02\x01\x00", /* coefficient - integer of 1 byte */ |
| .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a", |
| .c = |
| "\x63\x1c\xcd\x7b\xe1\x7e\xe4\xde\xc9\xa8\x89\xa1\x74\xcb\x3c\x63" |
| "\x7d\x24\xec\x83\xc3\x15\xe4\x7f\x73\x05\x34\xd1\xec\x22\xbb\x8a" |
| "\x5e\x32\x39\x6d\xc1\x1d\x7d\x50\x3b\x9f\x7a\xad\xf0\x2e\x25\x53" |
| "\x9f\x6e\xbd\x4c\x55\x84\x0c\x9b\xcf\x1a\x4b\x51\x1e\x9e\x0c\x06", |
| .key_len = 157, |
| .m_size = 8, |
| .c_size = 64, |
| }, { |
| .key = |
| "\x30\x82\x01\x1D" /* sequence of 285 bytes */ |
| "\x02\x01\x01" /* version - integer of 1 byte */ |
| "\x02\x81\x81" /* modulus - integer of 129 bytes */ |
| "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71" |
| "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5" |
| "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD" |
| "\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80" |
| "\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25" |
| "\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39" |
| "\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68" |
| "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD" |
| "\xCB" |
| "\x02\x01\x11" /* public key - integer of 1 byte */ |
| "\x02\x81\x81" /* private key - integer of 129 bytes */ |
| "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD" |
| "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41" |
| "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69" |
| "\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA" |
| "\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94" |
| "\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A" |
| "\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94" |
| "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3" |
| "\xC1" |
| "\x02\x01\x00" /* prime1 - integer of 1 byte */ |
| "\x02\x01\x00" /* prime2 - integer of 1 byte */ |
| "\x02\x01\x00" /* exponent1 - integer of 1 byte */ |
| "\x02\x01\x00" /* exponent2 - integer of 1 byte */ |
| "\x02\x01\x00", /* coefficient - integer of 1 byte */ |
| .key_len = 289, |
| .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a", |
| .c = |
| "\x74\x1b\x55\xac\x47\xb5\x08\x0a\x6e\x2b\x2d\xf7\x94\xb8\x8a\x95" |
| "\xed\xa3\x6b\xc9\x29\xee\xb2\x2c\x80\xc3\x39\x3b\x8c\x62\x45\x72" |
| "\xc2\x7f\x74\x81\x91\x68\x44\x48\x5a\xdc\xa0\x7e\xa7\x0b\x05\x7f" |
| "\x0e\xa0\x6c\xe5\x8f\x19\x4d\xce\x98\x47\x5f\xbd\x5f\xfe\xe5\x34" |
| "\x59\x89\xaf\xf0\xba\x44\xd7\xf1\x1a\x50\x72\xef\x5e\x4a\xb6\xb7" |
| "\x54\x34\xd1\xc4\x83\x09\xdf\x0f\x91\x5f\x7d\x91\x70\x2f\xd4\x13" |
| "\xcc\x5e\xa4\x6c\xc3\x4d\x28\xef\xda\xaf\xec\x14\x92\xfc\xa3\x75" |
| "\x13\xb4\xc1\xa1\x11\xfc\x40\x2f\x4c\x9d\xdf\x16\x76\x11\x20\x6b", |
| .m_size = 8, |
| .c_size = 128, |
| }, { |
| #endif |
| .key = |
| "\x30\x82\x02\x1F" /* sequence of 543 bytes */ |
| "\x02\x01\x01" /* version - integer of 1 byte */ |
| "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */ |
| "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D" |
| "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA" |
| "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D" |
| "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77" |
| "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA" |
| "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1" |
| "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48" |
| "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F" |
| "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77" |
| "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA" |
| "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A" |
| "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC" |
| "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD" |
| "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB" |
| "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E" |
| "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB" |
| "\x02\x03\x01\x00\x01" /* public key - integer of 3 bytes */ |
| "\x02\x82\x01\x00" /* private key - integer of 256 bytes */ |
| "\x52\x41\xF4\xDA\x7B\xB7\x59\x55\xCA\xD4\x2F\x0F\x3A\xCB\xA4\x0D" |
| "\x93\x6C\xCC\x9D\xC1\xB2\xFB\xFD\xAE\x40\x31\xAC\x69\x52\x21\x92" |
| "\xB3\x27\xDF\xEA\xEE\x2C\x82\xBB\xF7\x40\x32\xD5\x14\xC4\x94\x12" |
| "\xEC\xB8\x1F\xCA\x59\xE3\xC1\x78\xF3\x85\xD8\x47\xA5\xD7\x02\x1A" |
| "\x65\x79\x97\x0D\x24\xF4\xF0\x67\x6E\x75\x2D\xBF\x10\x3D\xA8\x7D" |
| "\xEF\x7F\x60\xE4\xE6\x05\x82\x89\x5D\xDF\xC6\xD2\x6C\x07\x91\x33" |
| "\x98\x42\xF0\x02\x00\x25\x38\xC5\x85\x69\x8A\x7D\x2F\x95\x6C\x43" |
| "\x9A\xB8\x81\xE2\xD0\x07\x35\xAA\x05\x41\xC9\x1E\xAF\xE4\x04\x3B" |
| "\x19\xB8\x73\xA2\xAC\x4B\x1E\x66\x48\xD8\x72\x1F\xAC\xF6\xCB\xBC" |
| "\x90\x09\xCA\xEC\x0C\xDC\xF9\x2C\xD7\xEB\xAE\xA3\xA4\x47\xD7\x33" |
| "\x2F\x8A\xCA\xBC\x5E\xF0\x77\xE4\x97\x98\x97\xC7\x10\x91\x7D\x2A" |
| "\xA6\xFF\x46\x83\x97\xDE\xE9\xE2\x17\x03\x06\x14\xE2\xD7\xB1\x1D" |
| "\x77\xAF\x51\x27\x5B\x5E\x69\xB8\x81\xE6\x11\xC5\x43\x23\x81\x04" |
| "\x62\xFF\xE9\x46\xB8\xD8\x44\xDB\xA5\xCC\x31\x54\x34\xCE\x3E\x82" |
| "\xD6\xBF\x7A\x0B\x64\x21\x6D\x88\x7E\x5B\x45\x12\x1E\x63\x8D\x49" |
| "\xA7\x1D\xD9\x1E\x06\xCD\xE8\xBA\x2C\x8C\x69\x32\xEA\xBE\x60\x71" |
| "\x02\x01\x00" /* prime1 - integer of 1 byte */ |
| "\x02\x01\x00" /* prime2 - integer of 1 byte */ |
| "\x02\x01\x00" /* exponent1 - integer of 1 byte */ |
| "\x02\x01\x00" /* exponent2 - integer of 1 byte */ |
| "\x02\x01\x00", /* coefficient - integer of 1 byte */ |
| .key_len = 547, |
| .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a", |
| .c = |
| "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe" |
| "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36" |
| "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd" |
| "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3" |
| "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69" |
| "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41" |
| "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30" |
| "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5" |
| "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73" |
| "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d" |
| "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b" |
| "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0" |
| "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d" |
| "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6" |
| "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21" |
| "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98", |
| .m_size = 8, |
| .c_size = 256, |
| }, { |
| .key = |
| "\x30\x82\x01\x09" /* sequence of 265 bytes */ |
| "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */ |
| "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D" |
| "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA" |
| "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D" |
| "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77" |
| "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA" |
| "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1" |
| "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48" |
| "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F" |
| "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77" |
| "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA" |
| "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A" |
| "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC" |
| "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD" |
| "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB" |
| "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E" |
| "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB" |
| "\x02\x03\x01\x00\x01", /* public key - integer of 3 bytes */ |
| .key_len = 269, |
| .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a", |
| .c = |
| "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe" |
| "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36" |
| "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd" |
| "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3" |
| "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69" |
| "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41" |
| "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30" |
| "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5" |
| "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73" |
| "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d" |
| "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b" |
| "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0" |
| "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d" |
| "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6" |
| "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21" |
| "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98", |
| .m_size = 8, |
| .c_size = 256, |
| .public_key_vec = true, |
| #ifndef CONFIG_CRYPTO_FIPS |
| }, { |
| .key = |
| "\x30\x82\x09\x29" /* sequence of 2345 bytes */ |
| "\x02\x01\x00" /* version integer of 1 byte */ |
| "\x02\x82\x02\x01" /* modulus - integer of 513 bytes */ |
| "\x00\xC3\x8B\x55\x7B\x73\x4D\xFF\xE9\x9B\xC6\xDC\x67\x3C\xB4\x8E" |
| "\xA0\x86\xED\xF2\xB9\x50\x5C\x54\x5C\xBA\xE4\xA1\xB2\xA7\xAE\x2F" |
| "\x1B\x7D\xF1\xFB\xAC\x79\xC5\xDF\x1A\x00\xC9\xB2\xC1\x61\x25\x33" |
| "\xE6\x9C\xE9\xCF\xD6\x27\xC4\x4E\x44\x30\x44\x5E\x08\xA1\x87\x52" |
| "\xCC\x6B\x97\x70\x8C\xBC\xA5\x06\x31\x0C\xD4\x2F\xD5\x7D\x26\x24" |
| "\xA2\xE2\xAC\x78\xF4\x53\x14\xCE\xF7\x19\x2E\xD7\xF7\xE6\x0C\xB9" |
| "\x56\x7F\x0B\xF1\xB1\xE2\x43\x70\xBD\x86\x1D\xA1\xCC\x2B\x19\x08" |
| "\x76\xEF\x91\xAC\xBF\x20\x24\x0D\x38\xC0\x89\xB8\x9A\x70\xB3\x64" |
| "\xD9\x8F\x80\x41\x10\x5B\x9F\xB1\xCB\x76\x43\x00\x21\x25\x36\xD4" |
| "\x19\xFC\x55\x95\x10\xE4\x26\x74\x98\x2C\xD9\xBD\x0B\x2B\x04\xC2" |
| "\xAC\x82\x38\xB4\xDD\x4C\x04\x7E\x51\x36\x40\x1E\x0B\xC4\x7C\x25" |
| "\xDD\x4B\xB2\xE7\x20\x0A\x57\xF9\xB4\x94\xC3\x08\x33\x22\x6F\x8B" |
| "\x48\xDB\x03\x68\x5A\x5B\xBA\xAE\xF3\xAD\xCF\xC3\x6D\xBA\xF1\x28" |
| "\x67\x7E\x6C\x79\x07\xDE\xFC\xED\xE7\x96\xE3\x6C\xE0\x2C\x87\xF8" |
| "\x02\x01\x28\x38\x43\x21\x53\x84\x69\x75\x78\x15\x7E\xEE\xD2\x1B" |
| "\xB9\x23\x40\xA8\x86\x1E\x38\x83\xB2\x73\x1D\x53\xFB\x9E\x2A\x8A" |
| "\xB2\x75\x35\x01\xC3\xC3\xC4\x94\xE8\x84\x86\x64\x81\xF4\x42\xAA" |
| "\x3C\x0E\xD6\x4F\xBC\x0A\x09\x2D\xE7\x1B\xD4\x10\xA8\x54\xEA\x89" |
| "\x84\x8A\xCB\xF7\x5A\x3C\xCA\x76\x08\x29\x62\xB4\x6A\x22\xDF\x14" |
| "\x95\x71\xFD\xB6\x86\x39\xB8\x8B\xF8\x91\x7F\x38\xAA\x14\xCD\xE5" |
| "\xF5\x1D\xC2\x6D\x53\x69\x52\x84\x7F\xA3\x1A\x5E\x26\x04\x83\x06" |
| "\x73\x52\x56\xCF\x76\x26\xC9\xDD\x75\xD7\xFC\xF4\x69\xD8\x7B\x55" |
| "\xB7\x68\x13\x53\xB9\xE7\x89\xC3\xE8\xD6\x6E\xA7\x6D\xEA\x81\xFD" |
| "\xC4\xB7\x05\x5A\xB7\x41\x0A\x23\x8E\x03\x8A\x1C\xAE\xD3\x1E\xCE" |
| "\xE3\x5E\xFC\x19\x4A\xEE\x61\x9B\x8E\xE5\xE5\xDD\x85\xF9\x41\xEC" |
| "\x14\x53\x92\xF7\xDD\x06\x85\x02\x91\xE3\xEB\x6C\x43\x03\xB1\x36" |
| "\x7B\x89\x5A\xA8\xEB\xFC\xD5\xA8\x35\xDC\x81\xD9\x5C\xBD\xCA\xDC" |
| "\x9B\x98\x0B\x06\x5D\x0C\x5B\xEE\xF3\xD5\xCC\x57\xC9\x71\x2F\x90" |
| "\x3B\x3C\xF0\x8E\x4E\x35\x48\xAE\x63\x74\xA9\xFC\x72\x75\x8E\x34" |
| "\xA8\xF2\x1F\xEA\xDF\x3A\x37\x2D\xE5\x39\x39\xF8\x57\x58\x3C\x04" |
| "\xFE\x87\x06\x98\xBC\x7B\xD3\x21\x36\x60\x25\x54\xA7\x3D\xFA\x91" |
| "\xCC\xA8\x0B\x92\x8E\xB4\xF7\x06\xFF\x1E\x95\xCB\x07\x76\x97\x3B" |
| "\x9D" |
| "\x02\x03\x01\x00\x01" /* public key integer of 3 bytes */ |
| "\x02\x82\x02\x00" /* private key integer of 512 bytes */ |
| "\x74\xA9\xE0\x6A\x32\xB4\xCA\x85\xD9\x86\x9F\x60\x88\x7B\x40\xCC" |
| "\xCD\x33\x91\xA8\xB6\x25\x1F\xBF\xE3\x51\x1C\x97\xB6\x2A\xD9\xB8" |
| "\x11\x40\x19\xE3\x21\x13\xC8\xB3\x7E\xDC\xD7\x65\x40\x4C\x2D\xD6" |
| "\xDC\xAF\x32\x6C\x96\x75\x2C\x2C\xCA\x8F\x3F\x7A\xEE\xC4\x09\xC6" |
| "\x24\x3A\xC9\xCF\x6D\x8D\x17\x50\x94\x52\xD3\xE7\x0F\x2F\x7E\x94" |
| "\x1F\xA0\xBE\xD9\x25\xE8\x38\x42\x7C\x27\xD2\x79\xF8\x2A\x87\x38" |
| "\xEF\xBB\x74\x8B\xA8\x6E\x8C\x08\xC6\xC7\x4F\x0C\xBC\x79\xC6\xEF" |
| "\x0E\xA7\x5E\xE4\xF8\x8C\x09\xC7\x5E\x37\xCC\x87\x77\xCD\xCF\xD1" |
| "\x6D\x28\x1B\xA9\x62\xC0\xB8\x16\xA7\x8B\xF9\xBB\xCC\xB4\x15\x7F" |
| "\x1B\x69\x03\xF2\x7B\xEB\xE5\x8C\x14\xD6\x23\x4F\x52\x6F\x18\xA6" |
| "\x4B\x5B\x01\xAD\x35\xF9\x48\x53\xB3\x86\x35\x66\xD7\xE7\x29\xC0" |
| "\x09\xB5\xC6\xE6\xFA\xC4\xDA\x19\xBE\xD7\x4D\x41\x14\xBE\x6F\xDF" |
| "\x1B\xAB\xC0\xCA\x88\x07\xAC\xF1\x7D\x35\x83\x67\x28\x2D\x50\xE9" |
| "\xCE\x27\x71\x5E\x1C\xCF\xD2\x30\x65\x79\x72\x2F\x9C\xE1\xD2\x39" |
| "\x7F\xEF\x3B\x01\xF2\x14\x1D\xDF\xBD\x51\xD3\xA1\x53\x62\xCF\x5F" |
| "\x79\x84\xCE\x06\x96\x69\x29\x49\x82\x1C\x71\x4A\xA1\x66\xC8\x2F" |
| "\xFD\x7B\x96\x7B\xFC\xC4\x26\x58\xC4\xFC\x7C\xAF\xB5\xE8\x95\x83" |
| "\x87\xCB\x46\xDE\x97\xA7\xB3\xA2\x54\x5B\xD7\xAF\xAB\xEB\xC8\xF3" |
| "\x55\x9D\x48\x2B\x30\x9C\xDC\x26\x4B\xC2\x89\x45\x13\xB2\x01\x9A" |
| "\xA4\x65\xC3\xEC\x24\x2D\x26\x97\xEB\x80\x8A\x9D\x03\xBC\x59\x66" |
| "\x9E\xE2\xBB\xBB\x63\x19\x64\x93\x11\x7B\x25\x65\x30\xCD\x5B\x4B" |
| "\x2C\xFF\xDC\x2D\x30\x87\x1F\x3C\x88\x07\xD0\xFC\x48\xCC\x05\x8A" |
| "\xA2\xC8\x39\x3E\xD5\x51\xBC\x0A\xBE\x6D\xA8\xA0\xF6\x88\x06\x79" |
| "\x13\xFF\x1B\x45\xDA\x54\xC9\x24\x25\x8A\x75\x0A\x26\xD1\x69\x81" |
| "\x14\x14\xD1\x79\x7D\x8E\x76\xF2\xE0\xEB\xDD\x0F\xDE\xC2\xEC\x80" |
| "\xD7\xDC\x16\x99\x92\xBE\xCB\x40\x0C\xCE\x7C\x3B\x46\xA2\x5B\x5D" |
| "\x0C\x45\xEB\xE1\x00\xDE\x72\x50\xB1\xA6\x0B\x76\xC5\x8D\xFC\x82" |
| "\x38\x6D\x99\x14\x1D\x1A\x4A\xD3\x7C\x53\xB8\x12\x46\xA2\x30\x38" |
| "\x82\xF4\x96\x6E\x8C\xCE\x47\x0D\xAF\x0A\x3B\x45\xB7\x43\x95\x43" |
| "\x9E\x02\x2C\x44\x07\x6D\x1F\x3C\x66\x89\x09\xB6\x1F\x06\x30\xCC" |
| "\xAD\xCE\x7D\x9A\xDE\x3E\xFB\x6C\xE4\x58\x43\xD2\x4F\xA5\x9E\x5E" |
| "\xA7\x7B\xAE\x3A\xF6\x7E\xD9\xDB\xD3\xF5\xC5\x41\xAF\xE6\x9C\x91" |
| "\x02\x82\x01\x01" /* prime1 - integer of 257 bytes */ |
| "\x00\xE0\xA6\x6C\xF0\xA2\xF8\x81\x85\x36\x43\xD0\x13\x0B\x33\x8B" |
| "\x8F\x78\x3D\xAC\xC7\x5E\x46\x6A\x7F\x05\xAE\x3E\x26\x0A\xA6\xD0" |
| "\x51\xF3\xC8\x61\xF5\x77\x22\x48\x10\x87\x4C\xD5\xA4\xD5\xAE\x2D" |
| "\x4E\x7A\xFE\x1C\x31\xE7\x6B\xFF\xA4\x69\x20\xF9\x2A\x0B\x99\xBE" |
| "\x7C\x32\x68\xAD\xB0\xC6\x94\x81\x41\x75\xDC\x06\x78\x0A\xB4\xCF" |
| "\xCD\x1B\x2D\x31\xE4\x7B\xEA\xA8\x35\x99\x75\x57\xC6\x0E\xF6\x78" |
| "\x4F\xA0\x92\x4A\x00\x1B\xE7\x96\xF2\x5B\xFD\x2C\x0A\x0A\x13\x81" |
| "\xAF\xCB\x59\x87\x31\xD9\x83\x65\xF2\x22\x48\xD0\x03\x67\x39\xF6" |
| "\xFF\xA8\x36\x07\x3A\x68\xE3\x7B\xA9\x64\xFD\x9C\xF7\xB1\x3D\xBF" |
| "\x26\x5C\xCC\x7A\xFC\xA2\x8F\x51\xD1\xE1\xE2\x3C\xEC\x06\x75\x7C" |
| "\x34\xF9\xA9\x33\x70\x11\xAD\x5A\xDC\x5F\xCF\x50\xF6\x23\x2F\x39" |
| "\xAC\x92\x48\x53\x4D\x01\x96\x3C\xD8\xDC\x1F\x23\x23\x78\x80\x34" |
| "\x54\x14\x76\x8B\xB6\xBB\xFB\x88\x78\x31\x59\x28\xD2\xB1\x75\x17" |
| "\x88\x04\x4A\x78\x62\x18\x2E\xF5\xFB\x9B\xEF\x15\xD8\x16\x47\xC6" |
| "\x42\xB1\x02\xDA\x9E\xE3\x84\x90\xB4\x2D\xC3\xCE\x13\xC9\x12\x7D" |
| "\x3E\xCD\x39\x39\xC9\xAD\xA1\x1A\xE6\xD5\xAD\x5A\x09\x4D\x1B\x0C" |
| "\xAB" |
| "\x02\x82\x01\x01" /* prime 2 - integer of 257 bytes */ |
| "\x00\xDE\xD5\x1B\xF6\xCD\x83\xB1\xC6\x47\x7E\xB9\xC0\x6B\xA9\xB8" |
| "\x02\xF3\xAE\x40\x5D\xFC\xD3\xE5\x4E\xF1\xE3\x39\x04\x52\x84\x89" |
| "\x40\x37\xBB\xC2\xCD\x7F\x71\x77\x17\xDF\x6A\x4C\x31\x24\x7F\xB9" |
| "\x7E\x7F\xC8\x43\x4A\x3C\xEB\x8D\x1B\x7F\x21\x51\x67\x45\x8F\xA0" |
| "\x36\x29\x3A\x18\x45\xA5\x32\xEC\x74\x88\x3C\x98\x5D\x67\x3B\xD7" |
| "\x51\x1F\xE9\xAE\x09\x01\xDE\xDE\x7C\xFB\x60\xD1\xA5\x6C\xE9\x6A" |
| "\x93\x04\x02\x3A\xBB\x67\x02\xB9\xFD\x23\xF0\x02\x2B\x49\x85\xC9" |
| "\x5B\xE7\x4B\xDF\xA3\xF4\xEE\x59\x4C\x45\xEF\x8B\xC1\x6B\xDE\xDE" |
| "\xBC\x1A\xFC\xD2\x76\x3F\x33\x74\xA9\x8E\xA3\x7E\x0C\xC6\xCE\x70" |
| "\xA1\x5B\xA6\x77\xEA\x76\xEB\x18\xCE\xB9\xD7\x78\x8D\xAE\x06\xBB" |
| "\xD3\x1F\x16\x0D\x05\xAB\x4F\xC6\x52\xC8\x6B\x36\x51\x7D\x1D\x27" |
| "\xAF\x88\x9A\x6F\xCC\x25\x2E\x74\x06\x72\xCE\x9E\xDB\xE0\x9D\x30" |
| "\xEF\x55\xA5\x58\x21\xA7\x42\x12\x2C\x2C\x23\x87\xC1\x0F\xE8\x51" |
| "\xDA\x53\xDA\xFC\x05\x36\xDF\x08\x0E\x08\x36\xBE\x5C\x86\x9E\xCA" |
| "\x68\x90\x33\x12\x0B\x14\x82\xAB\x90\x1A\xD4\x49\x32\x9C\xBD\xAA" |
| "\xAB\x4E\x38\xF1\xEE\xED\x3D\x3F\xE8\xBD\x48\x56\xA6\x64\xEE\xC8" |
| "\xD7" |
| "\x02\x82\x01\x01" /* exponent 1 - integer of 257 bytes */ |
| "\x00\x96\x5E\x6F\x8F\x06\xD6\xE6\x03\x1F\x96\x76\x81\x38\xBF\x30" |
| "\xCC\x40\x84\xAF\xD0\xE7\x06\xA5\x24\x0E\xCE\x59\xA5\x26\xFE\x0F" |
| "\x74\xBB\x83\xC6\x26\x02\xAF\x3C\xA3\x6B\x9C\xFF\x68\x0C\xEB\x40" |
| "\x42\x46\xCB\x2E\x5E\x2C\xF4\x3A\x32\x77\x77\xED\xAF\xBA\x02\x17" |
| "\xE1\x93\xF0\x43\x4A\x8F\x31\x39\xEF\x72\x0F\x6B\x79\x10\x59\x84" |
| "\xBA\x5A\x55\x7F\x0E\xDB\xEE\xEE\xD6\xA9\xB8\x44\x9F\x3A\xC6\xB9" |
| "\x33\x3B\x5C\x90\x11\xD0\x9B\xCC\x8A\xBF\x0E\x10\x5B\x4B\xF1\x50" |
| "\x9E\x35\xB3\xE0\x6D\x7A\x95\x9C\x38\x5D\xC0\x75\x13\xC2\x15\xA7" |
| "\x81\xEA\xBA\xF7\x4D\x9E\x85\x9D\xF1\x7D\xBA\xD0\x45\x6F\x2A\xD0" |
| "\x76\xC2\x28\xD0\xAD\xA7\xB5\xDC\xE3\x6A\x99\xFF\x83\x50\xB3\x75" |
| "\x07\x14\x91\xAF\xEF\x74\xB5\x9F\x9A\xE0\xBA\xA9\x0B\x87\xF3\x85" |
| "\x5C\x40\xB2\x0E\xA7\xFD\xC6\xED\x45\x8E\xD9\x7C\xB0\xB2\x68\xC6" |
| "\x1D\xFD\x70\x78\x06\x41\x7F\x95\x12\x36\x9D\xE2\x58\x5D\x15\xEE" |
| "\x41\x49\xF5\xFA\xEC\x56\x19\xA0\xE6\xE0\xB2\x40\xE1\xD9\xD0\x03" |
| "\x22\x02\xCF\xD1\x3C\x07\x38\x65\x8F\x65\x0E\xAA\x32\xCE\x25\x05" |
| "\x16\x73\x51\xB9\x9F\x88\x0B\xCD\x30\xF3\x97\xCC\x2B\x6B\xA4\x0E" |
| "\x6F" |
| "\x02\x82\x01\x00" /* exponent 2 - integer of 256 bytes */ |
| "\x2A\x5F\x3F\xB8\x08\x90\x58\x47\xA9\xE4\xB1\x11\xA3\xE7\x5B\xF4" |
| "\x43\xBE\x08\xC3\x56\x86\x3C\x7E\x6C\x84\x96\x9C\xF9\xCB\xF6\x05" |
| "\x5E\x13\xB8\x11\x37\x80\xAD\xF2\xBE\x2B\x0A\x5D\xF5\xE0\xCB\xB7" |
| "\x00\x39\x66\x82\x41\x5F\x51\x2F\xBF\x56\xE8\x91\xC8\xAA\x6C\xFE" |
| "\x9F\x8C\x4A\x7D\x43\xD2\x91\x1F\xFF\x9F\xF6\x21\x1C\xB6\x46\x55" |
| "\x48\xCA\x38\xAB\xC1\xCD\x4D\x65\x5A\xAF\xA8\x6D\xDA\x6D\xF0\x34" |
| "\x10\x79\x14\x0D\xFA\xA2\x8C\x17\x54\xB4\x18\xD5\x7E\x5F\x90\x50" |
| "\x87\x84\xE7\xFB\xD7\x61\x53\x5D\xAB\x96\xC7\x6E\x7A\x42\xA0\xFC" |
| "\x07\xED\xB7\x5F\x80\xD9\x19\xFF\xFB\xFD\x9E\xC4\x73\x31\x62\x3D" |
| "\x6C\x9E\x15\x03\x62\xA5\x85\xCC\x19\x8E\x9D\x7F\xE3\x6D\xA8\x5D" |
| "\x96\xF5\xAC\x78\x3D\x81\x27\xE7\x29\xF1\x29\x1D\x09\xBB\x77\x86" |
| "\x6B\x65\x62\x88\xE1\x31\x1A\x22\xF7\xC5\xCE\x73\x65\x1C\xBE\xE7" |
| "\x63\xD3\xD3\x14\x63\x27\xAF\x28\xF3\x23\xB6\x76\xC1\xBD\x9D\x82" |
| "\xF4\x9B\x19\x7D\x2C\x57\xF0\xC2\x2A\x51\xAE\x95\x0D\x8C\x38\x54" |
| "\xF5\xC6\xA0\x51\xB7\x0E\xB9\xEC\xE7\x0D\x22\xF6\x1A\xD3\xFE\x16" |
| "\x21\x03\xB7\x0D\x85\xD3\x35\xC9\xDD\xE4\x59\x85\xBE\x7F\xA1\x75" |
| "\x02\x82\x01\x01" /* coefficient - integer of 257 bytes */ |
| "\x00\xB9\x48\xD2\x54\x2F\x19\x54\x64\xAE\x62\x80\x61\x89\x80\xB4" |
| "\x48\x0B\x8D\x7E\x1B\x0F\x50\x08\x82\x3F\xED\x75\x84\xB7\x13\xE4" |
| "\xF8\x8D\xA8\xBB\x54\x21\x4C\x5A\x54\x07\x16\x4B\xB4\xA4\x9E\x30" |
| "\xBF\x7A\x30\x1B\x39\x60\xA3\x21\x53\xFB\xB0\xDC\x0F\x7C\x2C\xFB" |
| "\xAA\x95\x7D\x51\x39\x28\x33\x1F\x25\x31\x53\xF5\xD2\x64\x2B\xF2" |
| "\x1E\xB3\xC0\x6A\x0B\xC9\xA4\x42\x64\x5C\xFB\x15\xA3\xE8\x4C\x3A" |
| "\x9C\x3C\xBE\xA3\x39\x83\x23\xE3\x6D\x18\xCC\xC2\xDC\x63\x8D\xBA" |
| "\x98\xE0\xE0\x31\x4A\x2B\x37\x9C\x4D\x6B\xF3\x9F\x51\xE4\x43\x5C" |
| "\x83\x5F\xBF\x5C\xFE\x92\x45\x01\xAF\xF5\xC2\xF4\xB7\x56\x93\xA5" |
| "\xF4\xAA\x67\x3C\x48\x37\xBD\x9A\x3C\xFE\xA5\x9A\xB0\xD1\x6B\x85" |
| "\xDD\x81\xD4\xFA\xAD\x31\x83\xA8\x22\x9B\xFD\xB4\x61\xDC\x7A\x51" |
| "\x59\x62\x10\x1B\x7E\x44\xA3\xFE\x90\x51\x5A\x3E\x02\x87\xAD\xFA" |
| "\xDD\x0B\x1F\x3D\x35\xAF\xEE\x13\x85\x51\xA7\x42\xC0\xEE\x9E\x20" |
| "\xE9\xD0\x29\xB2\xE4\x21\xE4\x6D\x62\xB9\xF4\x48\x4A\xD8\x46\x8E" |
| "\x61\xA6\x2C\x5D\xDF\x8F\x97\x2B\x3A\x75\x1D\x83\x17\x6F\xC6\xB0" |
| "\xDE\xFC\x14\x25\x06\x5A\x60\xBB\xB8\x21\x89\xD1\xEF\x57\xF1\x71" |
| "\x3D", |
| .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a", |
| .c = |
| "\x5c\xce\x9c\xd7\x9a\x9e\xa1\xfe\x7a\x82\x3c\x68\x27\x98\xe3\x5d" |
| "\xd5\xd7\x07\x29\xf5\xfb\xc3\x1a\x7f\x63\x1e\x62\x31\x3b\x19\x87" |
| "\x79\x4f\xec\x7b\xf3\xcb\xea\x9b\x95\x52\x3a\x40\xe5\x87\x7b\x72" |
| "\xd1\x72\xc9\xfb\x54\x63\xd8\xc9\xd7\x2c\xfc\x7b\xc3\x14\x1e\xbc" |
| "\x18\xb4\x34\xa1\xbf\x14\xb1\x37\x31\x6e\xf0\x1b\x35\x19\x54\x07" |
| "\xf7\x99\xec\x3e\x63\xe2\xcd\x61\x28\x65\xc3\xcd\xb1\x38\x36\xa5" |
| "\xb2\xd7\xb0\xdc\x1f\xf5\xef\x19\xc7\x53\x32\x2d\x1c\x26\xda\xe4" |
| "\x0d\xd6\x90\x7e\x28\xd8\xdc\xe4\x61\x05\xd2\x25\x90\x01\xd3\x96" |
| "\x6d\xa6\xcf\x58\x20\xbb\x03\xf4\x01\xbc\x79\xb9\x18\xd8\xb8\xba" |
| "\xbd\x93\xfc\xf2\x62\x5d\x8c\x66\x1e\x0e\x84\x59\x93\xdd\xe2\x93" |
| "\xa2\x62\x7d\x08\x82\x7a\xdd\xfc\xb8\xbc\xc5\x4f\x9c\x4e\xbf\xb4" |
| "\xfc\xf4\xc5\x01\xe8\x00\x70\x4d\x28\x26\xcc\x2e\xfe\x0e\x58\x41" |
| "\x8b\xec\xaf\x7c\x4b\x54\xd0\xa0\x64\xf9\x32\xf4\x2e\x47\x65\x0a" |
| "\x67\x88\x39\x3a\xdb\xb2\xdb\x7b\xb5\xf6\x17\xa8\xd9\xc6\x5e\x28" |
| "\x13\x82\x8a\x99\xdb\x60\x08\xa5\x23\x37\xfa\x88\x90\x31\xc8\x9d" |
| "\x8f\xec\xfb\x85\x9f\xb1\xce\xa6\x24\x50\x46\x44\x47\xcb\x65\xd1" |
| "\xdf\xc0\xb1\x6c\x90\x1f\x99\x8e\x4d\xd5\x9e\x31\x07\x66\x87\xdf" |
| "\x01\xaa\x56\x3c\x71\xe0\x2b\x6f\x67\x3b\x23\xed\xc2\xbd\x03\x30" |
| "\x79\x76\x02\x10\x10\x98\x85\x8a\xff\xfd\x0b\xda\xa5\xd9\x32\x48" |
| "\x02\xa0\x0b\xb9\x2a\x8a\x18\xca\xc6\x8f\x3f\xbb\x16\xb2\xaa\x98" |
| "\x27\xe3\x60\x43\xed\x15\x70\xd4\x57\x15\xfe\x19\xd4\x9b\x13\x78" |
| "\x8a\xf7\x21\xf1\xa2\xa2\x2d\xb3\x09\xcf\x44\x91\x6e\x08\x3a\x30" |
| "\x81\x3e\x90\x93\x8a\x67\x33\x00\x59\x54\x9a\x25\xd3\x49\x8e\x9f" |
| "\xc1\x4b\xe5\x86\xf3\x50\x4c\xbc\xc5\xd3\xf5\x3a\x54\xe1\x36\x3f" |
| "\xe2\x5a\xb4\x37\xc0\xeb\x70\x35\xec\xf6\xb7\xe8\x44\x3b\x7b\xf3" |
| "\xf1\xf2\x1e\xdb\x60\x7d\xd5\xbe\xf0\x71\x34\x90\x4c\xcb\xd4\x35" |
| "\x51\xc7\xdd\xd8\xc9\x81\xf5\x5d\x57\x46\x2c\xb1\x7b\x9b\xaa\xcb" |
| "\xd1\x22\x25\x49\x44\xa3\xd4\x6b\x29\x7b\xd8\xb2\x07\x93\xbf\x3d" |
| "\x52\x49\x84\x79\xef\xb8\xe5\xc4\xad\xca\xa8\xc6\xf6\xa6\x76\x70" |
| "\x5b\x0b\xe5\x83\xc6\x0e\xef\x55\xf2\xe7\xff\x04\xea\xe6\x13\xbe" |
| "\x40\xe1\x40\x45\x48\x66\x75\x31\xae\x35\x64\x91\x11\x6f\xda\xee" |
| "\x26\x86\x45\x6f\x0b\xd5\x9f\x03\xb1\x65\x5b\xdb\xa4\xe4\xf9\x45", |
| .key_len = 2349, |
| .m_size = 8, |
| .c_size = 512, |
| #endif |
| } |
| }; |
| |
| /* |
| * EC-RDSA test vectors are generated by gost-engine. |
| */ |
| static const struct akcipher_testvec ecrdsa_tv_template[] = { |
| { |
| .key = |
| "\x04\x40\xd5\xa7\x77\xf9\x26\x2f\x8c\xbd\xcc\xe3\x1f\x01\x94\x05" |
| "\x3d\x2f\xec\xb5\x00\x34\xf5\x51\x6d\x3b\x90\x4b\x23\x28\x6f\x1d" |
| "\xc8\x36\x61\x60\x36\xec\xbb\xb4\x0b\x95\x4e\x54\x4f\x15\x21\x05" |
| "\xd8\x52\x66\x44\x31\x7e\x5d\xc5\xd1\x26\x00\x5f\x60\xd8\xf0\xc7" |
| "\x27\xfc", |
| .key_len = 66, |
| .params = /* OID_gostCPSignA */ |
| "\x30\x13\x06\x07\x2a\x85\x03\x02\x02\x23\x01\x06\x08\x2a\x85\x03" |
| "\x07\x01\x01\x02\x02", |
| .param_len = 21, |
| .c = |
| "\x41\x32\x09\x73\xa4\xc1\x38\xd6\x63\x7d\x8b\xf7\x50\x3f\xda\x9f" |
| "\x68\x48\xc1\x50\xe3\x42\x3a\x9b\x2b\x28\x12\x2a\xa7\xc2\x75\x31" |
| "\x65\x77\x8c\x3c\x9e\x0d\x56\xb2\xf9\xdc\x04\x33\x3e\xb0\x9e\xf9" |
| "\x74\x4e\x59\xb3\x83\xf2\x91\x27\xda\x5e\xc7\x33\xc0\xc1\x8f\x41", |
| .c_size = 64, |
| .algo = OID_gost2012PKey256, |
| .m = |
| "\x75\x1b\x9b\x40\x25\xb9\x96\xd2\x9b\x00\x41\xb3\x58\xbf\x23\x14" |
| "\x79\xd2\x76\x64\xa3\xbd\x66\x10\x79\x05\x5a\x06\x42\xec\xb9\xc9", |
| .m_size = 32, |
| .public_key_vec = true, |
| .siggen_sigver_test = true, |
| }, |
| { |
| .key = |
| "\x04\x40\x66\x6f\xd6\xb7\x06\xd0\xf5\xa5\x6f\x69\x5c\xa5\x13\x45" |
| "\x14\xdd\xcb\x12\x9c\x1b\xf5\x28\x64\x7a\x49\x48\x29\x14\x66\x42" |
| "\xb8\x1b\x5c\xf9\x56\x6d\x08\x3b\xce\xbb\x62\x2f\xc2\x3c\xc5\x49" |
| "\x93\x27\x70\x20\xcc\x79\xeb\xdc\x76\x8e\x48\x6e\x04\x96\xc3\x29" |
| "\xa0\x73", |
| .key_len = 66, |
| .params = /* OID_gostCPSignB */ |
| "\x30\x13\x06\x07\x2a\x85\x03\x02\x02\x23\x02\x06\x08\x2a\x85\x03" |
| "\x07\x01\x01\x02\x02", |
| .param_len = 21, |
| .c = |
| "\x45\x6d\x4a\x03\x1d\x5c\x0b\x17\x79\xe7\x19\xdb\xbf\x81\x9f\x82" |
| "\xae\x06\xda\xf5\x47\x00\x05\x80\xc3\x16\x06\x9a\x8e\x7c\xb2\x8e" |
| "\x7f\x74\xaa\xec\x6b\x7b\x7f\x8b\xc6\x0b\x10\x42\x4e\x91\x2c\xdf" |
| "\x7b\x8b\x15\xf4\x9e\x59\x0f\xc7\xa4\x68\x2e\xce\x89\xdf\x84\xe9", |
| .c_size = 64, |
| .algo = OID_gost2012PKey256, |
| .m = |
| "\xd0\x54\x00\x27\x6a\xeb\xce\x6c\xf5\xf6\xfb\x57\x18\x18\x21\x13" |
| "\x11\x23\x4a\x70\x43\x52\x7a\x68\x11\x65\x45\x37\xbb\x25\xb7\x40", |
| .m_size = 32, |
| .public_key_vec = true, |
| .siggen_sigver_test = true, |
| }, |
| { |
| .key = |
| "\x04\x40\x05\x91\xa9\x7d\xcb\x87\xdc\x98\xa1\xbf\xff\xdd\x20\x61" |
| "\xaa\x58\x3b\x2d\x8e\x9c\x41\x9d\x4f\xc6\x23\x17\xf9\xca\x60\x65" |
| "\xbc\x97\x97\xf6\x6b\x24\xe8\xac\xb1\xa7\x61\x29\x3c\x71\xdc\xad" |
| "\xcb\x20\xbe\x96\xe8\xf4\x44\x2e\x49\xd5\x2c\xb9\xc9\x3b\x9c\xaa" |
| "\xba\x15", |
| .key_len = 66, |
| .params = /* OID_gostCPSignC */ |
| "\x30\x13\x06\x07\x2a\x85\x03\x02\x02\x23\x03\x06\x08\x2a\x85\x03" |
| "\x07\x01\x01\x02\x02", |
| .param_len = 21, |
| .c = |
| "\x3b\x2e\x2e\x74\x74\x47\xda\xea\x93\x90\x6a\xe2\xf5\xf5\xe6\x46" |
| "\x11\xfc\xab\xdc\x52\xbc\x58\xdb\x45\x44\x12\x4a\xf7\xd0\xab\xc9" |
| "\x73\xba\x64\xab\x0d\xac\x4e\x72\x10\xa8\x04\xf6\x1e\xe0\x48\x6a" |
| "\xcd\xe8\xe3\x78\x73\x77\x82\x24\x8d\xf1\xd3\xeb\x4c\x25\x7e\xc0", |
| .c_size = 64, |
| .algo = OID_gost2012PKey256, |
| .m = |
| "\x52\x33\xf4\x3f\x7b\x5d\xcf\x20\xee\xe4\x5c\xab\x0b\x3f\x14\xd6" |
| "\x9f\x16\xc6\x1c\xb1\x3f\x84\x41\x69\xec\x34\xfd\xf1\xf9\xa3\x39", |
| .m_size = 32, |
| .public_key_vec = true, |
| .siggen_sigver_test = true, |
| }, |
| { |
| .key = |
| "\x04\x81\x80\x85\x46\x8f\x16\xf8\x7a\x7e\x4a\xc3\x81\x9e\xf1\x6e" |
| "\x94\x1e\x5d\x02\x87\xea\xfa\xa0\x0a\x17\x70\x49\x64\xad\x95\x68" |
| "\x60\x0a\xf0\x57\x29\x41\x79\x30\x3c\x61\x69\xf2\xa6\x94\x87\x17" |
| "\x54\xfa\x97\x2c\xe6\x1e\x0a\xbb\x55\x10\x57\xbe\xf7\xc1\x77\x2b" |
| "\x11\x74\x0a\x50\x37\x14\x10\x2a\x45\xfc\x7a\xae\x1c\x4c\xce\x08" |
| "\x05\xb7\xa4\x50\xc8\x3d\x39\x3d\xdc\x5c\x8f\x96\x6c\xe7\xfc\x21" |
| "\xc3\x2d\x1e\x9f\x11\xb3\xec\x22\x18\x8a\x8c\x08\x6b\x8b\xed\xf5" |
| "\xc5\x47\x3c\x7e\x73\x59\x44\x1e\x77\x83\x84\x52\x9e\x3b\x7d\xff" |
| "\x9d\x86\x1a", |
| .key_len = 131, |
| .params = /* OID_gostTC26Sign512A */ |
| "\x30\x0b\x06\x09\x2a\x85\x03\x07\x01\x02\x01\x02\x01", |
| .param_len = 13, |
| .c = |
| "\x92\x81\x74\x5f\x95\x48\x38\x87\xd9\x8f\x5e\xc8\x8a\xbb\x01\x4e" |
| "\xb0\x75\x3c\x2f\xc7\x5a\x08\x4c\x68\xab\x75\x01\x32\x75\x75\xb5" |
| "\x37\xe0\x74\x6d\x94\x84\x31\x2a\x6b\xf4\xf7\xb7\xa7\x39\x7b\x46" |
| "\x07\xf0\x98\xbd\x33\x18\xa1\x72\xb2\x6d\x54\xe3\xde\x91\xc2\x2e" |
| "\x4f\x6a\xf8\xb7\xec\xa8\x83\xc9\x8f\xd9\xce\x7c\x45\x06\x02\xf4" |
| "\x4f\x21\xb5\x24\x3d\xb4\xb5\xd8\x58\x42\xbe\x2d\x29\xae\x93\xc0" |
| "\x13\x41\x96\x35\x08\x69\xe8\x36\xc7\xd1\x83\x81\xd7\xca\xfb\xc0" |
| "\xd2\xb7\x78\x32\x3e\x30\x1a\x1e\xce\xdc\x34\x35\xc6\xad\x68\x24", |
| .c_size = 128, |
| .algo = OID_gost2012PKey512, |
| .m = |
| "\x1f\x70\xb5\xe9\x55\x12\xd6\x88\xcc\x55\xb9\x0c\x7f\xc4\x94\xf2" |
| "\x04\x77\x41\x12\x02\xd6\xf1\x1f\x83\x56\xe9\xd6\x5a\x6a\x72\xb9" |
| "\x6e\x8e\x24\x2a\x84\xf1\xba\x67\xe8\xbf\xff\xc1\xd3\xde\xfb\xc6" |
| "\xa8\xf6\x80\x01\xb9\x27\xac\xd8\x45\x96\x66\xa1\xee\x48\x08\x3f", |
| .m_size = 64, |
| .public_key_vec = true, |
| .siggen_sigver_test = true, |
| }, |
| { |
| .key = |
| "\x04\x81\x80\x28\xf3\x2b\x92\x04\x32\xea\x66\x20\xde\xa0\x2f\x74" |
| "\xbf\x2d\xf7\xb5\x30\x76\xb1\xc8\xee\x38\x9f\xea\xe5\xad\xc6\xa3" |
| "\x28\x1e\x51\x3d\x67\xa3\x41\xcc\x6b\x81\xe2\xe2\x9e\x82\xf3\x78" |
| "\x56\xd7\x2e\xb2\xb5\xbe\xb4\x50\x21\x05\xe5\x29\x82\xef\x15\x1b" |
| "\xc0\xd7\x30\xd6\x2f\x96\xe8\xff\x99\x4c\x25\xcf\x9a\xfc\x54\x30" |
| "\xce\xdf\x59\xe9\xc6\x45\xce\xe4\x22\xe8\x01\xd5\xcd\x2f\xaa\x78" |
| "\x99\xc6\x04\x1e\x6f\x4c\x25\x6a\x76\xad\xff\x48\xf3\xb3\xb4\xd6" |
| "\x14\x5c\x2c\x0e\xea\xa2\x4b\xb9\x7e\x89\x77\x02\x3a\x29\xc8\x16" |
| "\x8e\x78\x48", |
| .key_len = 131, |
| .params = /* OID_gostTC26Sign512B */ |
| "\x30\x0b\x06\x09\x2a\x85\x03\x07\x01\x02\x01\x02\x02", |
| .param_len = 13, |
| .c = |
| "\x0a\xed\xb6\x27\xea\xa7\xa6\x7e\x2f\xc1\x02\x21\x74\xce\x27\xd2" |
| "\xee\x8a\x92\x4d\xa9\x43\x2d\xa4\x5b\xdc\x23\x02\xfc\x3a\xf3\xb2" |
| "\x10\x93\x0b\x40\x1b\x75\x95\x3e\x39\x41\x37\xb9\xab\x51\x09\xeb" |
| "\xf1\xb9\x49\x58\xec\x58\xc7\xf9\x2e\xb9\xc9\x40\xf2\x00\x39\x7e" |
| "\x3f\xde\x72\xe3\x85\x67\x06\xbe\xd8\xb8\xc1\x81\x1e\xe3\x0a\xfe" |
| "\xce\xd3\x77\x92\x56\x8c\x58\xf9\x37\x60\x2d\xe6\x8b\x66\xa3\xdd" |
| "\xd2\xf0\xf8\xda\x1b\x20\xbc\x9c\xec\x29\x5d\xd1\x8f\xcc\x37\xd1" |
| "\x3b\x8d\xb7\xc1\xe0\xb8\x3b\xef\x14\x1b\x87\xbc\xc1\x03\x9a\x93", |
| .c_size = 128, |
| .algo = OID_gost2012PKey512, |
| .m = |
| "\x11\x24\x21\x27\xf2\x42\x9f\xce\x5a\xf9\x01\x70\xe0\x07\x2b\x57" |
| "\xfb\x7d\x77\x5e\x74\x66\xe6\xa5\x40\x4c\x1a\x85\x18\xff\xd0\x63" |
| "\xe0\x39\xd3\xd6\xe5\x17\xf8\xc3\x4b\xc6\x1c\x33\x1a\xca\xa6\x66" |
| "\x6d\xf4\xd2\x45\xc2\x83\xa0\x42\x95\x05\x9d\x89\x8e\x0a\xca\xcc", |
| .m_size = 64, |
| .public_key_vec = true, |
| .siggen_sigver_test = true, |
| }, |
| }; |
| |
| /* |
| * PKCS#1 RSA test vectors. Obtained from CAVS testing. |
| */ |
| static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = { |
| { |
| .key = |
| "\x30\x82\x03\x1f\x02\x01\x00\x02\x82\x01\x01\x00\xd7\x1e\x77\x82" |
| "\x8c\x92\x31\xe7\x69\x02\xa2\xd5\x5c\x78\xde\xa2\x0c\x8f\xfe\x28" |
| "\x59\x31\xdf\x40\x9c\x60\x61\x06\xb9\x2f\x62\x40\x80\x76\xcb\x67" |
| "\x4a\xb5\x59\x56\x69\x17\x07\xfa\xf9\x4c\xbd\x6c\x37\x7a\x46\x7d" |
| "\x70\xa7\x67\x22\xb3\x4d\x7a\x94\xc3\xba\x4b\x7c\x4b\xa9\x32\x7c" |
| "\xb7\x38\x95\x45\x64\xa4\x05\xa8\x9f\x12\x7c\x4e\xc6\xc8\x2d\x40" |
| "\x06\x30\xf4\x60\xa6\x91\xbb\x9b\xca\x04\x79\x11\x13\x75\xf0\xae" |
| "\xd3\x51\x89\xc5\x74\xb9\xaa\x3f\xb6\x83\xe4\x78\x6b\xcd\xf9\x5c" |
| "\x4c\x85\xea\x52\x3b\x51\x93\xfc\x14\x6b\x33\x5d\x30\x70\xfa\x50" |
| "\x1b\x1b\x38\x81\x13\x8d\xf7\xa5\x0c\xc0\x8e\xf9\x63\x52\x18\x4e" |
| "\xa9\xf9\xf8\x5c\x5d\xcd\x7a\x0d\xd4\x8e\x7b\xee\x91\x7b\xad\x7d" |
| "\xb4\x92\xd5\xab\x16\x3b\x0a\x8a\xce\x8e\xde\x47\x1a\x17\x01\x86" |
| "\x7b\xab\x99\xf1\x4b\x0c\x3a\x0d\x82\x47\xc1\x91\x8c\xbb\x2e\x22" |
| "\x9e\x49\x63\x6e\x02\xc1\xc9\x3a\x9b\xa5\x22\x1b\x07\x95\xd6\x10" |
| "\x02\x50\xfd\xfd\xd1\x9b\xbe\xab\xc2\xc0\x74\xd7\xec\x00\xfb\x11" |
| "\x71\xcb\x7a\xdc\x81\x79\x9f\x86\x68\x46\x63\x82\x4d\xb7\xf1\xe6" |
| "\x16\x6f\x42\x63\xf4\x94\xa0\xca\x33\xcc\x75\x13\x02\x82\x01\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01" |
| "\x02\x82\x01\x00\x62\xb5\x60\x31\x4f\x3f\x66\x16\xc1\x60\xac\x47" |
| "\x2a\xff\x6b\x69\x00\x4a\xb2\x5c\xe1\x50\xb9\x18\x74\xa8\xe4\xdc" |
| "\xa8\xec\xcd\x30\xbb\xc1\xc6\xe3\xc6\xac\x20\x2a\x3e\x5e\x8b\x12" |
| "\xe6\x82\x08\x09\x38\x0b\xab\x7c\xb3\xcc\x9c\xce\x97\x67\xdd\xef" |
| "\x95\x40\x4e\x92\xe2\x44\xe9\x1d\xc1\x14\xfd\xa9\xb1\xdc\x71\x9c" |
| "\x46\x21\xbd\x58\x88\x6e\x22\x15\x56\xc1\xef\xe0\xc9\x8d\xe5\x80" |
| "\x3e\xda\x7e\x93\x0f\x52\xf6\xf5\xc1\x91\x90\x9e\x42\x49\x4f\x8d" |
| "\x9c\xba\x38\x83\xe9\x33\xc2\x50\x4f\xec\xc2\xf0\xa8\xb7\x6e\x28" |
| "\x25\x56\x6b\x62\x67\xfe\x08\xf1\x56\xe5\x6f\x0e\x99\xf1\xe5\x95" |
| "\x7b\xef\xeb\x0a\x2c\x92\x97\x57\x23\x33\x36\x07\xdd\xfb\xae\xf1" |
| "\xb1\xd8\x33\xb7\x96\x71\x42\x36\xc5\xa4\xa9\x19\x4b\x1b\x52\x4c" |
| "\x50\x69\x91\xf0\x0e\xfa\x80\x37\x4b\xb5\xd0\x2f\xb7\x44\x0d\xd4" |
| "\xf8\x39\x8d\xab\x71\x67\x59\x05\x88\x3d\xeb\x48\x48\x33\x88\x4e" |
| "\xfe\xf8\x27\x1b\xd6\x55\x60\x5e\x48\xb7\x6d\x9a\xa8\x37\xf9\x7a" |
| "\xde\x1b\xcd\x5d\x1a\x30\xd4\xe9\x9e\x5b\x3c\x15\xf8\x9c\x1f\xda" |
| "\xd1\x86\x48\x55\xce\x83\xee\x8e\x51\xc7\xde\x32\x12\x47\x7d\x46" |
| "\xb8\x35\xdf\x41\x02\x01\x00\x02\x01\x00\x02\x01\x00\x02\x01\x00" |
| "\x02\x01\x00", |
| .key_len = 804, |
| /* |
| * m is SHA256 hash of following message: |
| * "\x49\x41\xbe\x0a\x0c\xc9\xf6\x35\x51\xe4\x27\x56\x13\x71\x4b\xd0" |
| * "\x36\x92\x84\x89\x1b\xf8\x56\x4a\x72\x61\x14\x69\x4f\x5e\x98\xa5" |
| * "\x80\x5a\x37\x51\x1f\xd8\xf5\xb5\x63\xfc\xf4\xb1\xbb\x4d\x33\xa3" |
| * "\x1e\xb9\x75\x8b\x9c\xda\x7e\x6d\x3a\x77\x85\xf7\xfc\x4e\xe7\x64" |
| * "\x43\x10\x19\xa0\x59\xae\xe0\xad\x4b\xd3\xc4\x45\xf7\xb1\xc2\xc1" |
| * "\x65\x01\x41\x39\x5b\x45\x47\xed\x2b\x51\xed\xe3\xd0\x09\x10\xd2" |
| * "\x39\x6c\x4a\x3f\xe5\xd2\x20\xe6\xb0\x71\x7d\x5b\xed\x26\x60\xf1" |
| * "\xb4\x73\xd1\xdb\x7d\xc4\x19\x91\xee\xf6\x32\x76\xf2\x19\x7d\xb7" |
| */ |
| .m = |
| "\x3e\xc8\xa1\x26\x20\x54\x44\x52\x48\x0d\xe5\x66\xf3\xb3\xf5\x04" |
| "\xbe\x10\xa8\x48\x94\x22\x2d\xdd\xba\x7a\xb4\x76\x8d\x79\x98\x89", |
| .m_size = 32, |
| .c = |
| "\xc7\xa3\x98\xeb\x43\xd1\x08\xc2\x3d\x78\x45\x04\x70\xc9\x01\xee" |
| "\xf8\x85\x37\x7c\x0b\xf9\x19\x70\x5c\x45\x7b\x2f\x3a\x0b\xb7\x8b" |
| "\xc4\x0d\x7b\x3a\x64\x0b\x0f\xdb\x78\xa9\x0b\xfd\x8d\x82\xa4\x86" |
| "\x39\xbf\x21\xb8\x84\xc4\xce\x9f\xc2\xe8\xb6\x61\x46\x17\xb9\x4e" |
| "\x0b\x57\x05\xb4\x4f\xf9\x9c\x93\x2d\x9b\xd5\x48\x1d\x80\x12\xef" |
| "\x3a\x77\x7f\xbc\xb5\x8e\x2b\x6b\x7c\xfc\x9f\x8c\x9d\xa2\xc4\x85" |
| "\xb0\x87\xe9\x17\x9b\xb6\x23\x62\xd2\xa9\x9f\x57\xe8\xf7\x04\x45" |
| "\x24\x3a\x45\xeb\xeb\x6a\x08\x8e\xaf\xc8\xa0\x84\xbc\x5d\x13\x38" |
| "\xf5\x17\x8c\xa3\x96\x9b\xa9\x38\x8d\xf0\x35\xad\x32\x8a\x72\x5b" |
| "\xdf\x21\xab\x4b\x0e\xa8\x29\xbb\x61\x54\xbf\x05\xdb\x84\x84\xde" |
| "\xdd\x16\x36\x31\xda\xf3\x42\x6d\x7a\x90\x22\x9b\x11\x29\xa6\xf8" |
| "\x30\x61\xda\xd3\x8b\x54\x1e\x42\xd1\x47\x1d\x6f\xd1\xcd\x42\x0b" |
| "\xd1\xe4\x15\x85\x7e\x08\xd6\x59\x64\x4c\x01\x34\x91\x92\x26\xe8" |
| "\xb0\x25\x8c\xf8\xf4\xfa\x8b\xc9\x31\x33\x76\x72\xfb\x64\x92\x9f" |
| "\xda\x62\x8d\xe1\x2a\x71\x91\x43\x40\x61\x3c\x5a\xbe\x86\xfc\x5b" |
| "\xe6\xf9\xa9\x16\x31\x1f\xaf\x25\x6d\xc2\x4a\x23\x6e\x63\x02\xa2", |
| .c_size = 256, |
| .siggen_sigver_test = true, |
| } |
| }; |
| |
| static const struct kpp_testvec dh_tv_template[] = { |
| { |
| .secret = |
| #ifdef __LITTLE_ENDIAN |
| "\x01\x00" /* type */ |
| "\x15\x02" /* len */ |
| "\x00\x01\x00\x00" /* key_size */ |
| "\x00\x01\x00\x00" /* p_size */ |
| "\x00\x00\x00\x00" /* q_size */ |
| "\x01\x00\x00\x00" /* g_size */ |
| #else |
| "\x00\x01" /* type */ |
| "\x02\x15" /* len */ |
| "\x00\x00\x01\x00" /* key_size */ |
| "\x00\x00\x01\x00" /* p_size */ |
| "\x00\x00\x00\x00" /* q_size */ |
| "\x00\x00\x00\x01" /* g_size */ |
| #endif |
| /* xa */ |
| "\x44\xc1\x48\x36\xa7\x2b\x6f\x4e\x43\x03\x68\xad\x31\x00\xda\xf3" |
| "\x2a\x01\xa8\x32\x63\x5f\x89\x32\x1f\xdf\x4c\xa1\x6a\xbc\x10\x15" |
| "\x90\x35\xc9\x26\x41\xdf\x7b\xaa\x56\x56\x3d\x85\x44\xb5\xc0\x8e" |
| "\x37\x83\x06\x50\xb3\x5f\x0e\x28\x2c\xd5\x46\x15\xe3\xda\x7d\x74" |
| "\x87\x13\x91\x4f\xd4\x2d\xf6\xc7\x5e\x14\x2c\x11\xc2\x26\xb4\x3a" |
| "\xe3\xb2\x36\x20\x11\x3b\x22\xf2\x06\x65\x66\xe2\x57\x58\xf8\x22" |
| "\x1a\x94\xbd\x2b\x0e\x8c\x55\xad\x61\x23\x45\x2b\x19\x1e\x63\x3a" |
| "\x13\x61\xe3\xa0\x79\x70\x3e\x6d\x98\x32\xbc\x7f\x82\xc3\x11\xd8" |
| "\xeb\x53\xb5\xfc\xb5\xd5\x3c\x4a\xea\x92\x3e\x01\xce\x15\x65\xd4" |
| "\xaa\x85\xc1\x11\x90\x83\x31\x6e\xfe\xe7\x7f\x7d\xed\xab\xf9\x29" |
| "\xf8\xc7\xf1\x68\xc6\xb7\xe4\x1f\x2f\x28\xa0\xc9\x1a\x50\x64\x29" |
| "\x4b\x01\x6d\x1a\xda\x46\x63\x21\x07\x40\x8c\x8e\x4c\x6f\xb5\xe5" |
| "\x12\xf3\xc2\x1b\x48\x27\x5e\x27\x01\xb1\xaa\xed\x68\x9b\x83\x18" |
| "\x8f\xb1\xeb\x1f\x04\xd1\x3c\x79\xed\x4b\xf7\x0a\x33\xdc\xe0\xc6" |
| "\xd8\x02\x51\x59\x00\x74\x30\x07\x4c\x2d\xac\xe4\x13\xf1\x80\xf0" |
| "\xce\xfa\xff\xa9\xce\x29\x46\xdd\x9d\xad\xd1\xc3\xc6\x58\x1a\x63" |
| /* p */ |
| "\xb9\x36\x3a\xf1\x82\x1f\x60\xd3\x22\x47\xb8\xbc\x2d\x22\x6b\x81" |
| "\x7f\xe8\x20\x06\x09\x23\x73\x49\x9a\x59\x8b\x35\x25\xf8\x31\xbc" |
| "\x7d\xa8\x1c\x9d\x56\x0d\x1a\xf7\x4b\x4f\x96\xa4\x35\x77\x6a\x89" |
| "\xab\x42\x00\x49\x21\x71\xed\x28\x16\x1d\x87\x5a\x10\xa7\x9c\x64" |
| "\x94\xd4\x87\x3d\x28\xef\x44\xfe\x4b\xe2\xb4\x15\x8c\x82\xa6\xf3" |
| "\x50\x5f\xa8\xe8\xa2\x60\xe7\x00\x86\x78\x05\xd4\x78\x19\xa1\x98" |
| "\x62\x4e\x4a\x00\x78\x56\x96\xe6\xcf\xd7\x10\x1b\x74\x5d\xd0\x26" |
| "\x61\xdb\x6b\x32\x09\x51\xd8\xa5\xfd\x54\x16\x71\x01\xb3\x39\xe6" |
| "\x4e\x69\xb1\xd7\x06\x8f\xd6\x1e\xdc\x72\x25\x26\x74\xc8\x41\x06" |
| "\x5c\xd1\x26\x5c\xb0\x2f\xf9\x59\x13\xc1\x2a\x0f\x78\xea\x7b\xf7" |
| "\xbd\x59\xa0\x90\x1d\xfc\x33\x5b\x4c\xbf\x05\x9c\x3a\x3f\x69\xa2" |
| "\x45\x61\x4e\x10\x6a\xb3\x17\xc5\x68\x30\xfb\x07\x5f\x34\xc6\xfb" |
| "\x73\x07\x3c\x70\xf6\xae\xe7\x72\x84\xc3\x18\x81\x8f\xe8\x11\x1f" |
| "\x3d\x83\x83\x01\x2a\x14\x73\xbf\x32\x32\x2e\xc9\x4d\xdb\x2a\xca" |
| "\xee\x71\xf9\xda\xad\xe8\x82\x0b\x4d\x0c\x1f\xb6\x1d\xef\x00\x67" |
| "\x74\x3d\x95\xe0\xb7\xc4\x30\x8a\x24\x87\x12\x47\x27\x70\x0d\x73" |
| /* g */ |
| "\x02", |
| .b_public = |
| "\x2a\x67\x5c\xfd\x63\x5d\xc0\x97\x0a\x8b\xa2\x1f\xf8\x8a\xcb\x54" |
| "\xca\x2f\xd3\x49\x3f\x01\x8e\x87\xfe\xcc\x94\xa0\x3e\xd4\x26\x79" |
| "\x9a\x94\x3c\x11\x81\x58\x5c\x60\x3d\xf5\x98\x90\x89\x64\x62\x1f" |
| "\xbd\x05\x6d\x2b\xcd\x84\x40\x9b\x4a\x1f\xe0\x19\xf1\xca\x20\xb3" |
| "\x4e\xa0\x4f\x15\xcc\xa5\xfe\xa5\xb4\xf5\x0b\x18\x7a\x5a\x37\xaa" |
| "\x58\x00\x19\x7f\xe2\xa3\xd9\x1c\x44\x57\xcc\xde\x2e\xc1\x38\xea" |
| "\xeb\xe3\x90\x40\xc4\x6c\xf7\xcd\xe9\x22\x50\x71\xf5\x7c\xdb\x37" |
| "\x0e\x80\xc3\xed\x7e\xb1\x2b\x2f\xbe\x71\xa6\x11\xa5\x9d\xf5\x39" |
| "\xf1\xa2\xe5\x85\xbc\x25\x91\x4e\x84\x8d\x26\x9f\x4f\xe6\x0f\xa6" |
| "\x2b\x6b\xf9\x0d\xaf\x6f\xbb\xfa\x2d\x79\x15\x31\x57\xae\x19\x60" |
| "\x22\x0a\xf5\xfd\x98\x0e\xbf\x5d\x49\x75\x58\x37\xbc\x7f\xf5\x21" |
| "\x56\x1e\xd5\xb3\x50\x0b\xca\x96\xf3\xd1\x3f\xb3\x70\xa8\x6d\x63" |
| "\x48\xfb\x3d\xd7\x29\x91\x45\xb5\x48\xcd\xb6\x78\x30\xf2\x3f\x1e" |
| "\xd6\x22\xd6\x35\x9b\xf9\x1f\x85\xae\xab\x4b\xd7\xe0\xc7\x86\x67" |
| "\x3f\x05\x7f\xa6\x0d\x2f\x0d\xbf\x53\x5f\x4d\x2c\x6d\x5e\x57\x40" |
| "\x30\x3a\x23\x98\xf9\xb4\x32\xf5\x32\x83\xdd\x0b\xae\x33\x97\x2f", |
| .expected_a_public = |
| "\x5c\x24\xdf\xeb\x5b\x4b\xf8\xc5\xef\x39\x48\x82\xe0\x1e\x62\xee" |
| "\x8a\xae\xdf\x93\x6c\x2b\x16\x95\x92\x16\x3f\x16\x7b\x75\x03\x85" |
| "\xd9\xf1\x69\xc2\x14\x87\x45\xfc\xa4\x19\xf6\xf0\xa4\xf3\xec\xd4" |
| "\x6c\x5c\x03\x3b\x94\xc2\x2f\x92\xe4\xce\xb3\xe4\x72\xe8\x17\xe6" |
| "\x23\x7e\x00\x01\x09\x59\x13\xbf\xc1\x2f\x99\xa9\x07\xaa\x02\x23" |
| "\x4a\xca\x39\x4f\xbc\xec\x0f\x27\x4f\x19\x93\x6c\xb9\x30\x52\xfd" |
| "\x2b\x9d\x86\xf1\x06\x1e\xb6\x56\x27\x4a\xc9\x8a\xa7\x8a\x48\x5e" |
| "\xb5\x60\xcb\xdf\xff\x03\x26\x10\xbf\x90\x8f\x46\x60\xeb\x9b\x9a" |
| "\xd6\x6f\x44\x91\x03\x92\x18\x2c\x96\x5e\x40\x19\xfb\xf4\x4f\x3a" |
| "\x02\x7b\xaf\xcc\x22\x20\x79\xb9\xf8\x9f\x8f\x85\x6b\xec\x44\xbb" |
| "\xe6\xa8\x8e\xb1\xe8\x2c\xee\x64\xee\xf8\xbd\x00\xf3\xe2\x2b\x93" |
| "\xcd\xe7\xc4\xdf\xc9\x19\x46\xfe\xb6\x07\x73\xc1\x8a\x64\x79\x26" |
| "\xe7\x30\xad\x2a\xdf\xe6\x8f\x59\xf5\x81\xbf\x4a\x29\x91\xe7\xb7" |
| "\xcf\x48\x13\x27\x75\x79\x40\xd9\xd6\x32\x52\x4e\x6a\x86\xae\x6f" |
| "\xc2\xbf\xec\x1f\xc2\x69\xb2\xb6\x59\xe5\xa5\x17\xa4\x77\xb7\x62" |
| "\x46\xde\xe8\xd2\x89\x78\x9a\xef\xa3\xb5\x8f\x26\xec\x80\xda\x39", |
| .expected_ss = |
| "\x8f\xf3\xac\xa2\xea\x22\x11\x5c\x45\x65\x1a\x77\x75\x2e\xcf\x46" |
| "\x23\x14\x1e\x67\x53\x4d\x35\xb0\x38\x1d\x4e\xb9\x41\x9a\x21\x24" |
| "\x6e\x9f\x40\xfe\x90\x51\xb1\x06\xa4\x7b\x87\x17\x2f\xe7\x5e\x22" |
| "\xf0\x7b\x54\x84\x0a\xac\x0a\x90\xd2\xd7\xe8\x7f\xe7\xe3\x30\x75" |
| "\x01\x1f\x24\x75\x56\xbe\xcc\x8d\x1e\x68\x0c\x41\x72\xd3\xfa\xbb" |
| "\xe5\x9c\x60\xc7\x28\x77\x0c\xbe\x89\xab\x08\xd6\x21\xe7\x2e\x1a" |
| "\x58\x7a\xca\x4f\x22\xf3\x2b\x30\xfd\xf4\x98\xc1\xa3\xf8\xf6\xcc" |
| "\xa9\xe4\xdb\x5b\xee\xd5\x5c\x6f\x62\x4c\xd1\x1a\x02\x2a\x23\xe4" |
| "\xb5\x57\xf3\xf9\xec\x04\x83\x54\xfe\x08\x5e\x35\xac\xfb\xa8\x09" |
| "\x82\x32\x60\x11\xb2\x16\x62\x6b\xdf\xda\xde\x9c\xcb\x63\x44\x6c" |
| "\x59\x26\x6a\x8f\xb0\x24\xcb\xa6\x72\x48\x1e\xeb\xe0\xe1\x09\x44" |
| "\xdd\xee\x66\x6d\x84\xcf\xa5\xc1\xb8\x36\x74\xd3\x15\x96\xc3\xe4" |
| "\xc6\x5a\x4d\x23\x97\x0c\x5c\xcb\xa9\xf5\x29\xc2\x0e\xff\x93\x82" |
| "\xd3\x34\x49\xad\x64\xa6\xb1\xc0\x59\x28\x75\x60\xa7\x8a\xb0\x11" |
| "\x56\x89\x42\x74\x11\xf5\xf6\x5e\x6f\x16\x54\x6a\xb1\x76\x4d\x50" |
| "\x8a\x68\xc1\x5b\x82\xb9\x0d\x00\x32\x50\xed\x88\x87\x48\x92\x17", |
| .secret_size = 533, |
| .b_public_size = 256, |
| .expected_a_public_size = 256, |
| .expected_ss_size = 256, |
| }, |
| { |
| .secret = |
| #ifdef __LITTLE_ENDIAN |
| "\x01\x00" /* type */ |
| "\x15\x02" /* len */ |
| "\x00\x01\x00\x00" /* key_size */ |
| "\x00\x01\x00\x00" /* p_size */ |
| "\x00\x00\x00\x00" /* q_size */ |
| "\x01\x00\x00\x00" /* g_size */ |
| #else |
| "\x00\x01" /* type */ |
| "\x02\x15" /* len */ |
| "\x00\x00\x01\x00" /* key_size */ |
| "\x00\x00\x01\x00" /* p_size */ |
| "\x00\x00\x00\x00" /* q_size */ |
| "\x00\x00\x00\x01" /* g_size */ |
| #endif |
| /* xa */ |
| "\x4d\x75\xa8\x6e\xba\x23\x3a\x0c\x63\x56\xc8\xc9\x5a\xa7\xd6\x0e" |
| "\xed\xae\x40\x78\x87\x47\x5f\xe0\xa7\x7b\xba\x84\x88\x67\x4e\xe5" |
| "\x3c\xcc\x5c\x6a\xe7\x4a\x20\xec\xbe\xcb\xf5\x52\x62\x9f\x37\x80" |
| "\x0c\x72\x7b\x83\x66\xa4\xf6\x7f\x95\x97\x1c\x6a\x5c\x7e\xf1\x67" |
| "\x37\xb3\x93\x39\x3d\x0b\x55\x35\xd9\xe5\x22\x04\x9f\xf8\xc1\x04" |
| "\xce\x13\xa5\xac\xe1\x75\x05\xd1\x2b\x53\xa2\x84\xef\xb1\x18\xf4" |
| "\x66\xdd\xea\xe6\x24\x69\x5a\x49\xe0\x7a\xd8\xdf\x1b\xb7\xf1\x6d" |
| "\x9b\x50\x2c\xc8\x1c\x1c\xa3\xb4\x37\xfb\x66\x3f\x67\x71\x73\xa9" |
| "\xff\x5f\xd9\xa2\x25\x6e\x25\x1b\x26\x54\xbf\x0c\xc6\xdb\xea\x0a" |
| "\x52\x6c\x16\x7c\x27\x68\x15\x71\x58\x73\x9d\xe6\xc2\x80\xaa\x97" |
| "\x31\x66\xfb\xa6\xfb\xfd\xd0\x9c\x1d\xbe\x81\x48\xf5\x9a\x32\xf1" |
| "\x69\x62\x18\x78\xae\x72\x36\xe6\x94\x27\xd1\xff\x18\x4f\x28\x6a" |
| "\x16\xbd\x6a\x60\xee\xe5\xf9\x6d\x16\xe4\xb8\xa6\x41\x9b\x23\x7e" |
| "\xf7\x9d\xd1\x1d\x03\x15\x66\x3a\xcf\xb6\x2c\x13\x96\x2c\x52\x21" |
| "\xe4\x2d\x48\x7a\x8a\x5d\xb2\x88\xed\x98\x61\x79\x8b\x6a\x1e\x5f" |
| "\xd0\x8a\x2d\x99\x5a\x2b\x0f\xbc\xef\x53\x8f\x32\xc1\xa2\x99\x26" |
| /* p */ |
| "\xb9\x36\x3a\xf1\x82\x1f\x60\xd3\x22\x47\xb8\xbc\x2d\x22\x6b\x81" |
| "\x7f\xe8\x20\x06\x09\x23\x73\x49\x9a\x59\x8b\x35\x25\xf8\x31\xbc" |
| "\x7d\xa8\x1c\x9d\x56\x0d\x1a\xf7\x4b\x4f\x96\xa4\x35\x77\x6a\x89" |
| "\xab\x42\x00\x49\x21\x71\xed\x28\x16\x1d\x87\x5a\x10\xa7\x9c\x64" |
| "\x94\xd4\x87\x3d\x28\xef\x44\xfe\x4b\xe2\xb4\x15\x8c\x82\xa6\xf3" |
| "\x50\x5f\xa8\xe8\xa2\x60\xe7\x00\x86\x78\x05\xd4\x78\x19\xa1\x98" |
| "\x62\x4e\x4a\x00\x78\x56\x96\xe6\xcf\xd7\x10\x1b\x74\x5d\xd0\x26" |
| "\x61\xdb\x6b\x32\x09\x51\xd8\xa5\xfd\x54\x16\x71\x01\xb3\x39\xe6" |
| "\x4e\x69\xb1\xd7\x06\x8f\xd6\x1e\xdc\x72\x25\x26\x74\xc8\x41\x06" |
| "\x5c\xd1\x26\x5c\xb0\x2f\xf9\x59\x13\xc1\x2a\x0f\x78\xea\x7b\xf7" |
| "\xbd\x59\xa0\x90\x1d\xfc\x33\x5b\x4c\xbf\x05\x9c\x3a\x3f\x69\xa2" |
| "\x45\x61\x4e\x10\x6a\xb3\x17\xc5\x68\x30\xfb\x07\x5f\x34\xc6\xfb" |
| "\x73\x07\x3c\x70\xf6\xae\xe7\x72\x84\xc3\x18\x81\x8f\xe8\x11\x1f" |
| "\x3d\x83\x83\x01\x2a\x14\x73\xbf\x32\x32\x2e\xc9\x4d\xdb\x2a\xca" |
| "\xee\x71\xf9\xda\xad\xe8\x82\x0b\x4d\x0c\x1f\xb6\x1d\xef\x00\x67" |
| "\x74\x3d\x95\xe0\xb7\xc4\x30\x8a\x24\x87\x12\x47\x27\x70\x0d\x73" |
| /* g */ |
| "\x02", |
| .b_public = |
| "\x99\x4d\xd9\x01\x84\x8e\x4a\x5b\xb8\xa5\x64\x8c\x6c\x00\x5c\x0e" |
| "\x1e\x1b\xee\x5d\x9f\x53\xe3\x16\x70\x01\xed\xbf\x4f\x14\x36\x6e" |
| "\xe4\x43\x45\x43\x49\xcc\xb1\xb0\x2a\xc0\x6f\x22\x55\x42\x17\x94" |
| "\x18\x83\xd7\x2a\x5c\x51\x54\xf8\x4e\x7c\x10\xda\x76\x68\x57\x77" |
| "\x1e\x62\x03\x30\x04\x7b\x4c\x39\x9c\x54\x01\x54\xec\xef\xb3\x55" |
| "\xa4\xc0\x24\x6d\x3d\xbd\xcc\x46\x5b\x00\x96\xc7\xea\x93\xd1\x3f" |
| "\xf2\x6a\x72\xe3\xf2\xc1\x92\x24\x5b\xda\x48\x70\x2c\xa9\x59\x97" |
| "\x19\xb1\xd6\x54\xb3\x9c\x2e\xb0\x63\x07\x9b\x5e\xac\xb5\xf2\xb1" |
| "\x5b\xf8\xf3\xd7\x2d\x37\x9b\x68\x6c\xf8\x90\x07\xbc\x37\x9a\xa5" |
| "\xe2\x91\x12\x25\x47\x77\xe3\x3d\xb2\x95\x69\x44\x0b\x91\x1e\xaf" |
| "\x7c\x8c\x7c\x34\x41\x6a\xab\x60\x6e\xc6\x52\xec\x7e\x94\x0a\x37" |
| "\xec\x98\x90\xdf\x3f\x02\xbd\x23\x52\xdd\xd9\xe5\x31\x80\x74\x25" |
| "\xb6\xd2\xd3\xcc\xd5\xcc\x6d\xf9\x7e\x4d\x78\xab\x77\x51\xfa\x77" |
| "\x19\x94\x49\x8c\x05\xd4\x75\xed\xd2\xb3\x64\x57\xe0\x52\x99\xc0" |
| "\x83\xe3\xbb\x5e\x2b\xf1\xd2\xc0\xb1\x37\x36\x0b\x7c\xb5\x63\x96" |
| "\x8e\xde\x04\x23\x11\x95\x62\x11\x9a\xce\x6f\x63\xc8\xd5\xd1\x8f", |
| .expected_a_public = |
| "\x90\x89\xe4\x82\xd6\x0a\xcf\x1a\xae\xce\x1b\x66\xa7\x19\x71\x18" |
| "\x8f\x95\x4b\x5b\x80\x45\x4a\x5a\x43\x99\x4d\x37\xcf\xa3\xa7\x28" |
| "\x9c\xc7\x73\xf1\xb2\x17\xf6\x99\xe3\x6b\x56\xcb\x3e\x35\x60\x7d" |
| "\x65\xc7\x84\x6b\x3e\x60\xee\xcd\xd2\x70\xe7\xc9\x32\x1c\xf0\xb4" |
| "\xf9\x52\xd9\x88\x75\xfd\x40\x2c\xa7\xbe\x19\x1c\x0a\xae\x93\xe1" |
| "\x71\xc7\xcd\x4f\x33\x5c\x10\x7d\x39\x56\xfc\x73\x84\xb2\x67\xc3" |
| "\x77\x26\x20\x97\x2b\xf8\x13\x43\x93\x9c\x9a\xa4\x08\xc7\x34\x83" |
| "\xe6\x98\x61\xe7\x16\x30\x2c\xb1\xdb\x2a\xb2\xcc\xc3\x02\xa5\x3c" |
| "\x71\x50\x14\x83\xc7\xbb\xa4\xbe\x98\x1b\xfe\xcb\x43\xe9\x97\x62" |
| "\xd6\xf0\x8c\xcb\x1c\xba\x1e\xa8\xa6\xa6\x50\xfc\x85\x7d\x47\xbf" |
| "\xf4\x3e\x23\xd3\x5f\xb2\x71\x3e\x40\x94\xaa\x87\x83\x2c\x6c\x8e" |
| "\x60\xfd\xdd\xf7\xf4\x76\x03\xd3\x1d\xec\x18\x51\xa3\xf2\x44\x1a" |
| "\x3f\xb4\x7c\x18\x0d\x68\x65\x92\x54\x0d\x2d\x81\x16\xf1\x84\x66" |
| "\x89\x92\xd0\x1a\x5e\x1f\x42\x46\x5b\xe5\x83\x86\x80\xd9\xcd\x3a" |
| "\x5a\x2f\xb9\x59\x9b\xe4\x43\x84\x64\xf3\x09\x1a\x0a\xa2\x64\x0f" |
| "\x77\x4e\x8d\x8b\xe6\x88\xd1\xfc\xaf\x8f\xdf\x1d\xbc\x31\xb3\xbd", |
| .expected_ss = |
| "\x34\xc3\x35\x14\x88\x46\x26\x23\x97\xbb\xdd\x28\x5c\x94\xf6\x47" |
| "\xca\xb3\x19\xaf\xca\x44\x9b\xc2\x7d\x89\xfd\x96\x14\xfd\x6d\x58" |
| "\xd8\xc4\x6b\x61\x2a\x0d\xf2\x36\x45\xc8\xe4\xa4\xed\x81\x53\x81" |
| "\x66\x1e\xe0\x5a\xb1\x78\x2d\x0b\x5c\xb4\xd1\xfc\x90\xc6\x9c\xdb" |
| "\x5a\x30\x0b\x14\x7d\xbe\xb3\x7d\xb1\xb2\x76\x3c\x6c\xef\x74\x6b" |
| "\xe7\x1f\x64\x0c\xab\x65\xe1\x76\x5c\x3d\x83\xb5\x8a\xfb\xaf\x0f" |
| "\xf2\x06\x14\x8f\xa0\xf6\xc1\x89\x78\xf2\xba\x72\x73\x3c\xf7\x76" |
| "\x21\x67\xbc\x24\x31\xb8\x09\x65\x0f\x0c\x02\x32\x4a\x98\x14\xfc" |
| "\x72\x2c\x25\x60\x68\x5f\x2f\x30\x1e\x5b\xf0\x3b\xd1\xa2\x87\xa0" |
| "\x54\xdf\xdb\xc0\xee\x0a\x0f\x47\xc9\x90\x20\x2c\xf9\xe3\x52\xad" |
| "\x27\x65\x8d\x54\x8d\xa8\xa1\xf3\xed\x15\xd4\x94\x28\x90\x31\x93" |
| "\x1b\xc0\x51\xbb\x43\x5d\x76\x3b\x1d\x2a\x71\x50\xea\x5d\x48\x94" |
| "\x7f\x6f\xf1\x48\xdb\x30\xe5\xae\x64\x79\xd9\x7a\xdb\xc6\xff\xd8" |
| "\x5e\x5a\x64\xbd\xf6\x85\x04\xe8\x28\x6a\xac\xef\xce\x19\x8e\x9a" |
| "\xfe\x75\xc0\x27\x69\xe3\xb3\x7b\x21\xa7\xb1\x16\xa4\x85\x23\xee" |
| "\xb0\x1b\x04\x6e\xbd\xab\x16\xde\xfd\x86\x6b\xa9\x95\xd7\x0b\xfd", |
| .secret_size = 533, |
| .b_public_size = 256, |
| .expected_a_public_size = 256, |
| .expected_ss_size = 256, |
| } |
| }; |
| |
| static const struct kpp_testvec ecdh_tv_template[] = { |
| { |
| #ifndef CONFIG_CRYPTO_FIPS |
| .secret = |
| #ifdef __LITTLE_ENDIAN |
| "\x02\x00" /* type */ |
| "\x20\x00" /* len */ |
| "\x01\x00" /* curve_id */ |
| "\x18\x00" /* key_size */ |
| #else |
| "\x00\x02" /* type */ |
| "\x00\x20" /* len */ |
| "\x00\x01" /* curve_id */ |
| "\x00\x18" /* key_size */ |
| #endif |
| "\xb5\x05\xb1\x71\x1e\xbf\x8c\xda" |
| "\x4e\x19\x1e\x62\x1f\x23\x23\x31" |
| "\x36\x1e\xd3\x84\x2f\xcc\x21\x72", |
| .b_public = |
| "\xc3\xba\x67\x4b\x71\xec\xd0\x76" |
| "\x7a\x99\x75\x64\x36\x13\x9a\x94" |
| "\x5d\x8b\xdc\x60\x90\x91\xfd\x3f" |
| "\xb0\x1f\x8a\x0a\x68\xc6\x88\x6e" |
| "\x83\x87\xdd\x67\x09\xf8\x8d\x96" |
| "\x07\xd6\xbd\x1c\xe6\x8d\x9d\x67", |
| .expected_a_public = |
| "\x1a\x04\xdb\xa5\xe1\xdd\x4e\x79" |
| "\xa3\xe6\xef\x0e\x5c\x80\x49\x85" |
| "\xfa\x78\xb4\xef\x49\xbd\x4c\x7c" |
| "\x22\x90\x21\x02\xf9\x1b\x81\x5d" |
| "\x0c\x8a\xa8\x98\xd6\x27\x69\x88" |
| "\x5e\xbc\x94\xd8\x15\x9e\x21\xce", |
| .expected_ss = |
| "\xf4\x57\xcc\x4f\x1f\x4e\x31\xcc" |
| "\xe3\x40\x60\xc8\x06\x93\xc6\x2e" |
| "\x99\x80\x81\x28\xaf\xc5\x51\x74", |
| .secret_size = 32, |
| .b_public_size = 48, |
| .expected_a_public_size = 48, |
| .expected_ss_size = 24 |
| }, { |
| #endif |
| .secret = |
| #ifdef __LITTLE_ENDIAN |
| "\x02\x00" /* type */ |
| "\x28\x00" /* len */ |
| "\x02\x00" /* curve_id */ |
| "\x20\x00" /* key_size */ |
| #else |
| "\x00\x02" /* type */ |
| "\x00\x28" /* len */ |
| "\x00\x02" /* curve_id */ |
| "\x00\x20" /* key_size */ |
| #endif |
| "\x24\xd1\x21\xeb\xe5\xcf\x2d\x83" |
| "\xf6\x62\x1b\x6e\x43\x84\x3a\xa3" |
| "\x8b\xe0\x86\xc3\x20\x19\xda\x92" |
| "\x50\x53\x03\xe1\xc0\xea\xb8\x82", |
| .expected_a_public = |
| "\x1a\x7f\xeb\x52\x00\xbd\x3c\x31" |
| "\x7d\xb6\x70\xc1\x86\xa6\xc7\xc4" |
| "\x3b\xc5\x5f\x6c\x6f\x58\x3c\xf5" |
| "\xb6\x63\x82\x77\x33\x24\xa1\x5f" |
| "\x6a\xca\x43\x6f\xf7\x7e\xff\x02" |
| "\x37\x08\xcc\x40\x5e\x7a\xfd\x6a" |
| "\x6a\x02\x6e\x41\x87\x68\x38\x77" |
| "\xfa\xa9\x44\x43\x2d\xef\x09\xdf", |
| .expected_ss = |
| "\xea\x17\x6f\x7e\x6e\x57\x26\x38" |
| "\x8b\xfb\x41\xeb\xba\xc8\x6d\xa5" |
| "\xa8\x72\xd1\xff\xc9\x47\x3d\xaa" |
| "\x58\x43\x9f\x34\x0f\x8c\xf3\xc9", |
| .b_public = |
| "\xcc\xb4\xda\x74\xb1\x47\x3f\xea" |
| "\x6c\x70\x9e\x38\x2d\xc7\xaa\xb7" |
| "\x29\xb2\x47\x03\x19\xab\xdd\x34" |
| "\xbd\xa8\x2c\x93\xe1\xa4\x74\xd9" |
| "\x64\x63\xf7\x70\x20\x2f\xa4\xe6" |
| "\x9f\x4a\x38\xcc\xc0\x2c\x49\x2f" |
| "\xb1\x32\xbb\xaf\x22\x61\xda\xcb" |
| "\x6f\xdb\xa9\xaa\xfc\x77\x81\xf3", |
| .secret_size = 40, |
| .b_public_size = 64, |
| .expected_a_public_size = 64, |
| .expected_ss_size = 32 |
| }, { |
| .secret = |
| #ifdef __LITTLE_ENDIAN |
| "\x02\x00" /* type */ |
| "\x08\x00" /* len */ |
| "\x02\x00" /* curve_id */ |
| "\x00\x00", /* key_size */ |
| #else |
| "\x00\x02" /* type */ |
| "\x00\x08" /* len */ |
| "\x00\x02" /* curve_id */ |
| "\x00\x00", /* key_size */ |
| #endif |
| .b_secret = |
| #ifdef __LITTLE_ENDIAN |
| "\x02\x00" /* type */ |
| "\x28\x00" /* len */ |
| "\x02\x00" /* curve_id */ |
| "\x20\x00" /* key_size */ |
| #else |
| "\x00\x02" /* type */ |
| "\x00\x28" /* len */ |
| "\x00\x02" /* curve_id */ |
| "\x00\x20" /* key_size */ |
| #endif |
| "\x24\xd1\x21\xeb\xe5\xcf\x2d\x83" |
| "\xf6\x62\x1b\x6e\x43\x84\x3a\xa3" |
| "\x8b\xe0\x86\xc3\x20\x19\xda\x92" |
| "\x50\x53\x03\xe1\xc0\xea\xb8\x82", |
| .b_public = |
| "\x1a\x7f\xeb\x52\x00\xbd\x3c\x31" |
| "\x7d\xb6\x70\xc1\x86\xa6\xc7\xc4" |
| "\x3b\xc5\x5f\x6c\x6f\x58\x3c\xf5" |
| "\xb6\x63\x82\x77\x33\x24\xa1\x5f" |
| "\x6a\xca\x43\x6f\xf7\x7e\xff\x02" |
| "\x37\x08\xcc\x40\x5e\x7a\xfd\x6a" |
| "\x6a\x02\x6e\x41\x87\x68\x38\x77" |
| "\xfa\xa9\x44\x43\x2d\xef\x09\xdf", |
| .secret_size = 8, |
| .b_secret_size = 40, |
| .b_public_size = 64, |
| .expected_a_public_size = 64, |
| .expected_ss_size = 32, |
| .genkey = true, |
| } |
| }; |
| |
| /* |
| * MD4 test vectors from RFC1320 |
| */ |
| static const struct hash_testvec md4_tv_template[] = { |
| { |
| .plaintext = "", |
| .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31" |
| "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46" |
| "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52" |
| "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d", |
| }, { |
| .plaintext = "message digest", |
| .psize = 14, |
| .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8" |
| "\x18\x87\x48\x06\xe1\xc7\x01\x4b", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd" |
| "\xee\xa8\xed\x63\xdf\x41\x2d\xa9", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", |
| .psize = 62, |
| .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35" |
| "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4", |
| }, { |
| .plaintext = "123456789012345678901234567890123456789012345678901234567890123" |
| "45678901234567890", |
| .psize = 80, |
| .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19" |
| "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36", |
| }, |
| }; |
| |
| static const struct hash_testvec sha3_224_tv_template[] = { |
| { |
| .plaintext = "", |
| .digest = "\x6b\x4e\x03\x42\x36\x67\xdb\xb7" |
| "\x3b\x6e\x15\x45\x4f\x0e\xb1\xab" |
| "\xd4\x59\x7f\x9a\x1b\x07\x8e\x3f" |
| "\x5b\x5a\x6b\xc7", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x9e\x86\xff\x69\x55\x7c\xa9\x5f" |
| "\x40\x5f\x08\x12\x69\x68\x5b\x38" |
| "\xe3\xa8\x19\xb3\x09\xee\x94\x2f" |
| "\x48\x2b\x6a\x8b", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl" |
| "jklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x8a\x24\x10\x8b\x15\x4a\xda\x21" |
| "\xc9\xfd\x55\x74\x49\x44\x79\xba" |
| "\x5c\x7e\x7a\xb7\x6e\xf2\x64\xea" |
| "\xd0\xfc\xce\x33", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\x7d\x0f\x2f\xb7\x65\x3b\xa7\x26" |
| "\xc3\x88\x20\x71\x15\x06\xe8\x2d" |
| "\xa3\x92\x44\xab\x3e\xe7\xff\x86" |
| "\xb6\x79\x10\x72", |
| }, |
| }; |
| |
| static const struct hash_testvec sha3_256_tv_template[] = { |
| { |
| .plaintext = "", |
| .digest = "\xa7\xff\xc6\xf8\xbf\x1e\xd7\x66" |
| "\x51\xc1\x47\x56\xa0\x61\xd6\x62" |
| "\xf5\x80\xff\x4d\xe4\x3b\x49\xfa" |
| "\x82\xd8\x0a\x4b\x80\xf8\x43\x4a", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x80\x08\x4b\xf2\xfb\xa0\x24\x75" |
| "\x72\x6f\xeb\x2c\xab\x2d\x82\x15" |
| "\xea\xb1\x4b\xc6\xbd\xd8\xbf\xb2" |
| "\xc8\x15\x12\x57\x03\x2e\xcd\x8b", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl" |
| "jklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x41\xc0\xdb\xa2\xa9\xd6\x24\x08" |
| "\x49\x10\x03\x76\xa8\x23\x5e\x2c" |
| "\x82\xe1\xb9\x99\x8a\x99\x9e\x21" |
| "\xdb\x32\xdd\x97\x49\x6d\x33\x76", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\xde\x41\x04\xbd\xda\xda\xd9\x71" |
| "\xf7\xfa\x80\xf5\xea\x11\x03\xb1" |
| "\x3b\x6a\xbc\x5f\xb9\x66\x26\xf7" |
| "\x8a\x97\xbb\xf2\x07\x08\x38\x30", |
| }, |
| }; |
| |
| |
| static const struct hash_testvec sha3_384_tv_template[] = { |
| { |
| .plaintext = "", |
| .digest = "\x0c\x63\xa7\x5b\x84\x5e\x4f\x7d" |
| "\x01\x10\x7d\x85\x2e\x4c\x24\x85" |
| "\xc5\x1a\x50\xaa\xaa\x94\xfc\x61" |
| "\x99\x5e\x71\xbb\xee\x98\x3a\x2a" |
| "\xc3\x71\x38\x31\x26\x4a\xdb\x47" |
| "\xfb\x6b\xd1\xe0\x58\xd5\xf0\x04", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x18\x15\xf7\x74\xf3\x20\x49\x1b" |
| "\x48\x56\x9e\xfe\xc7\x94\xd2\x49" |
| "\xee\xb5\x9a\xae\x46\xd2\x2b\xf7" |
| "\x7d\xaf\xe2\x5c\x5e\xdc\x28\xd7" |
| "\xea\x44\xf9\x3e\xe1\x23\x4a\xa8" |
| "\x8f\x61\xc9\x19\x12\xa4\xcc\xd9", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl" |
| "jklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x99\x1c\x66\x57\x55\xeb\x3a\x4b" |
| "\x6b\xbd\xfb\x75\xc7\x8a\x49\x2e" |
| "\x8c\x56\xa2\x2c\x5c\x4d\x7e\x42" |
| "\x9b\xfd\xbc\x32\xb9\xd4\xad\x5a" |
| "\xa0\x4a\x1f\x07\x6e\x62\xfe\xa1" |
| "\x9e\xef\x51\xac\xd0\x65\x7c\x22", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\x1b\x19\x4d\x8f\xd5\x36\x87\x71" |
| "\xcf\xca\x30\x85\x9b\xc1\x25\xc7" |
| "\x00\xcb\x73\x8a\x8e\xd4\xfe\x2b" |
| "\x1a\xa2\xdc\x2e\x41\xfd\x52\x51" |
| "\xd2\x21\xae\x2d\xc7\xae\x8c\x40" |
| "\xb9\xe6\x56\x48\x03\xcd\x88\x6b", |
| }, |
| }; |
| |
| |
| static const struct hash_testvec sha3_512_tv_template[] = { |
| { |
| .plaintext = "", |
| .digest = "\xa6\x9f\x73\xcc\xa2\x3a\x9a\xc5" |
| "\xc8\xb5\x67\xdc\x18\x5a\x75\x6e" |
| "\x97\xc9\x82\x16\x4f\xe2\x58\x59" |
| "\xe0\xd1\xdc\xc1\x47\x5c\x80\xa6" |
| "\x15\xb2\x12\x3a\xf1\xf5\xf9\x4c" |
| "\x11\xe3\xe9\x40\x2c\x3a\xc5\x58" |
| "\xf5\x00\x19\x9d\x95\xb6\xd3\xe3" |
| "\x01\x75\x85\x86\x28\x1d\xcd\x26", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x69\x7f\x2d\x85\x61\x72\xcb\x83" |
| "\x09\xd6\xb8\xb9\x7d\xac\x4d\xe3" |
| "\x44\xb5\x49\xd4\xde\xe6\x1e\xdf" |
| "\xb4\x96\x2d\x86\x98\xb7\xfa\x80" |
| "\x3f\x4f\x93\xff\x24\x39\x35\x86" |
| "\xe2\x8b\x5b\x95\x7a\xc3\xd1\xd3" |
| "\x69\x42\x0c\xe5\x33\x32\x71\x2f" |
| "\x99\x7b\xd3\x36\xd0\x9a\xb0\x2a", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl" |
| "jklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x04\xa3\x71\xe8\x4e\xcf\xb5\xb8" |
| "\xb7\x7c\xb4\x86\x10\xfc\xa8\x18" |
| "\x2d\xd4\x57\xce\x6f\x32\x6a\x0f" |
| "\xd3\xd7\xec\x2f\x1e\x91\x63\x6d" |
| "\xee\x69\x1f\xbe\x0c\x98\x53\x02" |
| "\xba\x1b\x0d\x8d\xc7\x8c\x08\x63" |
| "\x46\xb5\x33\xb4\x9c\x03\x0d\x99" |
| "\xa2\x7d\xaf\x11\x39\xd6\xe7\x5e", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\x59\xda\x30\xe3\x90\xe4\x3d\xde" |
| "\xf0\xc6\x42\x17\xd7\xb2\x26\x47" |
| "\x90\x28\xa6\x84\xe8\x49\x7a\x86" |
| "\xd6\xb8\x9e\xf8\x07\x59\x21\x03" |
| "\xad\xd2\xed\x48\xa3\xb9\xa5\xf0" |
| "\xb3\xae\x02\x2b\xb8\xaf\xc3\x3b" |
| "\xd6\xb0\x8f\xcb\x76\x8b\xa7\x41" |
| "\x32\xc2\x8e\x50\x91\x86\x90\xfb", |
| }, |
| }; |
| |
| |
| /* |
| * MD5 test vectors from RFC1321 |
| */ |
| static const struct hash_testvec md5_tv_template[] = { |
| { |
| .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04" |
| "\xe9\x80\x09\x98\xec\xf8\x42\x7e", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8" |
| "\x31\xc3\x99\xe2\x69\x77\x26\x61", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0" |
| "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72", |
| }, { |
| .plaintext = "message digest", |
| .psize = 14, |
| .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d" |
| "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00" |
| "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", |
| .psize = 62, |
| .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5" |
| "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f", |
| }, { |
| .plaintext = "12345678901234567890123456789012345678901234567890123456789012" |
| "345678901234567890", |
| .psize = 80, |
| .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55" |
| "\xac\x49\xda\x2e\x21\x07\xb6\x7a", |
| } |
| |
| }; |
| |
| /* |
| * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E) |
| */ |
| static const struct hash_testvec rmd128_tv_template[] = { |
| { |
| .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e" |
| "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7" |
| "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba" |
| "\x84\x63\x6b\x0f\x69\x14\x4c\x77", |
| }, { |
| .plaintext = "message digest", |
| .psize = 14, |
| .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62" |
| "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5" |
| "\x10\x71\x49\x22\xb3\x71\x83\x4e", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde" |
| "fghijklmnopqrstuvwxyz0123456789", |
| .psize = 62, |
| .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f" |
| "\xae\xa4\x62\x4c\x60\xc5\xc7\x02", |
| }, { |
| .plaintext = "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890", |
| .psize = 80, |
| .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb" |
| "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighij" |
| "hijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d" |
| "\xdc\x22\xe8\x8b\x49\x13\x3a\x06", |
| }, { |
| .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi" |
| "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr" |
| "lmnopqrsmnopqrstnopqrstu", |
| .psize = 112, |
| .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b" |
| "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijk", |
| .psize = 32, |
| .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d" |
| "\xe1\x93\xff\x46\xdb\xac\xcf\xd4", |
| } |
| }; |
| |
| /* |
| * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E) |
| */ |
| static const struct hash_testvec rmd160_tv_template[] = { |
| { |
| .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28" |
| "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae" |
| "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04" |
| "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc", |
| }, { |
| .plaintext = "message digest", |
| .psize = 14, |
| .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8" |
| "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb" |
| "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde" |
| "fghijklmnopqrstuvwxyz0123456789", |
| .psize = 62, |
| .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed" |
| "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89", |
| }, { |
| .plaintext = "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890", |
| .psize = 80, |
| .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb" |
| "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighij" |
| "hijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05" |
| "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b", |
| }, { |
| .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi" |
| "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr" |
| "lmnopqrsmnopqrstnopqrstu", |
| .psize = 112, |
| .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91" |
| "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijk", |
| .psize = 32, |
| .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d" |
| "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f", |
| } |
| }; |
| |
| /* |
| * RIPEMD-256 test vectors |
| */ |
| static const struct hash_testvec rmd256_tv_template[] = { |
| { |
| .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18" |
| "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a" |
| "\x2d\x97\x74\xfb\x1e\x5d\x02\x63" |
| "\x80\xae\x01\x68\xe3\xc5\x52\x2d", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9" |
| "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c" |
| "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf" |
| "\xcd\x88\x3a\x91\x34\x69\x29\x25", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb" |
| "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1" |
| "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e" |
| "\x1e\x42\xd2\xe9\x75\x45\x9b\x65", |
| }, { |
| .plaintext = "message digest", |
| .psize = 14, |
| .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a" |
| "\x51\x4d\x5c\x91\x4c\x39\x2c\x90" |
| "\x18\xc7\xc4\x6b\xc1\x44\x65\x55" |
| "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16" |
| "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc" |
| "\x78\x96\x11\x8a\x51\x97\x96\x87" |
| "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde" |
| "fghijklmnopqrstuvwxyz0123456789", |
| .psize = 62, |
| .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20" |
| "\xb8\x44\x24\xae\x93\x1c\xbb\x1f" |
| "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1" |
| "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8", |
| }, { |
| .plaintext = "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890", |
| .psize = 80, |
| .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa" |
| "\xf9\x13\x68\xc0\x6a\x62\x75\xb5" |
| "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed" |
| "\xfd\x67\x78\xdf\x89\xa8\x90\xdd", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighij" |
| "hijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8" |
| "\xc8\xd9\x12\x85\x73\xe7\xa9\x80" |
| "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e" |
| "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f", |
| } |
| }; |
| |
| /* |
| * RIPEMD-320 test vectors |
| */ |
| static const struct hash_testvec rmd320_tv_template[] = { |
| { |
| .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1" |
| "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25" |
| "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e" |
| "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8", |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5" |
| "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57" |
| "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54" |
| "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d" |
| "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08" |
| "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74" |
| "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d", |
| }, { |
| .plaintext = "message digest", |
| .psize = 14, |
| .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68" |
| "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa" |
| "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d" |
| "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93" |
| "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4" |
| "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed" |
| "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde" |
| "fghijklmnopqrstuvwxyz0123456789", |
| .psize = 62, |
| .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2" |
| "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c" |
| "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9" |
| "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4", |
| }, { |
| .plaintext = "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890", |
| .psize = 80, |
| .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6" |
| "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41" |
| "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f" |
| "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighij" |
| "hijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4" |
| "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59" |
| "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b" |
| "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac", |
| } |
| }; |
| |
| static const struct hash_testvec crct10dif_tv_template[] = { |
| { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = (u8 *)(u16 []){ 0x443b }, |
| }, { |
| .plaintext = "1234567890123456789012345678901234567890" |
| "123456789012345678901234567890123456789", |
| .psize = 79, |
| .digest = (u8 *)(u16 []){ 0x4b70 }, |
| }, { |
| .plaintext = "abcdddddddddddddddddddddddddddddddddddddddd" |
| "ddddddddddddd", |
| .psize = 56, |
| .digest = (u8 *)(u16 []){ 0x9ce3 }, |
| }, { |
| .plaintext = "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890" |
| "1234567890123456789012345678901234567890" |
| "123456789012345678901234567890123456789", |
| .psize = 319, |
| .digest = (u8 *)(u16 []){ 0x44c6 }, |
| }, { |
| .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49" |
| "\xe0\x54\xeb\x82\x19\x8d\x24\xbb" |
| "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a" |
| "\xa1\x38\xcf\x43\xda\x71\x08\x7c" |
| "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee" |
| "\x85\x1c\x90\x27\xbe\x32\xc9\x60" |
| "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2" |
| "\x46\xdd\x74\x0b\x7f\x16\xad\x21" |
| "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93" |
| "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05" |
| "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77" |
| "\x0e\x82\x19\xb0\x24\xbb\x52\xe9" |
| "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38" |
| "\xcf\x66\xfd\x71\x08\x9f\x13\xaa" |
| "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c" |
| "\xb3\x27\xbe\x55\xec\x60\xf7\x8e" |
| "\x02\x99\x30\xc7\x3b\xd2\x69\x00" |
| "\x74\x0b\xa2\x16\xad\x44\xdb\x4f" |
| "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1" |
| "\x58\xef\x63\xfa\x91\x05\x9c\x33" |
| "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5" |
| "\x19\xb0\x47\xde\x52\xe9\x80\x17" |
| "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66" |
| "\xfd\x94\x08\x9f\x36\xcd\x41\xd8" |
| "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a" |
| "\xe1\x55\xec\x83\x1a\x8e\x25\xbc" |
| "\x30\xc7\x5e\xf5\x69\x00\x97\x0b" |
| "\xa2\x39\xd0\x44\xdb\x72\x09\x7d" |
| "\x14\xab\x1f\xb6\x4d\xe4\x58\xef" |
| "\x86\x1d\x91\x28\xbf\x33\xca\x61" |
| "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3" |
| "\x47\xde\x75\x0c\x80\x17\xae\x22" |
| "\xb9\x50\xe7\x5b\xf2\x89\x20\x94" |
| "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06" |
| "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78" |
| "\x0f\x83\x1a\xb1\x25\xbc\x53\xea" |
| "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39" |
| "\xd0\x67\xfe\x72\x09\xa0\x14\xab" |
| "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d" |
| "\xb4\x28\xbf\x56\xed\x61\xf8\x8f" |
| "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01" |
| "\x75\x0c\xa3\x17\xae\x45\xdc\x50" |
| "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2" |
| "\x59\xf0\x64\xfb\x92\x06\x9d\x34" |
| "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6" |
| "\x1a\xb1\x48\xdf\x53\xea\x81\x18" |
| "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67" |
| "\xfe\x95\x09\xa0\x37\xce\x42\xd9" |
| "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b" |
| "\xe2\x56\xed\x84\x1b\x8f\x26\xbd" |
| "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c" |
| "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e" |
| "\x15\xac\x20\xb7\x4e\xe5\x59\xf0" |
| "\x87\x1e\x92\x29\xc0\x34\xcb\x62" |
| "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4" |
| "\x48\xdf\x76\x0d\x81\x18\xaf\x23" |
| "\xba\x51\xe8\x5c\xf3\x8a\x21\x95" |
| "\x2c\xc3\x37\xce\x65\xfc\x70\x07" |
| "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79" |
| "\x10\x84\x1b\xb2\x26\xbd\x54\xeb" |
| "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a" |
| "\xd1\x68\xff\x73\x0a\xa1\x15\xac" |
| "\x43\xda\x4e\xe5\x7c\x13\x87\x1e" |
| "\xb5\x29\xc0\x57\xee\x62\xf9\x90" |
| "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02" |
| "\x76\x0d\xa4\x18\xaf\x46\xdd\x51" |
| "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3" |
| "\x5a\xf1\x65\xfc\x93\x07\x9e\x35" |
| "\xcc\x40\xd7\x6e\x05\x79\x10\xa7" |
| "\x1b\xb2\x49\xe0\x54\xeb\x82\x19" |
| "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68" |
| "\xff\x96\x0a\xa1\x38\xcf\x43\xda" |
| "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c" |
| "\xe3\x57\xee\x85\x1c\x90\x27\xbe" |
| "\x32\xc9\x60\xf7\x6b\x02\x99\x0d" |
| "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f" |
| "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1" |
| "\x88\x1f\x93\x2a\xc1\x35\xcc\x63" |
| "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5" |
| "\x49\xe0\x77\x0e\x82\x19\xb0\x24" |
| "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96" |
| "\x2d\xc4\x38\xcf\x66\xfd\x71\x08" |
| "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a" |
| "\x11\x85\x1c\xb3\x27\xbe\x55\xec" |
| "\x60\xf7\x8e\x02\x99\x30\xc7\x3b" |
| "\xd2\x69\x00\x74\x0b\xa2\x16\xad" |
| "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f" |
| "\xb6\x2a\xc1\x58\xef\x63\xfa\x91" |
| "\x05\x9c\x33\xca\x3e\xd5\x6c\x03" |
| "\x77\x0e\xa5\x19\xb0\x47\xde\x52" |
| "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4" |
| "\x5b\xf2\x66\xfd\x94\x08\x9f\x36" |
| "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8" |
| "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a" |
| "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69" |
| "\x00\x97\x0b\xa2\x39\xd0\x44\xdb" |
| "\x72\x09\x7d\x14\xab\x1f\xb6\x4d" |
| "\xe4\x58\xef\x86\x1d\x91\x28\xbf" |
| "\x33\xca\x61\xf8\x6c\x03\x9a\x0e" |
| "\xa5\x3c\xd3\x47\xde\x75\x0c\x80" |
| "\x17\xae\x22\xb9\x50\xe7\x5b\xf2" |
| "\x89\x20\x94\x2b\xc2\x36\xcd\x64" |
| "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6" |
| "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25" |
| "\xbc\x53\xea\x5e\xf5\x8c\x00\x97" |
| "\x2e\xc5\x39\xd0\x67\xfe\x72\x09" |
| "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b" |
| "\x12\x86\x1d\xb4\x28\xbf\x56\xed" |
| "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c" |
| "\xd3\x6a\x01\x75\x0c\xa3\x17\xae" |
| "\x45\xdc\x50\xe7\x7e\x15\x89\x20" |
| "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92" |
| "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04" |
| "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53" |
| "\xea\x81\x18\x8c\x23\xba\x2e\xc5" |
| "\x5c\xf3\x67\xfe\x95\x09\xa0\x37" |
| "\xce\x42\xd9\x70\x07\x7b\x12\xa9" |
| "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b" |
| "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a" |
| "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc" |
| "\x73\x0a\x7e\x15\xac\x20\xb7\x4e" |
| "\xe5\x59\xf0\x87\x1e\x92\x29\xc0" |
| "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f" |
| "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81" |
| "\x18\xaf\x23\xba\x51\xe8\x5c\xf3" |
| "\x8a\x21\x95\x2c\xc3\x37\xce\x65" |
| "\xfc\x70\x07\x9e\x12\xa9\x40\xd7" |
| "\x4b\xe2\x79\x10\x84\x1b\xb2\x26" |
| "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98" |
| "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a" |
| "\xa1\x15\xac\x43\xda\x4e\xe5\x7c" |
| "\x13\x87\x1e\xb5\x29\xc0\x57\xee" |
| "\x62\xf9\x90\x04\x9b\x32\xc9\x3d" |
| "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf" |
| "\x46\xdd\x51\xe8\x7f\x16\x8a\x21" |
| "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93" |
| "\x07\x9e\x35\xcc\x40\xd7\x6e\x05" |
| "\x79\x10\xa7\x1b\xb2\x49\xe0\x54" |
| "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6" |
| "\x5d\xf4\x68\xff\x96\x0a\xa1\x38" |
| "\xcf\x43\xda\x71\x08\x7c\x13\xaa" |
| "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c" |
| "\x90\x27\xbe\x32\xc9\x60\xf7\x6b" |
| "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd" |
| "\x74\x0b\x7f\x16\xad\x21\xb8\x4f" |
| "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1" |
| "\x35\xcc\x63\xfa\x6e\x05\x9c\x10" |
| "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82" |
| "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4" |
| "\x8b\x22\x96\x2d\xc4\x38\xcf\x66" |
| "\xfd\x71\x08\x9f\x13\xaa\x41\xd8" |
| "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27" |
| "\xbe\x55\xec\x60\xf7\x8e\x02\x99" |
| "\x30\xc7\x3b\xd2\x69\x00\x74\x0b" |
| "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d" |
| "\x14\x88\x1f\xb6\x2a\xc1\x58\xef" |
| "\x63\xfa\x91\x05\x9c\x33\xca\x3e" |
| "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0" |
| "\x47\xde\x52\xe9\x80\x17\x8b\x22" |
| "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94" |
| "\x08\x9f\x36\xcd\x41\xd8\x6f\x06" |
| "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55" |
| "\xec\x83\x1a\x8e\x25\xbc\x30\xc7" |
| "\x5e\xf5\x69\x00\x97\x0b\xa2\x39" |
| "\xd0\x44\xdb\x72\x09\x7d\x14\xab" |
| "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d" |
| "\x91\x28\xbf\x33\xca\x61\xf8\x6c" |
| "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde" |
| "\x75\x0c\x80\x17\xae\x22\xb9\x50" |
| "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2" |
| "\x36\xcd\x64\xfb\x6f\x06\x9d\x11" |
| "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83" |
| "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5" |
| "\x8c\x00\x97\x2e\xc5\x39\xd0\x67" |
| "\xfe\x72\x09\xa0\x14\xab\x42\xd9" |
| "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28" |
| "\xbf\x56\xed\x61\xf8\x8f\x03\x9a" |
| "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c" |
| "\xa3\x17\xae\x45\xdc\x50\xe7\x7e" |
| "\x15\x89\x20\xb7\x2b\xc2\x59\xf0" |
| "\x64\xfb\x92\x06\x9d\x34\xcb\x3f" |
| "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1" |
| "\x48\xdf\x53\xea\x81\x18\x8c\x23" |
| "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95" |
| "\x09\xa0\x37\xce\x42\xd9\x70\x07" |
| "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56" |
| "\xed\x84\x1b\x8f\x26\xbd\x31\xc8" |
| "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a" |
| "\xd1\x45\xdc\x73\x0a\x7e\x15\xac" |
| "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e" |
| "\x92\x29\xc0\x34\xcb\x62\xf9\x6d" |
| "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf" |
| "\x76\x0d\x81\x18\xaf\x23\xba\x51" |
| "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3" |
| "\x37\xce\x65\xfc\x70\x07\x9e\x12" |
| "\xa9\x40\xd7\x4b\xe2\x79\x10\x84" |
| "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6" |
| "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68" |
| "\xff\x73\x0a\xa1\x15\xac\x43\xda" |
| "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29" |
| "\xc0\x57\xee\x62\xf9\x90\x04\x9b" |
| "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d" |
| "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f" |
| "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1" |
| "\x65\xfc\x93\x07\x9e\x35\xcc\x40" |
| "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2" |
| "\x49\xe0\x54\xeb\x82\x19\x8d\x24" |
| "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96" |
| "\x0a\xa1\x38\xcf\x43\xda\x71\x08" |
| "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57" |
| "\xee\x85\x1c\x90\x27\xbe\x32\xc9" |
| "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b" |
| "\xd2\x46\xdd\x74\x0b\x7f\x16\xad" |
| "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f" |
| "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e" |
| "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0" |
| "\x77\x0e\x82\x19\xb0\x24\xbb\x52" |
| "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4" |
| "\x38\xcf\x66\xfd\x71\x08\x9f\x13" |
| "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85" |
| "\x1c\xb3\x27\xbe\x55\xec\x60\xf7" |
| "\x8e\x02\x99\x30\xc7\x3b\xd2\x69" |
| "\x00\x74\x0b\xa2\x16\xad\x44\xdb" |
| "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a" |
| "\xc1\x58\xef\x63\xfa\x91\x05\x9c" |
| "\x33\xca\x3e\xd5\x6c\x03\x77\x0e" |
| "\xa5\x19\xb0\x47\xde\x52\xe9\x80" |
| "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2" |
| "\x66\xfd\x94\x08\x9f\x36\xcd\x41" |
| "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3" |
| "\x4a\xe1\x55\xec\x83\x1a\x8e\x25" |
| "\xbc\x30\xc7\x5e\xf5\x69\x00\x97" |
| "\x0b\xa2\x39\xd0\x44\xdb\x72\x09" |
| "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58" |
| "\xef\x86\x1d\x91\x28\xbf\x33\xca" |
| "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c" |
| "\xd3\x47\xde\x75\x0c\x80\x17\xae" |
| "\x22\xb9\x50\xe7\x5b\xf2\x89\x20" |
| "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f" |
| "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1" |
| "\x78\x0f\x83\x1a\xb1\x25\xbc\x53" |
| "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5" |
| "\x39\xd0\x67\xfe\x72\x09\xa0\x14" |
| "\xab\x42\xd9\x4d\xe4\x7b\x12\x86" |
| "\x1d\xb4\x28\xbf\x56\xed\x61\xf8" |
| "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a" |
| "\x01\x75\x0c\xa3\x17\xae\x45\xdc" |
| "\x50\xe7\x7e\x15\x89\x20\xb7\x2b" |
| "\xc2\x59\xf0\x64\xfb\x92\x06\x9d" |
| "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f" |
| "\xa6\x1a\xb1\x48\xdf\x53\xea\x81" |
| "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3" |
| "\x67\xfe\x95\x09\xa0\x37\xce\x42" |
| "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4" |
| "\x4b\xe2\x56\xed\x84\x1b\x8f\x26" |
| "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98", |
| .psize = 2048, |
| .digest = (u8 *)(u16 []){ 0x23ca }, |
| } |
| }; |
| |
| /* |
| * Streebog test vectors from RFC 6986 and GOST R 34.11-2012 |
| */ |
| static const struct hash_testvec streebog256_tv_template[] = { |
| { /* M1 */ |
| .plaintext = "012345678901234567890123456789012345678901234567890123456789012", |
| .psize = 63, |
| .digest = |
| "\x9d\x15\x1e\xef\xd8\x59\x0b\x89" |
| "\xda\xa6\xba\x6c\xb7\x4a\xf9\x27" |
| "\x5d\xd0\x51\x02\x6b\xb1\x49\xa4" |
| "\x52\xfd\x84\xe5\xe5\x7b\x55\x00", |
| }, |
| { /* M2 */ |
| .plaintext = |
| "\xd1\xe5\x20\xe2\xe5\xf2\xf0\xe8" |
| "\x2c\x20\xd1\xf2\xf0\xe8\xe1\xee" |
| "\xe6\xe8\x20\xe2\xed\xf3\xf6\xe8" |
| "\x2c\x20\xe2\xe5\xfe\xf2\xfa\x20" |
| "\xf1\x20\xec\xee\xf0\xff\x20\xf1" |
| "\xf2\xf0\xe5\xeb\xe0\xec\xe8\x20" |
| "\xed\xe0\x20\xf5\xf0\xe0\xe1\xf0" |
| "\xfb\xff\x20\xef\xeb\xfa\xea\xfb" |
| "\x20\xc8\xe3\xee\xf0\xe5\xe2\xfb", |
| .psize = 72, |
| .digest = |
| "\x9d\xd2\xfe\x4e\x90\x40\x9e\x5d" |
| "\xa8\x7f\x53\x97\x6d\x74\x05\xb0" |
| "\xc0\xca\xc6\x28\xfc\x66\x9a\x74" |
| "\x1d\x50\x06\x3c\x55\x7e\x8f\x50", |
| }, |
| }; |
| |
| static const struct hash_testvec streebog512_tv_template[] = { |
| { /* M1 */ |
| .plaintext = "012345678901234567890123456789012345678901234567890123456789012", |
| .psize = 63, |
| .digest = |
| "\x1b\x54\xd0\x1a\x4a\xf5\xb9\xd5" |
| "\xcc\x3d\x86\xd6\x8d\x28\x54\x62" |
| "\xb1\x9a\xbc\x24\x75\x22\x2f\x35" |
| "\xc0\x85\x12\x2b\xe4\xba\x1f\xfa" |
| "\x00\xad\x30\xf8\x76\x7b\x3a\x82" |
| "\x38\x4c\x65\x74\xf0\x24\xc3\x11" |
| "\xe2\xa4\x81\x33\x2b\x08\xef\x7f" |
| "\x41\x79\x78\x91\xc1\x64\x6f\x48", |
| }, |
| { /* M2 */ |
| .plaintext = |
| "\xd1\xe5\x20\xe2\xe5\xf2\xf0\xe8" |
| "\x2c\x20\xd1\xf2\xf0\xe8\xe1\xee" |
| "\xe6\xe8\x20\xe2\xed\xf3\xf6\xe8" |
| "\x2c\x20\xe2\xe5\xfe\xf2\xfa\x20" |
| "\xf1\x20\xec\xee\xf0\xff\x20\xf1" |
| "\xf2\xf0\xe5\xeb\xe0\xec\xe8\x20" |
| "\xed\xe0\x20\xf5\xf0\xe0\xe1\xf0" |
| "\xfb\xff\x20\xef\xeb\xfa\xea\xfb" |
| "\x20\xc8\xe3\xee\xf0\xe5\xe2\xfb", |
| .psize = 72, |
| .digest = |
| "\x1e\x88\xe6\x22\x26\xbf\xca\x6f" |
| "\x99\x94\xf1\xf2\xd5\x15\x69\xe0" |
| "\xda\xf8\x47\x5a\x3b\x0f\xe6\x1a" |
| "\x53\x00\xee\xe4\x6d\x96\x13\x76" |
| "\x03\x5f\xe8\x35\x49\xad\xa2\xb8" |
| "\x62\x0f\xcd\x7c\x49\x6c\xe5\xb3" |
| "\x3f\x0c\xb9\xdd\xdc\x2b\x64\x60" |
| "\x14\x3b\x03\xda\xba\xc9\xfb\x28", |
| }, |
| }; |
| |
| /* |
| * Two HMAC-Streebog test vectors from RFC 7836 and R 50.1.113-2016 A |
| */ |
| static const struct hash_testvec hmac_streebog256_tv_template[] = { |
| { |
| .key = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" |
| "\x10\x11\x12\x13\x14\x15\x16\x17" |
| "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", |
| .ksize = 32, |
| .plaintext = |
| "\x01\x26\xbd\xb8\x78\x00\xaf\x21" |
| "\x43\x41\x45\x65\x63\x78\x01\x00", |
| .psize = 16, |
| .digest = |
| "\xa1\xaa\x5f\x7d\xe4\x02\xd7\xb3" |
| "\xd3\x23\xf2\x99\x1c\x8d\x45\x34" |
| "\x01\x31\x37\x01\x0a\x83\x75\x4f" |
| "\xd0\xaf\x6d\x7c\xd4\x92\x2e\xd9", |
| }, |
| }; |
| |
| static const struct hash_testvec hmac_streebog512_tv_template[] = { |
| { |
| .key = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" |
| "\x10\x11\x12\x13\x14\x15\x16\x17" |
| "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", |
| .ksize = 32, |
| .plaintext = |
| "\x01\x26\xbd\xb8\x78\x00\xaf\x21" |
| "\x43\x41\x45\x65\x63\x78\x01\x00", |
| .psize = 16, |
| .digest = |
| "\xa5\x9b\xab\x22\xec\xae\x19\xc6" |
| "\x5f\xbd\xe6\xe5\xf4\xe9\xf5\xd8" |
| "\x54\x9d\x31\xf0\x37\xf9\xdf\x9b" |
| "\x90\x55\x00\xe1\x71\x92\x3a\x77" |
| "\x3d\x5f\x15\x30\xf2\xed\x7e\x96" |
| "\x4c\xb2\xee\xdc\x29\xe9\xad\x2f" |
| "\x3a\xfe\x93\xb2\x81\x4f\x79\xf5" |
| "\x00\x0f\xfc\x03\x66\xc2\x51\xe6", |
| }, |
| }; |
| |
| /* Example vectors below taken from |
| * http://www.oscca.gov.cn/UpFile/20101222141857786.pdf |
| * |
| * The rest taken from |
| * https://github.com/adamws/oscca-sm3 |
| */ |
| static const struct hash_testvec sm3_tv_template[] = { |
| { |
| .plaintext = "", |
| .psize = 0, |
| .digest = (u8 *)(u8 []) { |
| 0x1A, 0xB2, 0x1D, 0x83, 0x55, 0xCF, 0xA1, 0x7F, |
| 0x8e, 0x61, 0x19, 0x48, 0x31, 0xE8, 0x1A, 0x8F, |
| 0x22, 0xBE, 0xC8, 0xC7, 0x28, 0xFE, 0xFB, 0x74, |
| 0x7E, 0xD0, 0x35, 0xEB, 0x50, 0x82, 0xAA, 0x2B } |
| }, { |
| .plaintext = "a", |
| .psize = 1, |
| .digest = (u8 *)(u8 []) { |
| 0x62, 0x34, 0x76, 0xAC, 0x18, 0xF6, 0x5A, 0x29, |
| 0x09, 0xE4, 0x3C, 0x7F, 0xEC, 0x61, 0xB4, 0x9C, |
| 0x7E, 0x76, 0x4A, 0x91, 0xA1, 0x8C, 0xCB, 0x82, |
| 0xF1, 0x91, 0x7A, 0x29, 0xC8, 0x6C, 0x5E, 0x88 } |
| }, { |
| /* A.1. Example 1 */ |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = (u8 *)(u8 []) { |
| 0x66, 0xC7, 0xF0, 0xF4, 0x62, 0xEE, 0xED, 0xD9, |
| 0xD1, 0xF2, 0xD4, 0x6B, 0xDC, 0x10, 0xE4, 0xE2, |
| 0x41, 0x67, 0xC4, 0x87, 0x5C, 0xF2, 0xF7, 0xA2, |
| 0x29, 0x7D, 0xA0, 0x2B, 0x8F, 0x4B, 0xA8, 0xE0 } |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| .psize = 26, |
| .digest = (u8 *)(u8 []) { |
| 0xB8, 0x0F, 0xE9, 0x7A, 0x4D, 0xA2, 0x4A, 0xFC, |
| 0x27, 0x75, 0x64, 0xF6, 0x6A, 0x35, 0x9E, 0xF4, |
| 0x40, 0x46, 0x2A, 0xD2, 0x8D, 0xCC, 0x6D, 0x63, |
| 0xAD, 0xB2, 0x4D, 0x5C, 0x20, 0xA6, 0x15, 0x95 } |
| }, { |
| /* A.1. Example 2 */ |
| .plaintext = "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdab" |
| "cdabcdabcdabcdabcd", |
| .psize = 64, |
| .digest = (u8 *)(u8 []) { |
| 0xDE, 0xBE, 0x9F, 0xF9, 0x22, 0x75, 0xB8, 0xA1, |
| 0x38, 0x60, 0x48, 0x89, 0xC1, 0x8E, 0x5A, 0x4D, |
| 0x6F, 0xDB, 0x70, 0xE5, 0x38, 0x7E, 0x57, 0x65, |
| 0x29, 0x3D, 0xCB, 0xA3, 0x9C, 0x0C, 0x57, 0x32 } |
| }, { |
| .plaintext = "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" |
| "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" |
| "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" |
| "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" |
| "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" |
| "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" |
| "abcdabcdabcdabcdabcdabcdabcdabcd", |
| .psize = 256, |
| .digest = (u8 *)(u8 []) { |
| 0xB9, 0x65, 0x76, 0x4C, 0x8B, 0xEB, 0xB0, 0x91, |
| 0xC7, 0x60, 0x2B, 0x74, 0xAF, 0xD3, 0x4E, 0xEF, |
| 0xB5, 0x31, 0xDC, 0xCB, 0x4E, 0x00, 0x76, 0xD9, |
| 0xB7, 0xCD, 0x81, 0x31, 0x99, 0xB4, 0x59, 0x71 } |
| } |
| }; |
| |
| /* |
| * SHA1 test vectors from from FIPS PUB 180-1 |
| * Long vector from CAVS 5.0 |
| */ |
| static const struct hash_testvec sha1_tv_template[] = { |
| { |
| .plaintext = "", |
| .psize = 0, |
| .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55" |
| "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e" |
| "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae" |
| "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1", |
| }, { |
| .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06" |
| "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44" |
| "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f" |
| "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5" |
| "\x73\x6a\x10\x6e\x92\xe1\x71\x39" |
| "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3" |
| "\xfb\x95\x46\xab\x42\x96\xfa\x9f" |
| "\x72\x28\x26\xc0\x66\x86\x9e\xda" |
| "\xcd\x73\xb2\x54\x80\x35\x18\x58" |
| "\x13\xe2\x26\x34\xa9\xda\x44\x00" |
| "\x0d\x95\xa2\x81\xff\x9f\x26\x4e" |
| "\xcc\xe0\xa9\x31\x22\x21\x62\xd0" |
| "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa" |
| "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13" |
| "\xae\x29\x81\x0f\xd7\x94\xca\xd5" |
| "\xdf\xaf\x29\xec\x43\xcb\x38\xd1" |
| "\x98\xfe\x4a\xe1\xda\x23\x59\x78" |
| "\x02\x21\x40\x5b\xd6\x71\x2a\x53" |
| "\x05\xda\x4b\x1b\x73\x7f\xce\x7c" |
| "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23" |
| "\x5a\x90\x11", |
| .psize = 163, |
| .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20" |
| "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", |
| .psize = 64, |
| .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82" |
| "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4" |
| "\x55\x73\x4a\x81\x99\xe4\x47\x2a" |
| "\x30\xd6\xc9\x85", |
| } |
| }; |
| |
| |
| /* |
| * SHA224 test vectors from from FIPS PUB 180-2 |
| */ |
| static const struct hash_testvec sha224_tv_template[] = { |
| { |
| .plaintext = "", |
| .psize = 0, |
| .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9" |
| "\x47\x61\x02\xbb\x28\x82\x34\xc4" |
| "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a" |
| "\xc5\xb3\xe4\x2f", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22" |
| "\x86\x42\xA4\x77\xBD\xA2\x55\xB3" |
| "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7" |
| "\xE3\x6C\x9D\xA7", |
| }, { |
| .plaintext = |
| "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC" |
| "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50" |
| "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19" |
| "\x52\x52\x25\x25", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", |
| .psize = 64, |
| .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01" |
| "\x42\xfd\x10\x92\xaa\x4e\x04\x08" |
| "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c" |
| "\xef\x3b\xcb\x0e", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c" |
| "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91" |
| "\x20\x48\xa4\x28\xff\x55\xb1\xd3" |
| "\xe6\xf9\x4f\xcc", |
| } |
| }; |
| |
| /* |
| * SHA256 test vectors from from NIST |
| */ |
| static const struct hash_testvec sha256_tv_template[] = { |
| { |
| .plaintext = "", |
| .psize = 0, |
| .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14" |
| "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24" |
| "\x27\xae\x41\xe4\x64\x9b\x93\x4c" |
| "\xa4\x95\x99\x1b\x78\x52\xb8\x55", |
| }, { |
| .plaintext = "abc", |
| .psize = 3, |
| .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea" |
| "\x41\x41\x40\xde\x5d\xae\x22\x23" |
| "\xb0\x03\x61\xa3\x96\x17\x7a\x9c" |
| "\xb4\x10\xff\x61\xf2\x00\x15\xad", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8" |
| "\xe5\xc0\x26\x93\x0c\x3e\x60\x39" |
| "\xa3\x3c\xe4\x59\x64\xff\x21\x67" |
| "\xf6\xec\xed\xd4\x19\xdb\x06\xc1", |
| }, { |
| .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", |
| .psize = 64, |
| .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4" |
| "\x2c\x32\x29\x32\x19\xbb\xfb\xfa" |
| "\xd6\xff\x94\xa3\x72\x91\x85\x66" |
| "\x3b\xa7\x87\x77\x58\xa3\x40\x3a", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a" |
| "\x32\x32\x17\xcc\xd4\x6a\x71\xa9" |
| "\xf3\xed\x50\x10\x64\x8e\x06\xbe" |
| "\x9b\x4a\xa6\xbb\x05\x89\x59\x51", |
| } |
| }; |
| |
| /* |
| * SHA384 test vectors from from NIST and kerneli |
| */ |
| static const struct hash_testvec sha384_tv_template[] = { |
| { |
| .plaintext = "", |
| .psize = 0, |
| .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38" |
| "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a" |
| "\x21\xfd\xb7\x11\x14\xbe\x07\x43" |
| "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda" |
| "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb" |
| "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b", |
| }, { |
| .plaintext= "abc", |
| .psize = 3, |
| .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b" |
| "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07" |
| "\x27\x2c\x32\xab\x0e\xde\xd1\x63" |
| "\x1a\x8b\x60\x5a\x43\xff\x5b\xed" |
| "\x80\x86\x07\x2b\xa1\xe7\xcc\x23" |
| "\x58\xba\xec\xa1\x34\xc8\x25\xa7", |
| }, { |
| .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| .psize = 56, |
| .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39" |
| "\x37\x07\xa6\x5b\x1b\x47\x09\x39" |
| "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab" |
| "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6" |
| "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f" |
| "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b", |
| }, { |
| .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" |
| "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", |
| .psize = 112, |
| .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8" |
| "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47" |
| "\x53\x11\x1b\x17\x3b\x3b\x05\xd2" |
| "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12" |
| "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9" |
| "\x66\xc3\xe9\xfa\x91\x74\x60\x39", |
| }, { |
| .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd" |
| "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", |
| .psize = 104, |
| .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb" |
| "\xbd\x7e\x2c\x28\x62\xba\x29\x0a" |
| "\xd3\x01\x0e\x49\x78\xc1\x98\xdc" |
| "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a" |
| "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a" |
| "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4", |
| }, { |
| .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3" |
| "\x7a\x11\x85\x1c\xb3\x27\xbe\x55" |
| "\xec\x60\xf7\x8e\x02\x99\x30\xc7" |
| "\x3b\xd2\x69\x00\x74\x0b\xa2\x16" |
| "\xad\x44\xdb\x4f\xe6\x7d\x14\x88" |
| "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa" |
| "\x91\x05\x9c\x33\xca\x3e\xd5\x6c" |
| "\x03\x77\x0e\xa5\x19\xb0\x47\xde" |
| "\x52\xe9\x80\x17\x8b\x22\xb9\x2d" |
| "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f" |
| "\x36\xcd\x41\xd8\x6f\x06\x7a\x11" |
| "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83" |
| "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5" |
| "\x69\x00\x97\x0b\xa2\x39\xd0\x44" |
| "\xdb\x72\x09\x7d\x14\xab\x1f\xb6" |
| "\x4d\xe4\x58\xef\x86\x1d\x91\x28" |
| "\xbf\x33\xca\x61\xf8\x6c\x03\x9a" |
| "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c" |
| "\x80\x17\xae\x22\xb9\x50\xe7\x5b" |
| "\xf2\x89\x20\x94\x2b\xc2\x36\xcd" |
| "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f" |
| "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1" |
| "\x25\xbc\x53\xea\x5e\xf5\x8c\x00" |
| "\x97\x2e\xc5\x39\xd0\x67\xfe\x72" |
| "\x09\xa0\x14\xab\x42\xd9\x4d\xe4" |
| "\x7b\x12\x86\x1d\xb4\x28\xbf\x56" |
| "\xed\x61\xf8\x8f\x03\x9a\x31\xc8" |
| "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17" |
| "\xae\x45\xdc\x50\xe7\x7e\x15\x89" |
| "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb" |
| "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d" |
| "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf" |
| "\x53\xea\x81\x18\x8c\x23\xba\x2e" |
| "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0" |
| "\x37\xce\x42\xd9\x70\x07\x7b\x12" |
| "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84" |
| "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6" |
| "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45" |
| "\xdc\x73\x0a\x7e\x15\xac\x20\xb7" |
| "\x4e\xe5\x59\xf0\x87\x1e\x92\x29" |
| "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b" |
| "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d" |
| "\x81\x18\xaf\x23\xba\x51\xe8\x5c" |
| "\xf3\x8a\x21\x95\x2c\xc3\x37\xce" |
| "\x65\xfc\x70\x07\x9e\x12\xa9\x40" |
| "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2" |
| "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01" |
| "\x98\x2f\xc6\x3a\xd1\x68\xff\x73" |
| "\x0a\xa1\x15\xac\x43\xda\x4e\xe5" |
| "\x7c\x13\x87\x1e\xb5\x29\xc0\x57" |
| "\xee\x62\xf9\x90\x04\x9b\x32\xc9" |
| "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18" |
| "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a" |
| "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc" |
| "\x93\x07\x9e\x35\xcc\x40\xd7\x6e" |
| "\x05\x79\x10\xa7\x1b\xb2\x49\xe0" |
| "\x54\xeb\x82\x19\x8d\x24\xbb\x2f" |
| "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1" |
| "\x38\xcf\x43\xda\x71\x08\x7c\x13" |
| "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85" |
| "\x1c\x90\x27\xbe\x32\xc9\x60\xf7" |
| "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46" |
| "\xdd\x74\x0b\x7f\x16\xad\x21\xb8" |
| "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a" |
| "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c" |
| "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e" |
| "\x82\x19\xb0\x24\xbb\x52\xe9\x5d" |
| "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf" |
| "\x66\xfd\x71\x08\x9f\x13\xaa\x41" |
| "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3" |
| "\x27\xbe\x55\xec\x60\xf7\x8e\x02" |
| "\x99\x30\xc7\x3b\xd2\x69\x00\x74" |
| "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6" |
| "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58" |
| "\xef\x63\xfa\x91\x05\x9c\x33\xca" |
| "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19" |
| "\xb0\x47\xde\x52\xe9\x80\x17\x8b" |
| "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd" |
| "\x94\x08\x9f\x36\xcd\x41\xd8\x6f" |
| "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1" |
| "\x55\xec\x83\x1a\x8e\x25\xbc\x30" |
| "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2" |
| "\x39\xd0\x44\xdb\x72\x09\x7d\x14" |
| "\xab\x1f\xb6\x4d\xe4\x58\xef\x86" |
| "\x1d\x91\x28\xbf\x33\xca\x61\xf8" |
| "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47" |
| "\xde\x75\x0c\x80\x17\xae\x22\xb9" |
| "\x50\xe7\x5b\xf2\x89\x20\x94\x2b" |
| "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d" |
| "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f" |
| "\x83\x1a\xb1\x25\xbc\x53\xea\x5e" |
| "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0" |
| "\x67\xfe\x72\x09\xa0\x14\xab\x42" |
| "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4" |
| "\x28\xbf\x56\xed\x61\xf8\x8f\x03" |
| "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75" |
| "\x0c\xa3\x17\xae\x45\xdc\x50\xe7" |
| "\x7e\x15\x89\x20\xb7\x2b\xc2\x59" |
| "\xf0\x64\xfb\x92\x06\x9d\x34\xcb" |
| "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a" |
| "\xb1\x48\xdf\x53\xea\x81\x18\x8c" |
| "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe" |
| "\x95\x09\xa0\x37\xce\x42\xd9\x70" |
| "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2" |
| "\x56\xed\x84\x1b\x8f\x26\xbd\x31" |
| "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3" |
| "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15" |
| "\xac\x20\xb7\x4e\xe5\x59\xf0\x87" |
| "\x1e\x92\x29\xc0\x34\xcb\x62\xf9" |
| "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48" |
| "\xdf\x76\x0d\x81\x18\xaf\x23\xba" |
| "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c" |
| "\xc3\x37\xce\x65\xfc\x70\x07\x9e" |
| "\x12\xa9\x40\xd7\x4b\xe2\x79\x10" |
| "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f" |
| "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1" |
| "\x68\xff\x73\x0a\xa1\x15\xac\x43" |
| "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5" |
| "\x29\xc0\x57\xee\x62\xf9\x90\x04" |
| "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76" |
| "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8" |
| "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a" |
| "\xf1\x65\xfc\x93\x07\x9e\x35\xcc" |
| "\x40\xd7\x6e\x05\x79\x10\xa7\x1b" |
| "\xb2\x49\xe0\x54\xeb\x82\x19\x8d" |
| "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff" |
| "\x96\x0a\xa1\x38\xcf\x43\xda\x71" |
| "\x08\x7c\x13\xaa\x1e\xb5\x4c", |
| .psize = 1023, |
| .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15" |
| "\xb8\xff\x97\x9c\xf5\x13\x4f\x31" |
| "\xde\x67\xf7\x24\x73\xcd\x70\x1c" |
| "\x03\x4a\xba\x8a\x87\x49\xfe\xdc" |
| "\x75\x29\x62\x83\xae\x3f\x17\xab" |
| "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca", |
| } |
| }; |
| |
| /* |
| * SHA512 test vectors from from NIST and kerneli |
| */ |
| static const struct hash_testvec sha512_tv_template[] = { |
| { |
| |