1*a9de470cSBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 2*a9de470cSBruce Richardson * Copyright(c) 2018 Cavium Networks 3*a9de470cSBruce Richardson */ 4*a9de470cSBruce Richardson 5*a9de470cSBruce Richardson #ifndef TEST_CRYPTODEV_DSA_TEST_VECTORS_H_ 6*a9de470cSBruce Richardson #define TEST_CRYPTODEV_DSA_TEST_VECTORS_H_ 7*a9de470cSBruce Richardson 8*a9de470cSBruce Richardson #include "rte_crypto_asym.h" 9*a9de470cSBruce Richardson 10*a9de470cSBruce Richardson #define TEST_DATA_SIZE 4096 11*a9de470cSBruce Richardson 12*a9de470cSBruce Richardson 13*a9de470cSBruce Richardson struct dsa_test_param { 14*a9de470cSBruce Richardson rte_crypto_param y; 15*a9de470cSBruce Richardson }; 16*a9de470cSBruce Richardson 17*a9de470cSBruce Richardson static unsigned char dsa_x[] = { 18*a9de470cSBruce Richardson 0xc5, 0x3e, 0xae, 0x6d, 0x45, 0x32, 0x31, 0x64, 19*a9de470cSBruce Richardson 0xc7, 0xd0, 0x7a, 0xf5, 0x71, 0x57, 0x03, 0x74, 20*a9de470cSBruce Richardson 0x4a, 0x63, 0xfc, 0x3a 21*a9de470cSBruce Richardson }; 22*a9de470cSBruce Richardson 23*a9de470cSBruce Richardson uint8_t dsa_y[] = { 24*a9de470cSBruce Richardson 0x31, 0x3f, 0xd9, 0xeb, 0xca, 0x91, 0x57, 0x4e, 25*a9de470cSBruce Richardson 0x1c, 0x2e, 0xeb, 0xe1, 0x51, 0x7c, 0x57, 0xe0, 26*a9de470cSBruce Richardson 0xc2, 0x1b, 0x02, 0x09, 0x87, 0x21, 0x40, 0xc5, 27*a9de470cSBruce Richardson 0x32, 0x87, 0x61, 0xbb, 0xb2, 0x45, 0x0b, 0x33, 28*a9de470cSBruce Richardson 0xf1, 0xb1, 0x8b, 0x40, 0x9c, 0xe9, 0xab, 0x7c, 29*a9de470cSBruce Richardson 0x4c, 0xd8, 0xfd, 0xa3, 0x39, 0x1e, 0x8e, 0x34, 30*a9de470cSBruce Richardson 0x86, 0x83, 0x57, 0xc1, 0x99, 0xe1, 0x6a, 0x6b, 31*a9de470cSBruce Richardson 0x2e, 0xba, 0x06, 0xd6, 0x74, 0x9d, 0xef, 0x79, 32*a9de470cSBruce Richardson 0x1d, 0x79, 0xe9, 0x5d, 0x3a, 0x4d, 0x09, 0xb2, 33*a9de470cSBruce Richardson 0x4c, 0x39, 0x2a, 0xd8, 0x9d, 0xbf, 0x10, 0x09, 34*a9de470cSBruce Richardson 0x95, 0xae, 0x19, 0xc0, 0x10, 0x62, 0x05, 0x6b, 35*a9de470cSBruce Richardson 0xb1, 0x4b, 0xce, 0x00, 0x5e, 0x87, 0x31, 0xef, 36*a9de470cSBruce Richardson 0xde, 0x17, 0x5f, 0x95, 0xb9, 0x75, 0x08, 0x9b, 37*a9de470cSBruce Richardson 0xdc, 0xda, 0xea, 0x56, 0x2b, 0x32, 0x78, 0x6d, 38*a9de470cSBruce Richardson 0x96, 0xf5, 0xa3, 0x1a, 0xed, 0xf7, 0x53, 0x64, 39*a9de470cSBruce Richardson 0x00, 0x8a, 0xd4, 0xff, 0xfe, 0xbb, 0x97, 0x0b 40*a9de470cSBruce Richardson }; 41*a9de470cSBruce Richardson 42*a9de470cSBruce Richardson static unsigned char dsa_p[] = { 43*a9de470cSBruce Richardson 0xa8, 0xf9, 0xcd, 0x20, 0x1e, 0x5e, 0x35, 0xd8, 44*a9de470cSBruce Richardson 0x92, 0xf8, 0x5f, 0x80, 0xe4, 0xdb, 0x25, 0x99, 45*a9de470cSBruce Richardson 0xa5, 0x67, 0x6a, 0x3b, 0x1d, 0x4f, 0x19, 0x03, 46*a9de470cSBruce Richardson 0x30, 0xed, 0x32, 0x56, 0xb2, 0x6d, 0x0e, 0x80, 47*a9de470cSBruce Richardson 0xa0, 0xe4, 0x9a, 0x8f, 0xff, 0xaa, 0xad, 0x2a, 48*a9de470cSBruce Richardson 0x24, 0xf4, 0x72, 0xd2, 0x57, 0x32, 0x41, 0xd4, 49*a9de470cSBruce Richardson 0xd6, 0xd6, 0xc7, 0x48, 0x0c, 0x80, 0xb4, 0xc6, 50*a9de470cSBruce Richardson 0x7b, 0xb4, 0x47, 0x9c, 0x15, 0xad, 0xa7, 0xea, 51*a9de470cSBruce Richardson 0x84, 0x24, 0xd2, 0x50, 0x2f, 0xa0, 0x14, 0x72, 52*a9de470cSBruce Richardson 0xe7, 0x60, 0x24, 0x17, 0x13, 0xda, 0xb0, 0x25, 53*a9de470cSBruce Richardson 0xae, 0x1b, 0x02, 0xe1, 0x70, 0x3a, 0x14, 0x35, 54*a9de470cSBruce Richardson 0xf6, 0x2d, 0xdf, 0x4e, 0xe4, 0xc1, 0xb6, 0x64, 55*a9de470cSBruce Richardson 0x06, 0x6e, 0xb2, 0x2f, 0x2e, 0x3b, 0xf2, 0x8b, 56*a9de470cSBruce Richardson 0xb7, 0x0a, 0x2a, 0x76, 0xe4, 0xfd, 0x5e, 0xbe, 57*a9de470cSBruce Richardson 0x2d, 0x12, 0x29, 0x68, 0x1b, 0x5b, 0x06, 0x43, 58*a9de470cSBruce Richardson 0x9a, 0xc9, 0xc7, 0xe9, 0xd8, 0xbd, 0xe2, 0x83 59*a9de470cSBruce Richardson }; 60*a9de470cSBruce Richardson 61*a9de470cSBruce Richardson static unsigned char dsa_q[] = { 62*a9de470cSBruce Richardson 0xf8, 0x5f, 0x0f, 0x83, 0xac, 0x4d, 0xf7, 0xea, 63*a9de470cSBruce Richardson 0x0c, 0xdf, 0x8f, 0x46, 0x9b, 0xfe, 0xea, 0xea, 64*a9de470cSBruce Richardson 0x14, 0x15, 0x64, 0x95 65*a9de470cSBruce Richardson }; 66*a9de470cSBruce Richardson 67*a9de470cSBruce Richardson static unsigned char dsa_g[] = { 68*a9de470cSBruce Richardson 0x2b, 0x31, 0x52, 0xff, 0x6c, 0x62, 0xf1, 0x46, 69*a9de470cSBruce Richardson 0x22, 0xb8, 0xf4, 0x8e, 0x59, 0xf8, 0xaf, 0x46, 70*a9de470cSBruce Richardson 0x88, 0x3b, 0x38, 0xe7, 0x9b, 0x8c, 0x74, 0xde, 71*a9de470cSBruce Richardson 0xea, 0xe9, 0xdf, 0x13, 0x1f, 0x8b, 0x85, 0x6e, 72*a9de470cSBruce Richardson 0x3a, 0xd6, 0xc8, 0x45, 0x5d, 0xab, 0x87, 0xcc, 73*a9de470cSBruce Richardson 0x0d, 0xa8, 0xac, 0x97, 0x34, 0x17, 0xce, 0x4f, 74*a9de470cSBruce Richardson 0x78, 0x78, 0x55, 0x7d, 0x6c, 0xdf, 0x40, 0xb3, 75*a9de470cSBruce Richardson 0x5b, 0x4a, 0x0c, 0xa3, 0xeb, 0x31, 0x0c, 0x6a, 76*a9de470cSBruce Richardson 0x95, 0xd6, 0x8c, 0xe2, 0x84, 0xad, 0x4e, 0x25, 77*a9de470cSBruce Richardson 0xea, 0x28, 0x59, 0x16, 0x11, 0xee, 0x08, 0xb8, 78*a9de470cSBruce Richardson 0x44, 0x4b, 0xd6, 0x4b, 0x25, 0xf3, 0xf7, 0xc5, 79*a9de470cSBruce Richardson 0x72, 0x41, 0x0d, 0xdf, 0xb3, 0x9c, 0xc7, 0x28, 80*a9de470cSBruce Richardson 0xb9, 0xc9, 0x36, 0xf8, 0x5f, 0x41, 0x91, 0x29, 81*a9de470cSBruce Richardson 0x86, 0x99, 0x29, 0xcd, 0xb9, 0x09, 0xa6, 0xa3, 82*a9de470cSBruce Richardson 0xa9, 0x9b, 0xbe, 0x08, 0x92, 0x16, 0x36, 0x81, 83*a9de470cSBruce Richardson 0x71, 0xbd, 0x0b, 0xa8, 0x1d, 0xe4, 0xfe, 0x33 84*a9de470cSBruce Richardson }; 85*a9de470cSBruce Richardson 86*a9de470cSBruce Richardson struct dsa_test_param dsa_test_params = { 87*a9de470cSBruce Richardson .y = { 88*a9de470cSBruce Richardson .data = dsa_y, 89*a9de470cSBruce Richardson .length = sizeof(dsa_y) 90*a9de470cSBruce Richardson } 91*a9de470cSBruce Richardson }; 92*a9de470cSBruce Richardson 93*a9de470cSBruce Richardson struct rte_crypto_asym_xform dsa_xform = { 94*a9de470cSBruce Richardson .next = NULL, 95*a9de470cSBruce Richardson .xform_type = RTE_CRYPTO_ASYM_XFORM_DSA, 96*a9de470cSBruce Richardson .dsa = { 97*a9de470cSBruce Richardson .p = { 98*a9de470cSBruce Richardson .data = dsa_p, 99*a9de470cSBruce Richardson .length = sizeof(dsa_p) 100*a9de470cSBruce Richardson }, 101*a9de470cSBruce Richardson .q = { 102*a9de470cSBruce Richardson .data = dsa_q, 103*a9de470cSBruce Richardson .length = sizeof(dsa_q) 104*a9de470cSBruce Richardson }, 105*a9de470cSBruce Richardson .g = { 106*a9de470cSBruce Richardson .data = dsa_g, 107*a9de470cSBruce Richardson .length = sizeof(dsa_g) 108*a9de470cSBruce Richardson }, 109*a9de470cSBruce Richardson .x = { 110*a9de470cSBruce Richardson .data = dsa_x, 111*a9de470cSBruce Richardson .length = sizeof(dsa_x) 112*a9de470cSBruce Richardson } 113*a9de470cSBruce Richardson 114*a9de470cSBruce Richardson } 115*a9de470cSBruce Richardson }; 116*a9de470cSBruce Richardson 117*a9de470cSBruce Richardson #endif /* TEST_CRYPTODEV_DSA_TEST_VECTORS_H__ */ 118