#include "fips140_test.h" #define ZEROED_STRING "\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" const cipher_testvec_t aes_cbc_tv_template[] = { { /* From RFC 3602 */ .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", .klen = 16, .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" "\xb4\x22\xda\x80\x2c\x9f\xac\x41", .ptext = "Single block msg", .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" "\x27\x08\x94\x2d\xbe\x77\x18\x1a", .len = 16, .iv_len = 16, }, { .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0" "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a", .klen = 16, .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28" "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", .ptext = "\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", .ctext = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a" "\x75\x86\x60\x2d\x25\x3c\xff\xf9" "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1", .len = 32, .iv_len = 16, }, { /* From NIST SP800-38A */ .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52" "\xc8\x10\xf3\x2b\x80\x90\x79\xe5" "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b", .klen = 24, .iv = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11" "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", .ctext = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" "\x71\x78\x18\x3a\x9f\xa0\x71\xe8" "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4" "\xe5\xe7\x38\x76\x3f\x69\x14\x5a" "\x57\x1b\x24\x20\x12\xfb\x7a\xe0" "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0" "\x08\xb0\xe2\x79\x88\x59\x88\x81" "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd", .len = 64, .iv_len = 16, }, { .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe" "\x2b\x73\xae\xf0\x85\x7d\x77\x81" "\x1f\x35\x2c\x07\x3b\x61\x08\xd7" "\x2d\x98\x10\xa3\x09\x14\xdf\xf4", .klen = 32, .iv = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11" "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", .ctext = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6" "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d" "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d" "\x39\xf2\x33\x69\xa9\xd9\xba\xcf" "\xa5\x30\xe2\x63\x04\x23\x14\x61" "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc" "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b", .len = 64, .iv_len = 16, }, { /* Generated with Crypto++ */ .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55" "\x0F\x32\x55\x78\x9B\xBE\x78\x9B" "\xBE\xE1\x04\x27\xE1\x04\x27\x4A" "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9", .klen = 32, .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47" "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42", .ptext = "\x50\xB9\x22\xAE\x17\x80\x0C\x75" "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03" "\x6C\xF8\x61\xCA\x33\xBF\x28\x91" "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F" "\xAB\x14\x7D\x09\x72\xDB\x44\xD0" "\x39\xA2\x0B\x97\x00\x69\xF5\x5E" "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC" "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A" "\x06\x6F\xD8\x41\xCD\x36\x9F\x08" "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9" "\x22\x8B\x17\x80\xE9\x52\xDE\x47" "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5" "\x3E\xCA\x33\x9C\x05\x91\xFA\x63" "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14" "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2" "\x0B\x74\x00\x69\xD2\x3B\xC7\x30" "\x99\x02\x8E\xF7\x60\xEC\x55\xBE" "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C" "\xD8\x41\xAA\x13\x9F\x08\x71\xFD" "\x66\xCF\x38\xC4\x2D\x96\x22\x8B" "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19" "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7" "\x10\x9C\x05\x6E\xFA\x63\xCC\x35" "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6" "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74" "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02" "\x6B\xF7\x60\xC9\x32\xBE\x27\x90" "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E" "\xAA\x13\x7C\x08\x71\xDA\x43\xCF" "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D" "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB" "\x54\xE0\x49\xB2\x1B\xA7\x10\x79" "\x05\x6E\xD7\x40\xCC\x35\x9E\x07" "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8" "\x21\x8A\x16\x7F\xE8\x51\xDD\x46" "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4" "\x3D\xC9\x32\x9B\x04\x90\xF9\x62" "\xEE\x57\xC0\x29\xB5\x1E\x87\x13" "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1" "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F" "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD" "\x26\xB2\x1B\x84\x10\x79\xE2\x4B" "\xD7\x40\xA9\x12\x9E\x07\x70\xFC" "\x65\xCE\x37\xC3\x2C\x95\x21\x8A" "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18" "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6" "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34" "\xC0\x29\x92\x1E\x87\xF0\x59\xE5" "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73" "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01" "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F" "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D" "\xA9\x12\x7B\x07\x70\xD9\x42\xCE" "\x37\xA0\x09\x95\xFE\x67\xF3\x5C" "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA" "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78" "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06" "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7" "\x20\x89\x15\x7E\xE7\x50\xDC\x45" "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3" "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61" "\xED\x56\xBF\x28\xB4\x1D\x86\x12", .ctext = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F" "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF" "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F" "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8" "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0" "\x11\x15\xFF\x6D\x1E\x82\x04\xA6" "\xB1\x74\xD1\x08\x13\xFD\x90\x7C" "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F" "\x0A\x70\xF1\x88\x07\xCF\x21\x26" "\x40\x40\x8A\xF5\x53\xF7\x24\x4F" "\x83\x38\x43\x5F\x08\x99\xEB\xE3" "\xDC\x02\x64\x67\x50\x6E\x15\xC3" "\x01\x1A\xA0\x81\x13\x65\xA6\x73" "\x71\xA6\x3B\x91\x83\x77\xBE\xFA" "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3" "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F" "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F" "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43" "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40" "\x03\xA8\x6C\x50\x42\x9F\x77\x59" "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99" "\x16\x24\x02\x07\x48\xAE\xF2\x31" "\x34\x0E\xC3\x85\xFE\x1C\x95\x99" "\x87\x58\x98\x8B\xE7\xC6\xC5\x70" "\x73\x81\x07\x7C\x56\x2F\xD8\x1B" "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F" "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98" "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04" "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5" "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD" "\xF1\xE3\x3D\x98\x50\x02\x77\x9E" "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66" "\x20\x02\x23\xDA\xDF\xA0\x89\xF6" "\xD8\xF3\x45\x24\x53\x6F\x16\x77" "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78" "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3" "\x57\xBC\x0B\x9F\x43\x51\x28\x4F" "\x07\x50\x6C\x68\x12\x07\xCF\xFA" "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C" "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD" "\x22\x39\x7B\x16\x03\x01\x69\xAF" "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5" "\x03\xB4\x2F\x51\x8A\x56\x17\x2B" "\x88\x42\x6D\x40\x68\x8F\xD0\x11" "\x19\xF9\x1F\x43\x79\x95\x31\xFA" "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC" "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC" "\x8D\x53\x6E\x72\x68\xA3\xC7\x63" "\x43\x2B\x78\xE0\x04\x29\x8F\x72" "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD" "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D" "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44" "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61" "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC" "\x58\x08\x15\xAB\x12\xAB\x17\x4A" "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB" "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F" "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61" "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD" "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A" "\xE0\x1F\x91\xF8\x82\x96\x2D\x65" "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02", .len = 496, .iv_len = 16, }, }; const cipher_testvec_t aes_ecb_tv_template[] = { { /* From FIPS-197 */ .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .klen = 16, .ptext = "\x00\x11\x22\x33\x44\x55\x66\x77" "\x88\x99\xaa\xbb\xcc\xdd\xee\xff", .ctext = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30" "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a", .len = 16, .iv_len = 0, }, { .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", .klen = 24, .ptext = "\x00\x11\x22\x33\x44\x55\x66\x77" "\x88\x99\xaa\xbb\xcc\xdd\xee\xff", .ctext = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0" "\x6e\xaf\x70\xa0\xec\x0d\x71\x91", .len = 16, .iv_len = 0, }, { .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", .klen = 32, .ptext = "\x00\x11\x22\x33\x44\x55\x66\x77" "\x88\x99\xaa\xbb\xcc\xdd\xee\xff", .ctext = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf" "\xea\xfc\x49\x90\x4b\x49\x60\x89", .len = 16, .iv_len = 0, }, { /* Generated with Crypto++ */ .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32" "\x55\x0F\x32\x55\x78\x9B\xBE\x78" "\x9B\xBE\xE1\x04\x27\xE1\x04\x27" "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6", .klen = 32, .ptext = "\x50\xB9\x22\xAE\x17\x80\x0C\x75" "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03" "\x6C\xF8\x61\xCA\x33\xBF\x28\x91" "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F" "\xAB\x14\x7D\x09\x72\xDB\x44\xD0" "\x39\xA2\x0B\x97\x00\x69\xF5\x5E" "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC" "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A" "\x06\x6F\xD8\x41\xCD\x36\x9F\x08" "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9" "\x22\x8B\x17\x80\xE9\x52\xDE\x47" "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5" "\x3E\xCA\x33\x9C\x05\x91\xFA\x63" "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14" "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2" "\x0B\x74\x00\x69\xD2\x3B\xC7\x30" "\x99\x02\x8E\xF7\x60\xEC\x55\xBE" "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C" "\xD8\x41\xAA\x13\x9F\x08\x71\xFD" "\x66\xCF\x38\xC4\x2D\x96\x22\x8B" "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19" "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7" "\x10\x9C\x05\x6E\xFA\x63\xCC\x35" "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6" "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74" "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02" "\x6B\xF7\x60\xC9\x32\xBE\x27\x90" "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E" "\xAA\x13\x7C\x08\x71\xDA\x43\xCF" "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D" "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB" "\x54\xE0\x49\xB2\x1B\xA7\x10\x79" "\x05\x6E\xD7\x40\xCC\x35\x9E\x07" "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8" "\x21\x8A\x16\x7F\xE8\x51\xDD\x46" "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4" "\x3D\xC9\x32\x9B\x04\x90\xF9\x62" "\xEE\x57\xC0\x29\xB5\x1E\x87\x13" "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1" "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F" "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD" "\x26\xB2\x1B\x84\x10\x79\xE2\x4B" "\xD7\x40\xA9\x12\x9E\x07\x70\xFC" "\x65\xCE\x37\xC3\x2C\x95\x21\x8A" "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18" "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6" "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34" "\xC0\x29\x92\x1E\x87\xF0\x59\xE5" "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73" "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01" "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F" "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D" "\xA9\x12\x7B\x07\x70\xD9\x42\xCE" "\x37\xA0\x09\x95\xFE\x67\xF3\x5C" "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA" "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78" "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06" "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7" "\x20\x89\x15\x7E\xE7\x50\xDC\x45" "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3" "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61" "\xED\x56\xBF\x28\xB4\x1D\x86\x12", .ctext = "\x71\x73\xF7\xDB\x24\x93\x21\x6D" "\x61\x1E\xBB\x63\x42\x79\xDB\x64" "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B" "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F" "\x5E\x06\xF0\x5F\x31\x51\x18\x37" "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1" "\xDD\x8D\x22\x65\x2B\x00\x50\xCE" "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA" "\x78\x69\x7F\xAE\x8F\x8B\x69\x37" "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09" "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8" "\x81\x82\x27\xFA\x45\x9C\x29\xA4" "\x22\x8B\x78\x69\x5B\x46\xF9\x39" "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C" "\x41\x72\x51\x97\x1D\x07\x49\xA0" "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03" "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64" "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA" "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F" "\xE1\x8B\x22\x17\x59\x0C\x47\x89" "\x33\xA1\xD6\x47\x03\x19\x4F\xA8" "\x67\x69\xF0\x5B\xF0\x20\xAD\x06" "\x27\x81\x92\xD8\xC5\xBA\x98\x12" "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD" "\x12\x2F\x07\x32\xEE\x39\xAF\x64" "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E" "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68" "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC" "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F" "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C" "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B" "\x25\xFB\x26\x81\xE0\x2F\xF0\x96" "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64" "\x63\x29\x4C\x8E\x18\x13\xC5\xBF" "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29" "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1" "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1" "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA" "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50" "\x31\xCB\x69\x3F\x96\x15\xD6\xF5" "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10" "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A" "\xDC\x6A\x80\x34\x73\x97\x1B\xC5" "\xCA\x26\x16\x77\x0E\x60\xAB\x89" "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4" "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70" "\x42\x71\x51\x78\x70\xB3\xE0\x3D" "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92" "\x11\x08\x42\x4F\xE5\xAD\x26\x92" "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47" "\x22\xC1\x95\xC1\x63\x7F\xCB\x03" "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA" "\x35\xA2\xFD\x45\x52\x39\x13\x6F" "\xC1\x53\xF3\x53\xDF\x33\x84\xD7" "\xD2\xC8\x37\xB0\x75\xE3\x41\x46" "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5" "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD" "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F" "\x40\x86\x7F\x51\xE1\x11\x9C\xCB" "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF" "\x09\x79\xA0\x43\x5C\x0D\x08\x58" "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9", .len = 496, .iv_len = 0, }, }; const hash_testvec_t sha1_tv_template[] = { { .ptext = "abc", .plen = 3, .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e" "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d", }, { .ptext = "", .plen = 0, .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55" "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09", }, { .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 56, .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae" "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1", }, { .ptext = "\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", .plen = 163, .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20" "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17", }, { .ptext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", .plen = 64, .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82" "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91", }, { .ptext = "\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", .plen = 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 */ const hash_testvec_t sha224_tv_template[] = { { .ptext = "abc", .plen = 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", }, { .ptext = "", .plen = 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", }, { .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 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", }, { .ptext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", .plen = 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", }, { .ptext = "\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", .plen = 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 */ const hash_testvec_t sha256_tv_template[] = { { .ptext = "abc", .plen = 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", }, { .ptext = "", .plen = 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", }, { .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 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", }, { .ptext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", .plen = 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", }, { .ptext = "\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", .plen = 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 */ const hash_testvec_t sha384_tv_template[] = { { .ptext= "abc", .plen = 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", }, { .ptext = "", .plen = 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", }, { .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 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", }, { .ptext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", .plen = 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", }, { .ptext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd" "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", .plen = 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", }, { .ptext = "\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", .plen = 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 */ const hash_testvec_t sha512_tv_template[] = { { .ptext = "abc", .plen = 3, .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba" "\xcc\x41\x73\x49\xae\x20\x41\x31" "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2" "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a" "\x21\x92\x99\x2a\x27\x4f\xc1\xa8" "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd" "\x45\x4d\x44\x23\x64\x3c\xe8\x0e" "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f", }, { .ptext = "", .plen = 0, .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd" "\xf1\x54\x28\x50\xd6\x6d\x80\x07" "\xd6\x20\xe4\x05\x0b\x57\x15\xdc" "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce" "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0" "\xff\x83\x18\xd2\x87\x7e\xec\x2f" "\x63\xb9\x31\xbd\x47\x41\x7a\x81" "\xa5\x38\x32\x7a\xf9\x27\xda\x3e", }, { .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 56, .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a" "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16" "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8" "\x27\x9b\xe3\x31\xa7\x03\xc3\x35" "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9" "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0" "\x31\xad\x85\xc7\xa7\x1d\xd7\x03" "\x54\xec\x63\x12\x38\xca\x34\x45", }, { .ptext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", .plen = 112, .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda" "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f" "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1" "\x72\x99\xae\xad\xb6\x88\x90\x18" "\x50\x1d\x28\x9e\x49\x00\xf7\xe4" "\x33\x1b\x99\xde\xc4\xb5\x43\x3a" "\xc7\xd3\x29\xee\xb6\xdd\x26\x54" "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09", }, { .ptext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd" "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", .plen = 104, .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11" "\x33\xb6\x89\x81\x21\xf1\xcf\x3d" "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c" "\x52\x57\xcf\x06\x99\x11\xf7\x5d" "\x8f\x58\x31\xb5\x6e\xbf\xda\x67" "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe" "\x2b\x28\x70\xf7\x42\xa5\x80\xd8" "\xed\xb4\x19\x87\x23\x28\x50\xc9", }, { .ptext = "\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", .plen = 1023, .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa" "\x13\x39\xf3\x01\x7a\xfa\xe5\x41" "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0" "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb" "\x1c\x19\xde\xe2\x75\xdc\x34\x64" "\x5f\x35\x9c\x61\x2f\x10\xf9\xec" "\x59\xca\x9d\xcc\x25\x0c\x43\xba" "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee", } }; const hash_testvec_t hmac_sha1_tv_template[] = { { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .klen = 20, .ptext = "Hi There", .plen = 8, .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64" "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1" "\x46\xbe", }, { .key = "Jefe", .klen = 4, .ptext = "what do ya want for nothing?", .plen = 28, .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74" "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", .klen = 20, .ptext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", .plen = 50, .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3" "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3", }, { .key = "\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", .klen = 25, .ptext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd", .plen = 50, .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84" "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda", }, { .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", .klen = 20, .ptext = "Test With Truncation", .plen = 20, .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2" "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa", .klen = 80, .ptext = "Test Using Larger Than Block-Size Key - Hash Key First", .plen = 54, .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70" "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa", .klen = 80, .ptext = "Test Using Larger Than Block-Size Key and Larger Than One " "Block-Size Data", .plen = 73, .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b" "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91", }, }; /* * SHA224 HMAC test vectors from RFC4231 */ const hash_testvec_t hmac_sha224_tv_template[] = { { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b", .klen = 20, /* ("Hi There") */ .ptext = "\x48\x69\x20\x54\x68\x65\x72\x65", .plen = 8, .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19" "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f" "\x47\xb4\xb1\x16\x99\x12\xba\x4f" "\x53\x68\x4b\x22", }, { .key = "Jefe", .klen = 4, /* ("what do ya want for nothing?") */ .ptext = "\x77\x68\x61\x74\x20\x64\x6f\x20" "\x79\x61\x20\x77\x61\x6e\x74\x20" "\x66\x6f\x72\x20\x6e\x6f\x74\x68" "\x69\x6e\x67\x3f", .plen = 28, .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf" "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f" "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00" "\x8f\xd0\x5e\x44", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa", .klen = 131, /* ("Test Using Larger Than Block-Size Key - Hash Key First") */ .ptext = "\x54\x65\x73\x74\x20\x55\x73\x69" "\x6e\x67\x20\x4c\x61\x72\x67\x65" "\x72\x20\x54\x68\x61\x6e\x20\x42" "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a" "\x65\x20\x4b\x65\x79\x20\x2d\x20" "\x48\x61\x73\x68\x20\x4b\x65\x79" "\x20\x46\x69\x72\x73\x74", .plen = 54, .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad" "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2" "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27" "\x3f\xa6\x87\x0e", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa", .klen = 131, /* ("This is a test using a larger than block-size key and a") (" larger than block-size data. The key needs to be") (" hashed before being used by the HMAC algorithm.") */ .ptext = "\x54\x68\x69\x73\x20\x69\x73\x20" "\x61\x20\x74\x65\x73\x74\x20\x75" "\x73\x69\x6e\x67\x20\x61\x20\x6c" "\x61\x72\x67\x65\x72\x20\x74\x68" "\x61\x6e\x20\x62\x6c\x6f\x63\x6b" "\x2d\x73\x69\x7a\x65\x20\x6b\x65" "\x79\x20\x61\x6e\x64\x20\x61\x20" "\x6c\x61\x72\x67\x65\x72\x20\x74" "\x68\x61\x6e\x20\x62\x6c\x6f\x63" "\x6b\x2d\x73\x69\x7a\x65\x20\x64" "\x61\x74\x61\x2e\x20\x54\x68\x65" "\x20\x6b\x65\x79\x20\x6e\x65\x65" "\x64\x73\x20\x74\x6f\x20\x62\x65" "\x20\x68\x61\x73\x68\x65\x64\x20" "\x62\x65\x66\x6f\x72\x65\x20\x62" "\x65\x69\x6e\x67\x20\x75\x73\x65" "\x64\x20\x62\x79\x20\x74\x68\x65" "\x20\x48\x4d\x41\x43\x20\x61\x6c" "\x67\x6f\x72\x69\x74\x68\x6d\x2e", .plen = 152, .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02" "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd" "\x94\x67\x70\xdb\x9c\x2b\x95\xc9" "\xf6\xf5\x65\xd1", }, }; /* * HMAC-SHA256 test vectors from * draft-ietf-ipsec-ciph-sha-256-01.txt */ const hash_testvec_t hmac_sha256_tv_template[] = { { .key = "\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\x20", .klen = 32, .ptext = "abc", .plen = 3, .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a" "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a" "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66" "\x92\x75\x90\x21\xcf\xab\x81\x81", }, { .key = "\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\x20", .klen = 32, .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 56, .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08" "\x18\x4b\xa7\x31\x31\xc5\x3c\xae" "\xe6\x98\xe3\x61\x19\x42\x11\x49" "\xea\x8c\x71\x24\x56\x69\x7d\x30", }, { .key = "\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\x20", .klen = 32, .ptext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", .plen = 112, .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34" "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab" "\x73\xac\xf0\xfd\x06\x04\x47\xa5" "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3", }, { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b", .klen = 32, .ptext = "Hi There", .plen = 8, .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6" "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5" "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c" "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7", }, { .key = "Jefe", .klen = 4, .ptext = "what do ya want for nothing?", .plen = 28, .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e" "\x6a\x04\x24\x26\x08\x95\x75\xc7" "\x5a\x00\x3f\x08\x9d\x27\x39\x83" "\x9d\xec\x58\xb9\x64\xec\x38\x43", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa", .klen = 32, .ptext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", .plen = 50, .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea" "\x91\xe5\x3a\xba\x30\x92\xf9\x62" "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc" "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0", }, { .key = "\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\x20" "\x21\x22\x23\x24\x25", .klen = 37, .ptext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd", .plen = 50, .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74" "\x4c\x66\xde\xe0\xf8\xf0\x74\x55" "\x6e\xc4\xaf\x55\xef\x07\x99\x85" "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17", }, { .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c" "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c" "\x0c\x0c\x0c\x0c\x0c\x0c", .klen = 32, .ptext = "Test With Truncation", .plen = 20, .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b" "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17" "\xd4\xf5\x89\x66\x8a\x58\x7b\x27" "\x00\xa9\xc9\x7c\x11\x93\xcf\x42", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa", .klen = 80, .ptext = "Test Using Larger Than Block-Size Key - Hash Key First", .plen = 54, .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09" "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb" "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e" "\x7d\xdd\x39\x09\x1b\x32\x35\x2f", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa", .klen = 80, .ptext = "Test Using Larger Than Block-Size Key and Larger Than " "One Block-Size Data", .plen = 73, .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3" "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8" "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc" "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6", }, }; const hash_testvec_t hmac_sha384_tv_template[] = { { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b", .klen = 20, .ptext = "Hi There", .plen = 8, .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62" "\x6b\x08\x25\xf4\xab\x46\x90\x7f" "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6" "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c" "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f" "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6", }, { .key = "Jefe", .klen = 4, .ptext = "what do ya want for nothing?", .plen = 28, .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31" "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b" "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47" "\xe4\x2e\xc3\x73\x63\x22\x44\x5e" "\x8e\x22\x40\xca\x5e\x69\xe2\xc7" "\x8b\x32\x39\xec\xfa\xb2\x16\x49", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa", .klen = 131, .ptext = "Test Using Larger Than Block-Siz" "e Key - Hash Key First", .plen = 54, .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90" "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4" "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f" "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6" "\x0c\x2e\xf6\xab\x40\x30\xfe\x82" "\x96\x24\x8d\xf1\x63\xf4\x49\x52", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa", .klen = 131, .ptext = "This is a test u" "sing a larger th" "an block-size ke" "y and a larger t" "han block-size d" "ata. The key nee" "ds to be hashed " "before being use" "d by the HMAC al" "gorithm.", .plen = 152, .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d" "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c" "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a" "\xdc\xce\xbb\x82\x46\x1e\x99\xc5" "\xa6\x78\xcc\x31\xe7\x99\x17\x6d" "\x38\x60\xe6\x11\x0c\x46\x52\x3e", }, }; /* * SHA512 HMAC test vectors from RFC4231 */ const hash_testvec_t hmac_sha512_tv_template[] = { { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b", .klen = 20, .ptext = "Hi There", .plen = 8, .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d" "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0" "\x23\x79\xf4\xe2\xce\x4e\xc2\x78" "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde" "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02" "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4" "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70" "\x2e\x69\x6c\x20\x3a\x12\x68\x54", }, { .key = "Jefe", .klen = 4, .ptext = "what do ya want for nothing?", .plen = 28, .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2" "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3" "\x87\xbd\x64\x22\x2e\x83\x1f\xd6" "\x10\x27\x0c\xd7\xea\x25\x05\x54" "\x97\x58\xbf\x75\xc0\x5a\x99\x4a" "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd" "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b" "\x63\x6e\x07\x0a\x38\xbc\xe7\x37", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa", .klen = 131, .ptext = "Test Using Large" "r Than Block-Siz" "e Key - Hash Key" " First", .plen = 54, .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb" "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4" "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1" "\x12\x1b\x01\x37\x83\xf8\xf3\x52" "\x6b\x56\xd0\x37\xe0\x5f\x25\x98" "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52" "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec" "\x8b\x91\x5a\x98\x5d\x78\x65\x98", }, { .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" "\xaa\xaa\xaa", .klen = 131, .ptext = "This is a test u" "sing a larger th" "an block-size ke" "y and a larger t" "han block-size d" "ata. The key nee" "ds to be hashed " "before being use" "d by the HMAC al" "gorithm.", .plen = 152, .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba" "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd" "\xde\xbd\x71\xf8\x86\x72\x89\x86" "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44" "\xb6\x02\x2c\xac\x3c\x49\x82\xb1" "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15" "\x13\x46\x76\xfb\x6d\xe0\x44\x60" "\x65\xc9\x74\x40\xfa\x8c\x6a\x58", }, }; const aead_testvec_t aes_gcm_tv_template[] = { { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ .key = ZEROED_STRING, .klen = 16, .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61" "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a", .rlen = 16, }, { .key = ZEROED_STRING, .klen = 16, .input = ZEROED_STRING, .ilen = 16, .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92" "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78" "\xab\x6e\x47\xd4\x2c\xec\x13\xbd" "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf", .rlen = 32, }, { .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" "\x6d\x6a\x8f\x94\x67\x30\x83\x08", .klen = 16, .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" "\xde\xca\xf8\x88", .iv_len = 12, .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" "\x86\xa7\xa9\x53\x15\x34\xf7\xda" "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" "\x1c\x3c\x0c\x95\x95\x68\x09\x53" "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" "\xba\x63\x7b\x39\x1a\xaf\xd2\x55", .ilen = 64, .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24" "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c" "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0" "\x35\xc1\x7e\x23\x29\xac\xa1\x2e" "\x21\xd5\x14\xb2\x54\x66\x93\x1c" "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05" "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97" "\x3d\x58\xe0\x91\x47\x3f\x59\x85" "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6" "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4", .rlen = 80, }, { .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" "\x6d\x6a\x8f\x94\x67\x30\x83\x08", .klen = 16, .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" "\xde\xca\xf8\x88", .iv_len = 12, .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" "\x86\xa7\xa9\x53\x15\x34\xf7\xda" "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" "\x1c\x3c\x0c\x95\x95\x68\x09\x53" "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" "\xba\x63\x7b\x39", .ilen = 60, .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef" "\xfe\xed\xfa\xce\xde\xad\xbe\xef" "\xab\xad\xda\xd2", .alen = 20, .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24" "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c" "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0" "\x35\xc1\x7e\x23\x29\xac\xa1\x2e" "\x21\xd5\x14\xb2\x54\x66\x93\x1c" "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05" "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97" "\x3d\x58\xe0\x91" "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb" "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47", .rlen = 76, }, { .key = ZEROED_STRING, .klen = 24, .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b" "\xa0\x0e\xd1\xf3\x12\x57\x24\x35", .rlen = 16, }, { .key = ZEROED_STRING, .klen = 24, .input = ZEROED_STRING, .ilen = 16, .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41" "\x1c\x26\x7e\x43\x84\xb0\xf6\x00" "\x2f\xf5\x8d\x80\x03\x39\x27\xab" "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb", .rlen = 32, }, { .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" "\x6d\x6a\x8f\x94\x67\x30\x83\x08" "\xfe\xff\xe9\x92\x86\x65\x73\x1c", .klen = 24, .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" "\xde\xca\xf8\x88", .iv_len = 12, .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" "\x86\xa7\xa9\x53\x15\x34\xf7\xda" "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" "\x1c\x3c\x0c\x95\x95\x68\x09\x53" "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" "\xba\x63\x7b\x39\x1a\xaf\xd2\x55", .ilen = 64, .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41" "\xeb\x06\xfa\xc4\x87\x2a\x27\x57" "\x85\x9e\x1c\xea\xa6\xef\xd9\x84" "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c" "\x7d\x77\x3d\x00\xc1\x44\xc5\x25" "\xac\x61\x9d\x18\xc8\x4a\x3f\x47" "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9" "\xcc\xda\x27\x10\xac\xad\xe2\x56" "\x99\x24\xa7\xc8\x58\x73\x36\xbf" "\xb1\x18\x02\x4d\xb8\x67\x4a\x14", .rlen = 80, }, { .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" "\x6d\x6a\x8f\x94\x67\x30\x83\x08" "\xfe\xff\xe9\x92\x86\x65\x73\x1c", .klen = 24, .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" "\xde\xca\xf8\x88", .iv_len = 12, .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" "\x86\xa7\xa9\x53\x15\x34\xf7\xda" "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" "\x1c\x3c\x0c\x95\x95\x68\x09\x53" "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" "\xba\x63\x7b\x39", .ilen = 60, .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef" "\xfe\xed\xfa\xce\xde\xad\xbe\xef" "\xab\xad\xda\xd2", .alen = 20, .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41" "\xeb\x06\xfa\xc4\x87\x2a\x27\x57" "\x85\x9e\x1c\xea\xa6\xef\xd9\x84" "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c" "\x7d\x77\x3d\x00\xc1\x44\xc5\x25" "\xac\x61\x9d\x18\xc8\x4a\x3f\x47" "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9" "\xcc\xda\x27\x10" "\x25\x19\x49\x8e\x80\xf1\x47\x8f" "\x37\xba\x55\xbd\x6d\x27\x61\x8c", .rlen = 76, }, { .key = ZEROED_STRING, .klen = 32, .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9" "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b", .rlen = 16, } }; const drbg_testvec_t drbg_pr_hmac_sha256_tv_template[] = { { .entropy = "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a" "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96" "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46" "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab", .entropylen = 48, .entpra = "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92" "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46" "\xe2\x9a\x29\x51\x81\x56\x9f\x54", .entprb = "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc" "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65" "\x8a\x2a\x77\xa8\x69\x90\x89\xf4", .entprlen = 32, .expected = "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2" "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1" "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4" "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf" "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc" "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8" "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b" "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e" "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22" "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc" "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f", .expectedlen = 128, .addtla = "\x00", .addtlb = "\x00", .addtllen = 0, .pers = "\x00", .perslen = 0, }, { .entropy = "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f" "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f" "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05" "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda", .entropylen = 48, .entpra = "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4" "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26" "\x46\xd9\x26\xa2\x19\xd4\x94\x43", .entprb = "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79" "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98" "\x51\x78\x72\xb2\x79\xfd\x2c\xff", .entprlen = 32, .expected = "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7" "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda" "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa" "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40" "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda" "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37" "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70" "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b" "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5" "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd" "\xcd\x66\xb5\x01\x69\x66\xa0\x3c", .expectedlen = 128, .addtla = "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3" "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56" "\x6d\x99\x3b\xc6\x58\xda\x03\xf6", .addtlb = "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c" "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44" "\xc6\x03\xa2\xfb\x13\x20\x19\xb7", .addtllen = 32, .pers = "\x00", .perslen = 0, }, { .entropy = "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89" "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf" "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20" "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67", .entropylen = 48, .entpra = "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79" "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57" "\x20\x28\xad\xf2\x60\xd7\xcd\x45", .entprb = "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71" "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66" "\x1f\xfa\x74\xd3\xac\xa6\x74\x60", .entprlen = 32, .expected = "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99" "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3" "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75" "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61" "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88" "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e" "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c" "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce" "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc" "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc" "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3", .expectedlen = 128, .addtla = "\x00", .addtlb = "\x00", .addtllen = 0, .pers = "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f" "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce" "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa", .perslen = 32, }, { .entropy = "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd" "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01" "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15" "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb", .entropylen = 48, .entpra = "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a" "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96" "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6", .entprb = "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2" "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e" "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1", .entprlen = 32, .expected = "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14" "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6" "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7" "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77" "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5" "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6" "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1" "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40" "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8" "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72" "\xda\x3f\xad\x2b\xba\x00\x6b\xd1", .expectedlen = 128, .addtla = "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03" "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6" "\x86\x88\x55\x28\xc1\x69\xdd\x76", .addtlb = "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7" "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa" "\x00\x99\x2a\xdd\x0a\x00\x50\x82", .addtllen = 32, .pers = "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8" "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda" "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f", .perslen = 32, }, }; const drbg_testvec_t drbg_nopr_hmac_sha256_tv_template[] = { { .entropy = "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c" "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e" "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c" "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8", .entropylen = 48, .expected = "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75" "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6" "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97" "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60" "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf" "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99" "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19" "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68" "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0" "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd" "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8", .expectedlen = 128, .addtla = "\0x00", .addtlb = "\0x00", .addtllen = 0, .pers = "\0x00", .perslen = 0, }, { .entropy = "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94" "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15" "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4" "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed", .entropylen = 48, .expected = "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5" "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf" "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d" "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6" "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16" "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62" "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d" "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4" "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec" "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f" "\x50\x9a\x8c\x85\x90\x87\x03\x9c", .expectedlen = 128, .addtla = "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d" "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf" "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b", .addtlb = "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9" "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14" "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0", .addtllen = 32, .pers = "\0x00", .perslen = 0, }, { .entropy = "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf" "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54" "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf" "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e", .entropylen = 48, .expected = "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81" "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37" "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10" "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61" "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28" "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f" "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07" "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66" "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2" "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29" "\x10\x37\x41\x03\x0c\xcc\x3a\x56", .expectedlen = 128, .addtla = "\0x00", .addtlb = "\0x00", .addtllen = 0, .pers = "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37" "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58" "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9", .perslen = 32, }, { .entropy = "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78" "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11" "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb" "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec", .entropylen = 48, .expected = "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0" "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37" "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae" "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0" "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad" "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82" "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7" "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4" "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49" "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30" "\x35\x24\xcc\x9c\xc5\xea\x54\xa1", .expectedlen = 128, .addtla = "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96" "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62" "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b", .addtlb = "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2" "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25" "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1", .addtllen = 32, .pers = "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8" "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15" "\x36\x60\x3b\xca\x37\xc9\xee\x29", .perslen = 32, }, }; /* https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Key-Derivation */ const kbkdf_testvec_t kbkdf_hmac_sha512_ctr_nist_template[] = { { .mode = 1, /* mode CTRLOCATION=BEFORE_FIXED */ .rlen = 4, /* mode KDF_RLEN_32BIT */ .KiLength = 64, .LabelLength = 60, .ContextLength = 0, .L = 16, .Ki = "\xdd\x5d\xbd\x45\x59\x3e\xe2\xac\x13\x97\x48\xe7\x64\x5b\x45\x0f" "\x22\x3d\x2f\xf2\x97\xb7\x3f\xd7\x1c\xbc\xeb\xe7\x1d\x41\x65\x3c" "\x95\x0b\x88\x50\x0d\xe5\x32\x2d\x99\xef\x18\xdf\xdd\x30\x42\x82" "\x94\xc4\xb3\x09\x4f\x4c\x95\x43\x34\xe5\x93\xbd\x98\x2e\xc6\x14", .Label = "\xb5\x0b\x0c\x96\x3c\x6b\x30\x34\xb8\xcf\x19\xcd\x3f\x5c\x4e\xbe" "\x4f\x49\x85\xaf\x0c\x03\xe5\x75\xdb\x62\xe6\xfd\xf1\xec\xfe\x4f" "\x28\xb9\x5d\x7c\xe1\x6d\xf8\x58\x43\x24\x6e\x15\x57\xce\x95\xbb" "\x26\xcc\x9a\x21\x97\x4b\xbd\x2e\xb6\x9e\x83\x55", .Ko = "\xe5\x99\x3b\xf9\xbd\x2a\xa1\xc4\x57\x46\x04\x2e\x12\x59\x81\x55", .Context = "", }, { .mode = 1, /* mode CTRLOCATION=BEFORE_FIXED */ .rlen = 1, /* mode KDF_RLEN_08BIT */ .KiLength = 64, .LabelLength = 60, .ContextLength = 0, .L = 16, .Ki = "\x6e\xa2\xc3\x85\xbb\x3e\x7b\xba\xfc\x22\x25\xce\xe1\xd3\xee\x10" "\x3c\xe3\x00\xc1\xfd\xf0\x33\xd0\xc1\xe9\x9c\x57\xe6\xa5\x96\xe0" "\x37\x02\x08\x38\xe8\x57\xc0\x43\x40\x40\xb5\x8a\x5c\xa5\x41\x0b" "\xe6\x72\xb8\x88\xef\x99\x55\xbd\xd5\x4e\xb6\xa6\x74\x16\xff\x6a", .Label = "\xbe\x11\x99\x01\xed\x86\x79\xb2\x43\x50\x8b\x97\x66\x3f\x35\xda" "\x32\x27\x74\xd7\xd2\x01\x2d\x65\x57\xda\x66\x57\xc1\x17\x6a\x11" "\x5e\xbc\x73\xb0\xf1\xbf\xa1\xdb\xa6\xb8\xc3\xb1\x24\xf0\xa4\x7c" "\xff\x29\x98\xb2\x30\xc9\x55\xb0\xea\x80\x97\x84", .Ko = "\xe0\x75\x5f\xa6\xf1\x16\xef\x7a\x8e\x83\x61\xf4\x7f\xd5\x75\x11", .Context = "", }, { .mode = 3, /* mode CTRLOCATION=AFTER_FIXED */ .rlen = 2, /* RLEN=16_BITS */ .KiLength = 64, .LabelLength = 60, .ContextLength = 0, .L = 40, /* bytes */ .Ki = "\xf1\xb3\x63\x30\x29\xed\xc7\x40\xc4\xa7\xc6\x31\xf5\x0e\x8d\x84" "\x0f\x00\x55\xb3\xe6\x93\xf2\x4a\x52\x64\x10\x2a\xba\xa9\xbc\x53" "\x43\x1e\x77\x9d\xf4\xd3\x81\x2d\x6e\xa5\xd3\x26\xbe\xae\xa0\x6d" "\xae\x03\xfa\xc0\x7a\x64\xa4\xa5\xe1\x3f\xff\xb3\x46\xcf\xb9\x06", .Label = "\xab\x2d\x19\x98\xab\x8d\x84\x91\xf5\xcf\xf5\x52\x89\x5d\x32\x36" "\x7f\x20\xd0\xf1\x43\xda\x80\x59\x2a\x01\x48\xad\x55\x4e\xa6\x35" "\xef\x53\xf8\xf9\x55\xaa\x19\x89\x31\x54\x56\xf6\x68\x4b\xfe\x6d" "\xd3\x7b\x42\x8a\x00\x68\x9d\x5d\x54\x87\x9f\x17", .Ko = "\x54\xb0\xb3\xde\xbf\xa2\x34\x7f\x07\x6b\x96\xda\x30\x4d\x95\xdb" "\x6f\x70\x5a\xfd\x23\x3c\x07\x6b\x60\xa4\x9c\xca\xe9\x18\xba\xfa" "\xde\x97\x1d\x7c\xf6\x9b\x53\xac", .Context = "", }, { .mode = 2, /* CTRLOCATION=MIDDLE_FIXED */ .rlen = 3, /* RLEN=24_BITS */ .KiLength = 64, .LabelLength = 50, .ContextLength = 10, .L = 40, .Ki = "\xb6\xac\x4e\xf4\xb0\x13\x90\xab\xc2\x9a\xc3\x6f\x0b\x16\xa2\xa0" "\x13\x8f\xf2\xb2\x8c\x03\xeb\x70\x7d\x3a\x5f\x52\x1f\xf0\xdc\x14" "\x0a\x84\x9c\x54\x61\xf6\x73\xb2\x3c\x0e\xcd\x3b\x8a\x0d\x1c\xad" "\x8f\xc4\x13\x05\x39\x1a\x93\xc3\x4f\x36\xd8\xd8\xca\xd4\xbd\x99", .Label = "\x40\x38\xda\x1b\x12\x21\x03\xfc\x77\xc9\x42\x11\x4c\x33\x0d\x7e" "\xc8\x89\x3d\x0b\xbc\x27\xe3\x56\x4c\x40\xdd\x09\x67\xce\x34\x19" "\xbe\xcb\x05\x75\xc7\x37\xdb\xbd\x2e\xb1\xe1\xf4\x23\x28\x86\x4c" "\x93\xf3", .Ko = "\x8e\x75\xfa\x13\xf2\xb1\x56\x22\x8a\x37\x8b\xc0\xc3\x06\x30\x7d" "\xb3\x19\xda\x94\x9c\x92\x56\xdc\x84\xb5\xe0\x96\xdf\x4e\xb9\x79" "\xf4\xb4\xca\x14\xe7\x47\xae\xd3", .Context = "\x38\x24\x1e\x63\x70\x9b\x3f\x22\x10\x0c", }, }; const cipher_test_suite_t aes_cbc_tv = { aes_cbc_tv_template, sizeof(aes_cbc_tv_template)/sizeof(aes_cbc_tv_template[0]), }; const cipher_test_suite_t aes_ecb_tv = { aes_ecb_tv_template, sizeof(aes_ecb_tv_template)/sizeof(aes_ecb_tv_template[0]), }; const hash_test_suite_t sha1_tv = { sha1_tv_template, sizeof(sha1_tv_template)/sizeof(sha1_tv_template[0]), }; const hash_test_suite_t sha224_tv = { sha224_tv_template, sizeof(sha224_tv_template)/sizeof(sha224_tv_template[0]), }; const hash_test_suite_t sha256_tv = { sha256_tv_template, sizeof(sha256_tv_template)/sizeof(sha256_tv_template[0]), }; const hash_test_suite_t sha384_tv = { sha384_tv_template, sizeof(sha384_tv_template)/sizeof(sha384_tv_template[0]), }; const hash_test_suite_t sha512_tv = { sha512_tv_template, sizeof(sha512_tv_template)/sizeof(sha512_tv_template[0]), }; const hash_test_suite_t hmac_sha1_tv = { hmac_sha1_tv_template, sizeof(hmac_sha1_tv_template)/sizeof(hmac_sha1_tv_template[0]), }; const hash_test_suite_t hmac_sha224_tv = { hmac_sha224_tv_template, sizeof(hmac_sha224_tv_template)/sizeof(hmac_sha224_tv_template[0]), }; const hash_test_suite_t hmac_sha256_tv = { hmac_sha256_tv_template, sizeof(hmac_sha256_tv_template)/sizeof(hmac_sha256_tv_template[0]), }; const hash_test_suite_t hmac_sha384_tv = { hmac_sha384_tv_template, sizeof(hmac_sha384_tv_template)/sizeof(hmac_sha384_tv_template[0]), }; const hash_test_suite_t hmac_sha512_tv = { hmac_sha512_tv_template, sizeof(hmac_sha512_tv_template)/sizeof(hmac_sha512_tv_template[0]), }; const aead_test_suite_t aes_gcm_tv = { aes_gcm_tv_template, sizeof(aes_gcm_tv_template)/sizeof(aes_gcm_tv_template[0]), }; const drbg_test_suite_t drbg_pr_hmac_sha256_tv = { drbg_pr_hmac_sha256_tv_template, sizeof(drbg_pr_hmac_sha256_tv_template)/sizeof(drbg_pr_hmac_sha256_tv_template[0]), }; const drbg_test_suite_t drbg_nopr_hmac_sha256_tv = { drbg_nopr_hmac_sha256_tv_template, sizeof(drbg_nopr_hmac_sha256_tv_template)/sizeof(drbg_nopr_hmac_sha256_tv_template[0]), }; const kbkdf_test_suite_t kbkdf_hmac_sha512_ctr_nist_tv = { kbkdf_hmac_sha512_ctr_nist_template, sizeof(kbkdf_hmac_sha512_ctr_nist_template)/sizeof(kbkdf_hmac_sha512_ctr_nist_template[0]), };