1*f0865ec9SKyle Evans /* 2*f0865ec9SKyle Evans * Copyright (C) 2022 - This file is part of libecc project 3*f0865ec9SKyle Evans * 4*f0865ec9SKyle Evans * Authors: 5*f0865ec9SKyle Evans * Arnaud EBALARD <arnaud.ebalard@ssi.gouv.fr> 6*f0865ec9SKyle Evans * Ryad BENADJILA <ryadbenadjila@gmail.com> 7*f0865ec9SKyle Evans * 8*f0865ec9SKyle Evans * This software is licensed under a dual BSD and GPL v2 license. 9*f0865ec9SKyle Evans * See LICENSE file at the root folder of the project. 10*f0865ec9SKyle Evans */ 11*f0865ec9SKyle Evans #ifndef __DBIGN_TEST_VECTORS_H__ 12*f0865ec9SKyle Evans #define __DBIGN_TEST_VECTORS_H__ 13*f0865ec9SKyle Evans 14*f0865ec9SKyle Evans #if defined(WITH_HASH_BELT_HASH) && defined(WITH_CURVE_BIGN256V1) 15*f0865ec9SKyle Evans /************************************************/ 16*f0865ec9SKyle Evans static const u8 dbign_1_test_vectors_priv_key[] = { 17*f0865ec9SKyle Evans 0x69, 0xe2, 0x73, 0xc2, 0x5f, 0x23, 0x79, 0x0c, 0x9e, 0x42, 0x32, 0x07, 0xed, 0x1f, 0x28, 0x34, 0x18, 0xf2, 0x74, 0x9c, 0x32, 0xf0, 0x33, 0x45, 0x67, 0x39, 0x73, 0x4b, 0xb8, 0xb5, 0x66, 0x1f, 18*f0865ec9SKyle Evans }; 19*f0865ec9SKyle Evans static const u8 dbign_1_test_vectors_expected_sig[] = { 20*f0865ec9SKyle Evans 0x19, 0xd3, 0x2b, 0x7e, 0x01, 0xe2, 0x5b, 0xae, 0x4a, 0x70, 0xeb, 0x6b, 0xca, 0x42, 0x60, 0x2c, 21*f0865ec9SKyle Evans 0xca, 0x6a, 0x13, 0x94, 0x44, 0x51, 0xbc, 0xc5, 0xd4, 0xc5, 0x4c, 0xfd, 0x87, 0x37, 0x61, 0x9c, 0x32, 0x8b, 0x8a, 0x58, 0xfb, 0x9c, 0x68, 0xfd, 0x17, 0xd5, 0x69, 0xf7, 0xd0, 0x64, 0x95, 0xfb, 22*f0865ec9SKyle Evans }; 23*f0865ec9SKyle Evans static const u8 dbign_1_test_vectors_adata[] = { 24*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x00, 25*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x1F, 0x51, 26*f0865ec9SKyle Evans }; 27*f0865ec9SKyle Evans 28*f0865ec9SKyle Evans static const ec_test_case dbign_1_test_case = { 29*f0865ec9SKyle Evans .name = "DBIGN-BELT-HASH/dbign256v1 1", 30*f0865ec9SKyle Evans .ec_str_p = &bign256v1_str_params, 31*f0865ec9SKyle Evans .priv_key = dbign_1_test_vectors_priv_key, 32*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_1_test_vectors_priv_key), 33*f0865ec9SKyle Evans .nn_random = NULL, 34*f0865ec9SKyle Evans .hash_type = BELT_HASH, 35*f0865ec9SKyle Evans .msg = "\xB1\x94\xBA\xC8\x0A\x08\xF5\x3B\x36\x6D\x00\x8E\x58", 36*f0865ec9SKyle Evans .msglen = 13, 37*f0865ec9SKyle Evans .sig_type = DBIGN, 38*f0865ec9SKyle Evans .exp_sig = dbign_1_test_vectors_expected_sig, 39*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_1_test_vectors_expected_sig), 40*f0865ec9SKyle Evans .adata = dbign_1_test_vectors_adata, 41*f0865ec9SKyle Evans .adata_len = sizeof(dbign_1_test_vectors_adata) 42*f0865ec9SKyle Evans }; 43*f0865ec9SKyle Evans 44*f0865ec9SKyle Evans /********************************************************************/ 45*f0865ec9SKyle Evans static const u8 dbign_2_test_vectors_priv_key[] = { 46*f0865ec9SKyle Evans 0x69, 0xe2, 0x73, 0xc2, 0x5f, 0x23, 0x79, 0x0c, 0x9e, 0x42, 0x32, 0x07, 0xed, 0x1f, 0x28, 0x34, 0x18, 0xf2, 0x74, 0x9c, 0x32, 0xf0, 0x33, 0x45, 0x67, 0x39, 0x73, 0x4b, 0xb8, 0xb5, 0x66, 0x1f, 47*f0865ec9SKyle Evans }; 48*f0865ec9SKyle Evans static const u8 dbign_2_test_vectors_expected_sig[] = { 49*f0865ec9SKyle Evans 0x2a, 0x0e, 0xf2, 0x4b, 0xa6, 0x2d, 0x63, 0xa3, 0x34, 0x10, 0x3f, 0x47, 0x0d, 0xc7, 0x55, 0xeb, 50*f0865ec9SKyle Evans 0x2c, 0x51, 0xba, 0x3d, 0x57, 0xaa, 0x4e, 0xfe, 0xd5, 0x61, 0x76, 0x19, 0x04, 0xf9, 0x39, 0x9e, 0x0f, 0xf6, 0x18, 0x04, 0xfb, 0x46, 0xec, 0xa1, 0x74, 0xe1, 0xdd, 0xd9, 0xe5, 0x5e, 0x25, 0x64, 51*f0865ec9SKyle Evans }; 52*f0865ec9SKyle Evans static const u8 dbign_2_test_vectors_adata[] = { 53*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x17, 54*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x1F, 0x51, 55*f0865ec9SKyle Evans 0xBE, 0x32, 0x97, 0x13, 0x43, 0xFC, 0x9A, 0x48, 0xA0, 0x2A, 0x88, 0x5F, 0x19, 0x4B, 0x09, 0xA1, 0x7E, 0xCD, 0xA4, 0xD0, 0x15, 0x44, 0xAF, 56*f0865ec9SKyle Evans }; 57*f0865ec9SKyle Evans 58*f0865ec9SKyle Evans static const ec_test_case dbign_2_test_case = { 59*f0865ec9SKyle Evans .name = "DBIGN-BELT-HASH/dbign256v1 2", 60*f0865ec9SKyle Evans .ec_str_p = &bign256v1_str_params, 61*f0865ec9SKyle Evans .priv_key = dbign_2_test_vectors_priv_key, 62*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_2_test_vectors_priv_key), 63*f0865ec9SKyle Evans .nn_random = NULL, 64*f0865ec9SKyle Evans .hash_type = BELT_HASH, 65*f0865ec9SKyle Evans .msg = "\xB1\x94\xBA\xC8\x0A\x08\xF5\x3B\x36\x6D\x00\x8E\x58\x4A\x5D\xE4\x85\x04\xFA\x9D\x1B\xB6\xC7\xAC\x25\x2E\x72\xC2\x02\xFD\xCE\x0D\x5B\xE3\xD6\x12\x17\xB9\x61\x81\xFE\x67\x86\xAD\x71\x6B\x89\x0B", 66*f0865ec9SKyle Evans .msglen = 48, 67*f0865ec9SKyle Evans .sig_type = DBIGN, 68*f0865ec9SKyle Evans .exp_sig = dbign_2_test_vectors_expected_sig, 69*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_2_test_vectors_expected_sig), 70*f0865ec9SKyle Evans .adata = dbign_2_test_vectors_adata, 71*f0865ec9SKyle Evans .adata_len = sizeof(dbign_2_test_vectors_adata) 72*f0865ec9SKyle Evans }; 73*f0865ec9SKyle Evans 74*f0865ec9SKyle Evans /********************************************************************/ 75*f0865ec9SKyle Evans static const u8 dbign_3_test_vectors_priv_key[] = { 76*f0865ec9SKyle Evans 0xb3, 0x8a, 0x57, 0x70, 0xaa, 0xe8, 0x97, 0x73, 0x1a, 0xe3, 0x69, 0xaa, 0x48, 0x91, 0xf3, 0x14, 0xd4, 0xae, 0x76, 0x94, 0x29, 0xf3, 0xde, 0x94, 0xeb, 0x9b, 0x36, 0xdf, 0x79, 0x89, 0x62, 0x79, 77*f0865ec9SKyle Evans }; 78*f0865ec9SKyle Evans 79*f0865ec9SKyle Evans static const u8 dbign_3_test_vectors_expected_sig[] = { 80*f0865ec9SKyle Evans 0x3d, 0xcf, 0xf8, 0x86, 0x87, 0xa9, 0x8a, 0xbb, 0x01, 0xce, 0x2d, 0xe8, 0x3e, 0x3a, 0x65, 0xeb, 81*f0865ec9SKyle Evans 0x69, 0xd1, 0x6a, 0x47, 0x50, 0x87, 0x50, 0xfb, 0x6f, 0x18, 0x64, 0x2c, 0x1b, 0x48, 0xb4, 0xaf, 0xff, 0xcd, 0x59, 0xcf, 0xd9, 0x98, 0x6f, 0xe9, 0xf2, 0xbb, 0xea, 0x99, 0xb9, 0x65, 0xb0, 0x1b, 82*f0865ec9SKyle Evans }; 83*f0865ec9SKyle Evans static const u8 dbign_3_test_vectors_adata[] = { 84*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x00, 85*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x1F, 0x51, 86*f0865ec9SKyle Evans }; 87*f0865ec9SKyle Evans 88*f0865ec9SKyle Evans static const ec_test_case dbign_3_test_case = { 89*f0865ec9SKyle Evans .name = "DBIGN-BELT-HASH/dbign256v1 3", 90*f0865ec9SKyle Evans .ec_str_p = &bign256v1_str_params, 91*f0865ec9SKyle Evans .priv_key = dbign_3_test_vectors_priv_key, 92*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_3_test_vectors_priv_key), 93*f0865ec9SKyle Evans .nn_random = NULL, 94*f0865ec9SKyle Evans .hash_type = BELT_HASH, 95*f0865ec9SKyle Evans .msg = "\xB1\x94\xBA\xC8\x0A\x08\xF5\x3B\x36\x6D\x00\x8E\x58\x4A\x5D\xE4\x85\x04\xFA\x9D\x1B\xB6\xC7\xAC\x25\x2E\x72\xC2\x02\xFD\xCE\x0D\x5B\xE3\xD6\x12\x17\xB9\x61\x81\xFE\x67\x86\xAD\x71\x6B\x89\x0B", 96*f0865ec9SKyle Evans .msglen = 48, 97*f0865ec9SKyle Evans .sig_type = DBIGN, 98*f0865ec9SKyle Evans .exp_sig = dbign_3_test_vectors_expected_sig, 99*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_3_test_vectors_expected_sig), 100*f0865ec9SKyle Evans .adata = dbign_3_test_vectors_adata, 101*f0865ec9SKyle Evans .adata_len = sizeof(dbign_3_test_vectors_adata) 102*f0865ec9SKyle Evans }; 103*f0865ec9SKyle Evans #endif 104*f0865ec9SKyle Evans 105*f0865ec9SKyle Evans #if defined(WITH_HASH_BASH384) && defined(WITH_CURVE_BIGN384V1) 106*f0865ec9SKyle Evans /********************************************************************/ 107*f0865ec9SKyle Evans static const u8 dbign_4_test_vectors_priv_key[] = { 108*f0865ec9SKyle Evans 0x0e, 0xb5, 0x93, 0x2d, 0x23, 0x1a, 0xe1, 0x37, 0x61, 0x41, 0x80, 0xec, 0x3b, 0xbe, 0x08, 0x0f, 0x93, 0xba, 0x80, 0x27, 0x8f, 0x05, 0xd8, 0x2f, 0x87, 0x6a, 0xf9, 0xf9, 0xea, 0x0a, 0xf1, 0x9e, 0x6c, 0xa1, 0x6f, 0x21, 0x6c, 0x38, 0x21, 0xdc, 0x72, 0x23, 0x3c, 0x7b, 0xbf, 0x1d, 0xc2, 0x84, 109*f0865ec9SKyle Evans }; 110*f0865ec9SKyle Evans static const u8 dbign_4_test_vectors_expected_sig[] = { 111*f0865ec9SKyle Evans 0xc2, 0xf6, 0x0f, 0x84, 0x00, 0xc1, 0xe4, 0xdd, 0xc4, 0x7f, 0x05, 0xd9, 0x6c, 0x0f, 0xed, 0x1e, 0xe3, 0x0a, 0xb2, 0x29, 0x87, 0x5d, 0xff, 0xb3, 112*f0865ec9SKyle Evans 0xfa, 0xd2, 0xd7, 0x0e, 0xb8, 0x05, 0x56, 0x64, 0x12, 0xff, 0x35, 0xef, 0x62, 0xc0, 0x6f, 0xa6, 0x6b, 0x42, 0x5f, 0x21, 0x30, 0x60, 0x40, 0x9c, 0x6c, 0x06, 0xfc, 0x04, 0xf5, 0x0c, 0x63, 0x7e, 0x84, 0xbb, 0x3e, 0x7a, 0x29, 0x81, 0x51, 0xaa, 0xb1, 0x1a, 0x50, 0xb8, 0xe1, 0x52, 0x91, 0xbc, 113*f0865ec9SKyle Evans }; 114*f0865ec9SKyle Evans static const u8 dbign_4_test_vectors_adata[] = { 115*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x00, 116*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x4d, 0x0c, 117*f0865ec9SKyle Evans }; 118*f0865ec9SKyle Evans static const ec_test_case dbign_4_test_case = { 119*f0865ec9SKyle Evans .name = "BIGN-BASH384/dbign384v1 4", 120*f0865ec9SKyle Evans .ec_str_p = &bign384v1_str_params, 121*f0865ec9SKyle Evans .priv_key = dbign_4_test_vectors_priv_key, 122*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_4_test_vectors_priv_key), 123*f0865ec9SKyle Evans .nn_random = NULL, 124*f0865ec9SKyle Evans .hash_type = BASH384, 125*f0865ec9SKyle Evans .msg = "\xb1\x94\xba\xc8\x0a\x08\xf5\x3b\x36\x6d\x00\x8e\x58\x4a\x5d\xe4\x85\x04\xfa\x9d\x1b\xb6\xc7\xac\x25\x2e\x72\xc2\x02\xfd\xce\x0d\x5b\xe3\xd6\x12\x17\xb9\x61\x81\xfe\x67\x86\xad\x71\x6b\x89\x0b\x5c\xb0\xc0\xff\x33\xc3\x56\xb8\x35\xc4\x05\xae\xd8\xe0\x7f\x99\xe1\x2b\xdc\x1a\xe2\x82\x57\xec\x70\x3f\xcc\xf0\x95\xee\x8d\xf1\xc1\xab\x76\x38\x9f\xe6\x78\xca\xf7\xc6\xf8\x60\xd5\xbb\x9c", 126*f0865ec9SKyle Evans .msglen = 95, 127*f0865ec9SKyle Evans .sig_type = DBIGN, 128*f0865ec9SKyle Evans .exp_sig = dbign_4_test_vectors_expected_sig, 129*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_4_test_vectors_expected_sig), 130*f0865ec9SKyle Evans .adata = dbign_4_test_vectors_adata, 131*f0865ec9SKyle Evans .adata_len = sizeof(dbign_4_test_vectors_adata) 132*f0865ec9SKyle Evans }; 133*f0865ec9SKyle Evans /********************************************************************/ 134*f0865ec9SKyle Evans static const u8 dbign_5_test_vectors_priv_key[] = { 135*f0865ec9SKyle Evans 0x2d, 0x27, 0xc3, 0x89, 0x27, 0x29, 0xfd, 0xb6, 0xf0, 0xee, 0xa7, 0xf8, 0x4e, 0x15, 0x2d, 0x30, 0x24, 0x60, 0xc9, 0x84, 0xde, 0xcb, 0xf6, 0xe6, 0xff, 0x4b, 0xce, 0xfb, 0x89, 0xb1, 0x5d, 0xd2, 0xe8, 0x4d, 0x10, 0xd6, 0x09, 0x92, 0x80, 0x2d, 0x66, 0x6b, 0xb8, 0x05, 0x5f, 0x31, 0xe1, 0x04, 136*f0865ec9SKyle Evans }; 137*f0865ec9SKyle Evans static const u8 dbign_5_test_vectors_expected_sig[] = { 138*f0865ec9SKyle Evans 0x50, 0x0d, 0x4d, 0x66, 0xd4, 0xa6, 0x8a, 0xfc, 0xbb, 0x1d, 0xa7, 0x04, 0xa8, 0xc3, 0xdb, 0x4d, 0x97, 0xb6, 0x2f, 0x71, 0xe8, 0xcb, 0xfd, 0x06, 139*f0865ec9SKyle Evans 0x27, 0xa8, 0x45, 0x1b, 0x30, 0x3f, 0x1b, 0x00, 0x84, 0xb3, 0xab, 0xf0, 0x21, 0x6e, 0x8c, 0x1d, 0x2f, 0x24, 0x75, 0x78, 0x0a, 0x50, 0x6d, 0xc8, 0x29, 0x7e, 0xb7, 0xab, 0x58, 0x73, 0x03, 0xd9, 0x9a, 0x1f, 0x9b, 0x90, 0x7e, 0xec, 0x1a, 0x0d, 0xf8, 0x41, 0x16, 0x53, 0x57, 0xcd, 0x92, 0x6a, 140*f0865ec9SKyle Evans }; 141*f0865ec9SKyle Evans static const u8 dbign_5_test_vectors_adata[] = { 142*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x00, 143*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x4d, 0x0c, 144*f0865ec9SKyle Evans }; 145*f0865ec9SKyle Evans static const ec_test_case dbign_5_test_case = { 146*f0865ec9SKyle Evans .name = "BIGN-BASH384/dbign384v1 5", 147*f0865ec9SKyle Evans .ec_str_p = &bign384v1_str_params, 148*f0865ec9SKyle Evans .priv_key = dbign_5_test_vectors_priv_key, 149*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_5_test_vectors_priv_key), 150*f0865ec9SKyle Evans .nn_random = NULL, 151*f0865ec9SKyle Evans .hash_type = BASH384, 152*f0865ec9SKyle Evans .msg = "\xb1\x94\xba\xc8\x0a\x08\xf5\x3b\x36\x6d\x00\x8e\x58\x4a\x5d\xe4\x85\x04\xfa\x9d\x1b\xb6\xc7\xac\x25\x2e\x72\xc2\x02\xfd\xce\x0d\x5b\xe3\xd6\x12\x17\xb9\x61\x81\xfe\x67\x86\xad\x71\x6b\x89\x0b\x5c\xb0\xc0\xff\x33\xc3\x56\xb8\x35\xc4\x05\xae\xd8\xe0\x7f\x99\xe1\x2b\xdc\x1a\xe2\x82\x57\xec\x70\x3f\xcc\xf0\x95\xee\x8d\xf1\xc1\xab\x76\x38\x9f\xe6\x78\xca\xf7\xc6\xf8\x60\xd5\xbb\x9c\x4f", 153*f0865ec9SKyle Evans .msglen = 96, 154*f0865ec9SKyle Evans .sig_type = DBIGN, 155*f0865ec9SKyle Evans .exp_sig = dbign_5_test_vectors_expected_sig, 156*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_5_test_vectors_expected_sig), 157*f0865ec9SKyle Evans .adata = dbign_5_test_vectors_adata, 158*f0865ec9SKyle Evans .adata_len = sizeof(dbign_5_test_vectors_adata) 159*f0865ec9SKyle Evans }; 160*f0865ec9SKyle Evans 161*f0865ec9SKyle Evans #endif 162*f0865ec9SKyle Evans 163*f0865ec9SKyle Evans #if defined(WITH_HASH_BASH512) && defined(WITH_CURVE_BIGN512V1) 164*f0865ec9SKyle Evans /********************************************************************/ 165*f0865ec9SKyle Evans static const u8 dbign_6_test_vectors_priv_key[] = { 166*f0865ec9SKyle Evans 0xb8, 0xb9, 0x4a, 0xd2, 0xe5, 0x05, 0x02, 0xc5, 0x21, 0xe8, 0x8f, 0x1b, 0xcf, 0x97, 0x0b, 0x1b, 0x47, 0x78, 0x02, 0x31, 0x5b, 0xfe, 0x1f, 0x71, 0xd8, 0x55, 0x71, 0xa2, 0xd1, 0xc1, 0x90, 0x60, 0xba, 0xa2, 0xf1, 0xe0, 0x7d, 0x73, 0xd5, 0x2f, 0x37, 0x31, 0x0b, 0x04, 0x02, 0x3a, 0xbf, 0x33, 0x63, 0xb5, 0xf2, 0x95, 0x2a, 0x62, 0x17, 0xa4, 0x8a, 0x56, 0xf4, 0x3e, 0x35, 0x96, 0xc0, 0xbe, 167*f0865ec9SKyle Evans }; 168*f0865ec9SKyle Evans static const u8 dbign_6_test_vectors_expected_sig[] = { 169*f0865ec9SKyle Evans 0x6e, 0x40, 0xef, 0x8f, 0xf9, 0x9e, 0x26, 0x86, 0xc8, 0x88, 0x53, 0xbb, 0x89, 0xd4, 0xbb, 0x92, 0x33, 0xe8, 0x07, 0x36, 0x5a, 0x32, 0x57, 0x57, 0x1d, 0x53, 0x68, 0xbf, 0x5d, 0x83, 0xd1, 0x5e, 170*f0865ec9SKyle Evans 0x21, 0x83, 0x5b, 0xd6, 0xfa, 0x3b, 0x3d, 0xae, 0x93, 0x30, 0xc2, 0x79, 0x6c, 0x80, 0x3e, 0xee, 0xc9, 0x70, 0x3a, 0x81, 0xe7, 0x40, 0xfd, 0x6d, 0xd8, 0x51, 0xd0, 0x7d, 0xb9, 0x55, 0x72, 0x6c, 0x60, 0x86, 0x8d, 0x61, 0x4b, 0x23, 0x54, 0xe6, 0xd6, 0x4c, 0xf0, 0xd8, 0xdc, 0x9e, 0xf4, 0x79, 0x63, 0xf7, 0x0b, 0xb0, 0xd6, 0xf4, 0x21, 0x67, 0x54, 0x56, 0xbf, 0xbb, 0xb2, 0x03, 0xf2, 0x43, 171*f0865ec9SKyle Evans }; 172*f0865ec9SKyle Evans static const u8 dbign_6_test_vectors_adata[] = { 173*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x00, 174*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x4d, 0x0d, 175*f0865ec9SKyle Evans }; 176*f0865ec9SKyle Evans static const ec_test_case dbign_6_test_case = { 177*f0865ec9SKyle Evans .name = "BIGN-BASH512/dbign512v1 6", 178*f0865ec9SKyle Evans .ec_str_p = &bign512v1_str_params, 179*f0865ec9SKyle Evans .priv_key = dbign_6_test_vectors_priv_key, 180*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_6_test_vectors_priv_key), 181*f0865ec9SKyle Evans .nn_random = NULL, 182*f0865ec9SKyle Evans .hash_type = BASH512, 183*f0865ec9SKyle Evans .msg = "\xb1\x94\xba\xc8\x0a\x08\xf5\x3b\x36\x6d\x00\x8e\x58\x4a\x5d\xe4\x85\x04\xfa\x9d\x1b\xb6\xc7\xac\x25\x2e\x72\xc2\x02\xfd\xce\x0d\x5b\xe3\xd6\x12\x17\xb9\x61\x81\xfe\x67\x86\xad\x71\x6b\x89\x0b\x5c\xb0\xc0\xff\x33\xc3\x56\xb8\x35\xc4\x05\xae\xd8\xe0\x7f", 184*f0865ec9SKyle Evans .msglen = 63, 185*f0865ec9SKyle Evans .sig_type = DBIGN, 186*f0865ec9SKyle Evans .exp_sig = dbign_6_test_vectors_expected_sig, 187*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_6_test_vectors_expected_sig), 188*f0865ec9SKyle Evans .adata = dbign_6_test_vectors_adata, 189*f0865ec9SKyle Evans .adata_len = sizeof(dbign_6_test_vectors_adata) 190*f0865ec9SKyle Evans }; 191*f0865ec9SKyle Evans /********************************************************************/ 192*f0865ec9SKyle Evans static const u8 dbign_7_test_vectors_priv_key[] = { 193*f0865ec9SKyle Evans 0x33, 0x0e, 0xea, 0x5c, 0xcd, 0xc8, 0x96, 0x5a, 0x4c, 0x05, 0xfc, 0x9c, 0x44, 0xde, 0x84, 0xd4, 0x53, 0x45, 0xd8, 0xdd, 0x5e, 0x04, 0xc3, 0x02, 0xff, 0xb9, 0x35, 0x76, 0xbd, 0x20, 0x7a, 0x56, 0x6c, 0x00, 0x7c, 0x95, 0x3b, 0x1f, 0x95, 0xb9, 0x88, 0x7c, 0x2d, 0x64, 0x14, 0x7a, 0x57, 0xf1, 0xeb, 0x0f, 0xe1, 0x02, 0x3e, 0x4f, 0xd5, 0x1f, 0xb3, 0xd5, 0xa8, 0xea, 0xd4, 0x88, 0x01, 0xa9, 194*f0865ec9SKyle Evans }; 195*f0865ec9SKyle Evans static const u8 dbign_7_test_vectors_expected_sig[] = { 196*f0865ec9SKyle Evans 0x3d, 0x2e, 0x3b, 0x3e, 0x2a, 0x2a, 0xed, 0x58, 0x34, 0x7e, 0x87, 0xf2, 0x8c, 0xf8, 0xde, 0xe9, 0xd3, 0xfd, 0x6f, 0x91, 0x07, 0xe6, 0xf9, 0x0b, 0xd6, 0x75, 0x4a, 0x37, 0xe7, 0x8d, 0x8f, 0x63, 197*f0865ec9SKyle Evans 0xfb, 0x5c, 0xc4, 0xdc, 0x39, 0xfb, 0x56, 0x7f, 0xa8, 0x54, 0x1b, 0x7f, 0x62, 0x86, 0x42, 0x02, 0xbb, 0x53, 0x62, 0x6c, 0xb2, 0x40, 0x70, 0x14, 0xea, 0x40, 0xef, 0x04, 0xbd, 0x20, 0xae, 0x19, 0x21, 0x39, 0xae, 0x24, 0x76, 0x9b, 0x20, 0x00, 0x9b, 0x7c, 0x99, 0x75, 0x1e, 0xbc, 0xef, 0x52, 0xf6, 0xfe, 0xfa, 0xe0, 0xc3, 0xaa, 0xd8, 0xf1, 0x2e, 0x78, 0xb2, 0x5e, 0x9b, 0xcc, 0x21, 0xec, 198*f0865ec9SKyle Evans }; 199*f0865ec9SKyle Evans static const u8 dbign_7_test_vectors_adata[] = { 200*f0865ec9SKyle Evans 0x00, 0x0b, 0x00, 0x00, 201*f0865ec9SKyle Evans 0x06, 0x09, 0x2A, 0x70, 0x00, 0x02, 0x00, 0x22, 0x65, 0x4d, 0x0d, 202*f0865ec9SKyle Evans }; 203*f0865ec9SKyle Evans static const ec_test_case dbign_7_test_case = { 204*f0865ec9SKyle Evans .name = "BIGN-BASH512/dbign512v1 7", 205*f0865ec9SKyle Evans .ec_str_p = &bign512v1_str_params, 206*f0865ec9SKyle Evans .priv_key = dbign_7_test_vectors_priv_key, 207*f0865ec9SKyle Evans .priv_key_len = sizeof(dbign_7_test_vectors_priv_key), 208*f0865ec9SKyle Evans .nn_random = NULL, 209*f0865ec9SKyle Evans .hash_type = BASH512, 210*f0865ec9SKyle Evans .msg = "\xb1\x94\xba\xc8\x0a\x08\xf5\x3b\x36\x6d\x00\x8e\x58\x4a\x5d\xe4\x85\x04\xfa\x9d\x1b\xb6\xc7\xac\x25\x2e\x72\xc2\x02\xfd\xce\x0d\x5b\xe3\xd6\x12\x17\xb9\x61\x81\xfe\x67\x86\xad\x71\x6b\x89\x0b\x5c\xb0\xc0\xff\x33\xc3\x56\xb8\x35\xc4\x05\xae\xd8\xe0\x7f\x99", 211*f0865ec9SKyle Evans .msglen = 64, 212*f0865ec9SKyle Evans .sig_type = DBIGN, 213*f0865ec9SKyle Evans .exp_sig = dbign_7_test_vectors_expected_sig, 214*f0865ec9SKyle Evans .exp_siglen = sizeof(dbign_7_test_vectors_expected_sig), 215*f0865ec9SKyle Evans .adata = dbign_7_test_vectors_adata, 216*f0865ec9SKyle Evans .adata_len = sizeof(dbign_7_test_vectors_adata) 217*f0865ec9SKyle Evans }; 218*f0865ec9SKyle Evans 219*f0865ec9SKyle Evans #endif 220*f0865ec9SKyle Evans 221*f0865ec9SKyle Evans 222*f0865ec9SKyle Evans /************************************************/ 223*f0865ec9SKyle Evans #define DBIGN_ALL_TESTS() \ 224*f0865ec9SKyle Evans &dbign_1_test_case, \ 225*f0865ec9SKyle Evans &dbign_2_test_case, \ 226*f0865ec9SKyle Evans &dbign_3_test_case, \ 227*f0865ec9SKyle Evans &dbign_4_test_case, \ 228*f0865ec9SKyle Evans &dbign_5_test_case, \ 229*f0865ec9SKyle Evans &dbign_6_test_case, \ 230*f0865ec9SKyle Evans &dbign_7_test_case, 231*f0865ec9SKyle Evans 232*f0865ec9SKyle Evans #endif /* __DBIGN_TEST_VECTORS_H__ */ 233