1*5c591343SA. Cody Schuffelen /* Microsoft Reference Implementation for TPM 2.0 2*5c591343SA. Cody Schuffelen * 3*5c591343SA. Cody Schuffelen * The copyright in this software is being made available under the BSD License, 4*5c591343SA. Cody Schuffelen * included below. This software may be subject to other third party and 5*5c591343SA. Cody Schuffelen * contributor rights, including patent rights, and no such rights are granted 6*5c591343SA. Cody Schuffelen * under this license. 7*5c591343SA. Cody Schuffelen * 8*5c591343SA. Cody Schuffelen * Copyright (c) Microsoft Corporation 9*5c591343SA. Cody Schuffelen * 10*5c591343SA. Cody Schuffelen * All rights reserved. 11*5c591343SA. Cody Schuffelen * 12*5c591343SA. Cody Schuffelen * BSD License 13*5c591343SA. Cody Schuffelen * 14*5c591343SA. Cody Schuffelen * Redistribution and use in source and binary forms, with or without modification, 15*5c591343SA. Cody Schuffelen * are permitted provided that the following conditions are met: 16*5c591343SA. Cody Schuffelen * 17*5c591343SA. Cody Schuffelen * Redistributions of source code must retain the above copyright notice, this list 18*5c591343SA. Cody Schuffelen * of conditions and the following disclaimer. 19*5c591343SA. Cody Schuffelen * 20*5c591343SA. Cody Schuffelen * Redistributions in binary form must reproduce the above copyright notice, this 21*5c591343SA. Cody Schuffelen * list of conditions and the following disclaimer in the documentation and/or 22*5c591343SA. Cody Schuffelen * other materials provided with the distribution. 23*5c591343SA. Cody Schuffelen * 24*5c591343SA. Cody Schuffelen * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" 25*5c591343SA. Cody Schuffelen * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26*5c591343SA. Cody Schuffelen * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27*5c591343SA. Cody Schuffelen * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 28*5c591343SA. Cody Schuffelen * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 29*5c591343SA. Cody Schuffelen * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30*5c591343SA. Cody Schuffelen * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 31*5c591343SA. Cody Schuffelen * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32*5c591343SA. Cody Schuffelen * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33*5c591343SA. Cody Schuffelen * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34*5c591343SA. Cody Schuffelen */ 35*5c591343SA. Cody Schuffelen /*(Auto-generated) 36*5c591343SA. Cody Schuffelen * Created by TpmStructures; Version 4.4 Mar 26, 2019 37*5c591343SA. Cody Schuffelen * Date: Aug 30, 2019 Time: 02:11:52PM 38*5c591343SA. Cody Schuffelen */ 39*5c591343SA. Cody Schuffelen 40*5c591343SA. Cody Schuffelen #include "Tpm.h" 41*5c591343SA. Cody Schuffelen #include "OIDs.h" 42*5c591343SA. Cody Schuffelen 43*5c591343SA. Cody Schuffelen 44*5c591343SA. Cody Schuffelen // This file contains the ECC curve data. The format of the data depends on the 45*5c591343SA. Cody Schuffelen // setting of USE_BN_ECC_DATA. If it is defined, then the TPM's BigNum format is 46*5c591343SA. Cody Schuffelen // used. Otherwise, it is kept in TPM2B format. The purpose of having the data in 47*5c591343SA. Cody Schuffelen // BigNum format is so that it does not have to be reformatted before being used 48*5c591343SA. Cody Schuffelen // by the crypto library. 49*5c591343SA. Cody Schuffelen 50*5c591343SA. Cody Schuffelen #if ALG_ECC 51*5c591343SA. Cody Schuffelen 52*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 53*5c591343SA. Cody Schuffelen # define TO_ECC_64 TO_CRYPT_WORD_64 54*5c591343SA. Cody Schuffelen # define TO_ECC_56(a, b, c, d, e, f, g) TO_ECC_64(0, a, b, c, d, e, f, g) 55*5c591343SA. Cody Schuffelen # define TO_ECC_48(a, b, c, d, e, f) TO_ECC_64(0, 0, a, b, c, d, e, f) 56*5c591343SA. Cody Schuffelen # define TO_ECC_40(a, b, c, d, e) TO_ECC_64(0, 0, 0, a, b, c, d, e) 57*5c591343SA. Cody Schuffelen # if RADIX_BITS > 32 58*5c591343SA. Cody Schuffelen # define TO_ECC_32(a, b, c, d) TO_ECC_64(0, 0, 0, 0, a, b, c, d) 59*5c591343SA. Cody Schuffelen # define TO_ECC_24(a, b, c) TO_ECC_64(0, 0, 0, 0, 0, a, b, c) 60*5c591343SA. Cody Schuffelen # define TO_ECC_16(a, b) TO_ECC_64(0, 0, 0, 0, 0, 0, a, b) 61*5c591343SA. Cody Schuffelen # define TO_ECC_8(a) TO_ECC_64(0, 0, 0, 0, 0, 0, 0, a) 62*5c591343SA. Cody Schuffelen # else // RADIX_BITS == 32 63*5c591343SA. Cody Schuffelen # define TO_ECC_32 BIG_ENDIAN_BYTES_TO_UINT32 64*5c591343SA. Cody Schuffelen # define TO_ECC_24(a, b, c) TO_ECC_32(0, a, b, c) 65*5c591343SA. Cody Schuffelen # define TO_ECC_16(a, b) TO_ECC_32(0, 0, a, b) 66*5c591343SA. Cody Schuffelen # define TO_ECC_8(a) TO_ECC_32(0, 0, 0, a) 67*5c591343SA. Cody Schuffelen # endif 68*5c591343SA. Cody Schuffelen #else // TPM2B_ 69*5c591343SA. Cody Schuffelen # define TO_ECC_64(a, b, c, d, e, f, g, h) a, b, c, d, e, f, g, h 70*5c591343SA. Cody Schuffelen # define TO_ECC_56(a, b, c, d, e, f, g) a, b, c, d, e, f, g 71*5c591343SA. Cody Schuffelen # define TO_ECC_48(a, b, c, d, e, f) a, b, c, d, e, f 72*5c591343SA. Cody Schuffelen # define TO_ECC_40(a, b, c, d, e) a, b, c, d, e 73*5c591343SA. Cody Schuffelen # define TO_ECC_32(a, b, c, d) a, b, c, d 74*5c591343SA. Cody Schuffelen # define TO_ECC_24(a, b, c) a, b, c 75*5c591343SA. Cody Schuffelen # define TO_ECC_16(a, b) a, b 76*5c591343SA. Cody Schuffelen # define TO_ECC_8(a) a 77*5c591343SA. Cody Schuffelen #endif 78*5c591343SA. Cody Schuffelen 79*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 80*5c591343SA. Cody Schuffelen #define BN_MIN_ALLOC(bytes) \ 81*5c591343SA. Cody Schuffelen (BYTES_TO_CRYPT_WORDS(bytes) == 0) ? 1 : BYTES_TO_CRYPT_WORDS(bytes) 82*5c591343SA. Cody Schuffelen # define ECC_CONST(NAME, bytes, initializer) \ 83*5c591343SA. Cody Schuffelen const struct { \ 84*5c591343SA. Cody Schuffelen crypt_uword_t allocate, size, d[BN_MIN_ALLOC(bytes)]; \ 85*5c591343SA. Cody Schuffelen } NAME = {BN_MIN_ALLOC(bytes), BYTES_TO_CRYPT_WORDS(bytes),{initializer}} 86*5c591343SA. Cody Schuffelen 87*5c591343SA. Cody Schuffelen ECC_CONST(ECC_ZERO, 0, 0); 88*5c591343SA. Cody Schuffelen 89*5c591343SA. Cody Schuffelen #else 90*5c591343SA. Cody Schuffelen # define ECC_CONST(NAME, bytes, initializer) \ 91*5c591343SA. Cody Schuffelen const TPM2B_##bytes##_BYTE_VALUE NAME = {bytes, {initializer}} 92*5c591343SA. Cody Schuffelen 93*5c591343SA. Cody Schuffelen // Have to special case ECC_ZERO 94*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(1); 95*5c591343SA. Cody Schuffelen TPM2B_1_BYTE_VALUE ECC_ZERO = {1, {0}}; 96*5c591343SA. Cody Schuffelen 97*5c591343SA. Cody Schuffelen 98*5c591343SA. Cody Schuffelen #endif 99*5c591343SA. Cody Schuffelen 100*5c591343SA. Cody Schuffelen ECC_CONST(ECC_ONE, 1, 1); 101*5c591343SA. Cody Schuffelen 102*5c591343SA. Cody Schuffelen #if !USE_BN_ECC_DATA 103*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(24); 104*5c591343SA. Cody Schuffelen #define TO_ECC_192(a, b, c) a, b, c 105*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(28); 106*5c591343SA. Cody Schuffelen #define TO_ECC_224(a, b, c, d) a, b, c, d 107*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(32); 108*5c591343SA. Cody Schuffelen #define TO_ECC_256(a, b, c, d) a, b, c, d 109*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(48); 110*5c591343SA. Cody Schuffelen #define TO_ECC_384(a, b, c, d, e, f) a, b, c, d, e, f 111*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(66); 112*5c591343SA. Cody Schuffelen #define TO_ECC_528(a, b, c, d, e, f, g, h, i) a, b, c, d, e, f, g, h, i 113*5c591343SA. Cody Schuffelen TPM2B_BYTE_VALUE(80); 114*5c591343SA. Cody Schuffelen #define TO_ECC_640(a, b, c, d, e, f, g, h, i, j) a, b, c, d, e, f, g, h, i, j 115*5c591343SA. Cody Schuffelen #else 116*5c591343SA. Cody Schuffelen #define TO_ECC_192(a, b, c) c, b, a 117*5c591343SA. Cody Schuffelen #define TO_ECC_224(a, b, c, d) d, c, b, a 118*5c591343SA. Cody Schuffelen #define TO_ECC_256(a, b, c, d) d, c, b, a 119*5c591343SA. Cody Schuffelen #define TO_ECC_384(a, b, c, d, e, f) f, e, d, c, b, a 120*5c591343SA. Cody Schuffelen #define TO_ECC_528(a, b, c, d, e, f, g, h, i) i, h, g, f, e, d, c, b, a 121*5c591343SA. Cody Schuffelen #define TO_ECC_640(a, b, c, d, e, f, g, h, i, j) j, i, h, g, f, e, d, c, b, a 122*5c591343SA. Cody Schuffelen #endif // !USE_BN_ECC_DATA 123*5c591343SA. Cody Schuffelen 124*5c591343SA. Cody Schuffelen #if ECC_NIST_P192 125*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P192_p, 24, TO_ECC_192( 126*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 127*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE), 128*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF))); 129*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P192_a, 24, TO_ECC_192( 130*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 131*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE), 132*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC))); 133*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P192_b, 24, TO_ECC_192( 134*5c591343SA. Cody Schuffelen TO_ECC_64(0x64, 0x21, 0x05, 0x19, 0xE5, 0x9C, 0x80, 0xE7), 135*5c591343SA. Cody Schuffelen TO_ECC_64(0x0F, 0xA7, 0xE9, 0xAB, 0x72, 0x24, 0x30, 0x49), 136*5c591343SA. Cody Schuffelen TO_ECC_64(0xFE, 0xB8, 0xDE, 0xEC, 0xC1, 0x46, 0xB9, 0xB1))); 137*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P192_gX, 24, TO_ECC_192( 138*5c591343SA. Cody Schuffelen TO_ECC_64(0x18, 0x8D, 0xA8, 0x0E, 0xB0, 0x30, 0x90, 0xF6), 139*5c591343SA. Cody Schuffelen TO_ECC_64(0x7C, 0xBF, 0x20, 0xEB, 0x43, 0xA1, 0x88, 0x00), 140*5c591343SA. Cody Schuffelen TO_ECC_64(0xF4, 0xFF, 0x0A, 0xFD, 0x82, 0xFF, 0x10, 0x12))); 141*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P192_gY, 24, TO_ECC_192( 142*5c591343SA. Cody Schuffelen TO_ECC_64(0x07, 0x19, 0x2B, 0x95, 0xFF, 0xC8, 0xDA, 0x78), 143*5c591343SA. Cody Schuffelen TO_ECC_64(0x63, 0x10, 0x11, 0xED, 0x6B, 0x24, 0xCD, 0xD5), 144*5c591343SA. Cody Schuffelen TO_ECC_64(0x73, 0xF9, 0x77, 0xA1, 0x1E, 0x79, 0x48, 0x11))); 145*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P192_n, 24, TO_ECC_192( 146*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 147*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0xDE, 0xF8, 0x36), 148*5c591343SA. Cody Schuffelen TO_ECC_64(0x14, 0x6B, 0xC9, 0xB1, 0xB4, 0xD2, 0x28, 0x31))); 149*5c591343SA. Cody Schuffelen #define NIST_P192_h ECC_ONE 150*5c591343SA. Cody Schuffelen #define NIST_P192_gZ ECC_ONE 151*5c591343SA. Cody Schuffelen 152*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 153*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P192 = { 154*5c591343SA. Cody Schuffelen (bigNum)&NIST_P192_p, (bigNum)&NIST_P192_n, (bigNum)&NIST_P192_h, 155*5c591343SA. Cody Schuffelen (bigNum)&NIST_P192_a, (bigNum)&NIST_P192_b, 156*5c591343SA. Cody Schuffelen {(bigNum)&NIST_P192_gX, (bigNum)&NIST_P192_gY, (bigNum)&NIST_P192_gZ}}; 157*5c591343SA. Cody Schuffelen 158*5c591343SA. Cody Schuffelen #else 159*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P192 = { 160*5c591343SA. Cody Schuffelen &NIST_P192_p.b, &NIST_P192_n.b, &NIST_P192_h.b, 161*5c591343SA. Cody Schuffelen &NIST_P192_a.b, &NIST_P192_b.b, 162*5c591343SA. Cody Schuffelen {&NIST_P192_gX.b, &NIST_P192_gY.b, &NIST_P192_gZ.b}}; 163*5c591343SA. Cody Schuffelen 164*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 165*5c591343SA. Cody Schuffelen 166*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P192 167*5c591343SA. Cody Schuffelen 168*5c591343SA. Cody Schuffelen 169*5c591343SA. Cody Schuffelen #if ECC_NIST_P224 170*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P224_p, 28, TO_ECC_224( 171*5c591343SA. Cody Schuffelen TO_ECC_32(0xFF, 0xFF, 0xFF, 0xFF), 172*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 173*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00), 174*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01))); 175*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P224_a, 28, TO_ECC_224( 176*5c591343SA. Cody Schuffelen TO_ECC_32(0xFF, 0xFF, 0xFF, 0xFF), 177*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 178*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF), 179*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE))); 180*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P224_b, 28, TO_ECC_224( 181*5c591343SA. Cody Schuffelen TO_ECC_32(0xB4, 0x05, 0x0A, 0x85), 182*5c591343SA. Cody Schuffelen TO_ECC_64(0x0C, 0x04, 0xB3, 0xAB, 0xF5, 0x41, 0x32, 0x56), 183*5c591343SA. Cody Schuffelen TO_ECC_64(0x50, 0x44, 0xB0, 0xB7, 0xD7, 0xBF, 0xD8, 0xBA), 184*5c591343SA. Cody Schuffelen TO_ECC_64(0x27, 0x0B, 0x39, 0x43, 0x23, 0x55, 0xFF, 0xB4))); 185*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P224_gX, 28, TO_ECC_224( 186*5c591343SA. Cody Schuffelen TO_ECC_32(0xB7, 0x0E, 0x0C, 0xBD), 187*5c591343SA. Cody Schuffelen TO_ECC_64(0x6B, 0xB4, 0xBF, 0x7F, 0x32, 0x13, 0x90, 0xB9), 188*5c591343SA. Cody Schuffelen TO_ECC_64(0x4A, 0x03, 0xC1, 0xD3, 0x56, 0xC2, 0x11, 0x22), 189*5c591343SA. Cody Schuffelen TO_ECC_64(0x34, 0x32, 0x80, 0xD6, 0x11, 0x5C, 0x1D, 0x21))); 190*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P224_gY, 28, TO_ECC_224( 191*5c591343SA. Cody Schuffelen TO_ECC_32(0xBD, 0x37, 0x63, 0x88), 192*5c591343SA. Cody Schuffelen TO_ECC_64(0xB5, 0xF7, 0x23, 0xFB, 0x4C, 0x22, 0xDF, 0xE6), 193*5c591343SA. Cody Schuffelen TO_ECC_64(0xCD, 0x43, 0x75, 0xA0, 0x5A, 0x07, 0x47, 0x64), 194*5c591343SA. Cody Schuffelen TO_ECC_64(0x44, 0xD5, 0x81, 0x99, 0x85, 0x00, 0x7E, 0x34))); 195*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P224_n, 28, TO_ECC_224( 196*5c591343SA. Cody Schuffelen TO_ECC_32(0xFF, 0xFF, 0xFF, 0xFF), 197*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 198*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0x16, 0xA2, 0xE0, 0xB8, 0xF0, 0x3E), 199*5c591343SA. Cody Schuffelen TO_ECC_64(0x13, 0xDD, 0x29, 0x45, 0x5C, 0x5C, 0x2A, 0x3D))); 200*5c591343SA. Cody Schuffelen #define NIST_P224_h ECC_ONE 201*5c591343SA. Cody Schuffelen #define NIST_P224_gZ ECC_ONE 202*5c591343SA. Cody Schuffelen 203*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 204*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P224 = { 205*5c591343SA. Cody Schuffelen (bigNum)&NIST_P224_p, (bigNum)&NIST_P224_n, (bigNum)&NIST_P224_h, 206*5c591343SA. Cody Schuffelen (bigNum)&NIST_P224_a, (bigNum)&NIST_P224_b, 207*5c591343SA. Cody Schuffelen {(bigNum)&NIST_P224_gX, (bigNum)&NIST_P224_gY, (bigNum)&NIST_P224_gZ}}; 208*5c591343SA. Cody Schuffelen 209*5c591343SA. Cody Schuffelen #else 210*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P224 = { 211*5c591343SA. Cody Schuffelen &NIST_P224_p.b, &NIST_P224_n.b, &NIST_P224_h.b, 212*5c591343SA. Cody Schuffelen &NIST_P224_a.b, &NIST_P224_b.b, 213*5c591343SA. Cody Schuffelen {&NIST_P224_gX.b, &NIST_P224_gY.b, &NIST_P224_gZ.b}}; 214*5c591343SA. Cody Schuffelen 215*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 216*5c591343SA. Cody Schuffelen 217*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P224 218*5c591343SA. Cody Schuffelen 219*5c591343SA. Cody Schuffelen 220*5c591343SA. Cody Schuffelen #if ECC_NIST_P256 221*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P256_p, 32, TO_ECC_256( 222*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01), 223*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), 224*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF), 225*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF))); 226*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P256_a, 32, TO_ECC_256( 227*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01), 228*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), 229*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF), 230*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC))); 231*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P256_b, 32, TO_ECC_256( 232*5c591343SA. Cody Schuffelen TO_ECC_64(0x5A, 0xC6, 0x35, 0xD8, 0xAA, 0x3A, 0x93, 0xE7), 233*5c591343SA. Cody Schuffelen TO_ECC_64(0xB3, 0xEB, 0xBD, 0x55, 0x76, 0x98, 0x86, 0xBC), 234*5c591343SA. Cody Schuffelen TO_ECC_64(0x65, 0x1D, 0x06, 0xB0, 0xCC, 0x53, 0xB0, 0xF6), 235*5c591343SA. Cody Schuffelen TO_ECC_64(0x3B, 0xCE, 0x3C, 0x3E, 0x27, 0xD2, 0x60, 0x4B))); 236*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P256_gX, 32, TO_ECC_256( 237*5c591343SA. Cody Schuffelen TO_ECC_64(0x6B, 0x17, 0xD1, 0xF2, 0xE1, 0x2C, 0x42, 0x47), 238*5c591343SA. Cody Schuffelen TO_ECC_64(0xF8, 0xBC, 0xE6, 0xE5, 0x63, 0xA4, 0x40, 0xF2), 239*5c591343SA. Cody Schuffelen TO_ECC_64(0x77, 0x03, 0x7D, 0x81, 0x2D, 0xEB, 0x33, 0xA0), 240*5c591343SA. Cody Schuffelen TO_ECC_64(0xF4, 0xA1, 0x39, 0x45, 0xD8, 0x98, 0xC2, 0x96))); 241*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P256_gY, 32, TO_ECC_256( 242*5c591343SA. Cody Schuffelen TO_ECC_64(0x4F, 0xE3, 0x42, 0xE2, 0xFE, 0x1A, 0x7F, 0x9B), 243*5c591343SA. Cody Schuffelen TO_ECC_64(0x8E, 0xE7, 0xEB, 0x4A, 0x7C, 0x0F, 0x9E, 0x16), 244*5c591343SA. Cody Schuffelen TO_ECC_64(0x2B, 0xCE, 0x33, 0x57, 0x6B, 0x31, 0x5E, 0xCE), 245*5c591343SA. Cody Schuffelen TO_ECC_64(0xCB, 0xB6, 0x40, 0x68, 0x37, 0xBF, 0x51, 0xF5))); 246*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P256_n, 32, TO_ECC_256( 247*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00), 248*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 249*5c591343SA. Cody Schuffelen TO_ECC_64(0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, 0x9E, 0x84), 250*5c591343SA. Cody Schuffelen TO_ECC_64(0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51))); 251*5c591343SA. Cody Schuffelen #define NIST_P256_h ECC_ONE 252*5c591343SA. Cody Schuffelen #define NIST_P256_gZ ECC_ONE 253*5c591343SA. Cody Schuffelen 254*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 255*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P256 = { 256*5c591343SA. Cody Schuffelen (bigNum)&NIST_P256_p, (bigNum)&NIST_P256_n, (bigNum)&NIST_P256_h, 257*5c591343SA. Cody Schuffelen (bigNum)&NIST_P256_a, (bigNum)&NIST_P256_b, 258*5c591343SA. Cody Schuffelen {(bigNum)&NIST_P256_gX, (bigNum)&NIST_P256_gY, (bigNum)&NIST_P256_gZ}}; 259*5c591343SA. Cody Schuffelen 260*5c591343SA. Cody Schuffelen #else 261*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P256 = { 262*5c591343SA. Cody Schuffelen &NIST_P256_p.b, &NIST_P256_n.b, &NIST_P256_h.b, 263*5c591343SA. Cody Schuffelen &NIST_P256_a.b, &NIST_P256_b.b, 264*5c591343SA. Cody Schuffelen {&NIST_P256_gX.b, &NIST_P256_gY.b, &NIST_P256_gZ.b}}; 265*5c591343SA. Cody Schuffelen 266*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 267*5c591343SA. Cody Schuffelen 268*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P256 269*5c591343SA. Cody Schuffelen 270*5c591343SA. Cody Schuffelen 271*5c591343SA. Cody Schuffelen #if ECC_NIST_P384 272*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P384_p, 48, TO_ECC_384( 273*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 274*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 275*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 276*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE), 277*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00), 278*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF))); 279*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P384_a, 48, TO_ECC_384( 280*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 281*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 282*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 283*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE), 284*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00), 285*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFC))); 286*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P384_b, 48, TO_ECC_384( 287*5c591343SA. Cody Schuffelen TO_ECC_64(0xB3, 0x31, 0x2F, 0xA7, 0xE2, 0x3E, 0xE7, 0xE4), 288*5c591343SA. Cody Schuffelen TO_ECC_64(0x98, 0x8E, 0x05, 0x6B, 0xE3, 0xF8, 0x2D, 0x19), 289*5c591343SA. Cody Schuffelen TO_ECC_64(0x18, 0x1D, 0x9C, 0x6E, 0xFE, 0x81, 0x41, 0x12), 290*5c591343SA. Cody Schuffelen TO_ECC_64(0x03, 0x14, 0x08, 0x8F, 0x50, 0x13, 0x87, 0x5A), 291*5c591343SA. Cody Schuffelen TO_ECC_64(0xC6, 0x56, 0x39, 0x8D, 0x8A, 0x2E, 0xD1, 0x9D), 292*5c591343SA. Cody Schuffelen TO_ECC_64(0x2A, 0x85, 0xC8, 0xED, 0xD3, 0xEC, 0x2A, 0xEF))); 293*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P384_gX, 48, TO_ECC_384( 294*5c591343SA. Cody Schuffelen TO_ECC_64(0xAA, 0x87, 0xCA, 0x22, 0xBE, 0x8B, 0x05, 0x37), 295*5c591343SA. Cody Schuffelen TO_ECC_64(0x8E, 0xB1, 0xC7, 0x1E, 0xF3, 0x20, 0xAD, 0x74), 296*5c591343SA. Cody Schuffelen TO_ECC_64(0x6E, 0x1D, 0x3B, 0x62, 0x8B, 0xA7, 0x9B, 0x98), 297*5c591343SA. Cody Schuffelen TO_ECC_64(0x59, 0xF7, 0x41, 0xE0, 0x82, 0x54, 0x2A, 0x38), 298*5c591343SA. Cody Schuffelen TO_ECC_64(0x55, 0x02, 0xF2, 0x5D, 0xBF, 0x55, 0x29, 0x6C), 299*5c591343SA. Cody Schuffelen TO_ECC_64(0x3A, 0x54, 0x5E, 0x38, 0x72, 0x76, 0x0A, 0xB7))); 300*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P384_gY, 48, TO_ECC_384( 301*5c591343SA. Cody Schuffelen TO_ECC_64(0x36, 0x17, 0xDE, 0x4A, 0x96, 0x26, 0x2C, 0x6F), 302*5c591343SA. Cody Schuffelen TO_ECC_64(0x5D, 0x9E, 0x98, 0xBF, 0x92, 0x92, 0xDC, 0x29), 303*5c591343SA. Cody Schuffelen TO_ECC_64(0xF8, 0xF4, 0x1D, 0xBD, 0x28, 0x9A, 0x14, 0x7C), 304*5c591343SA. Cody Schuffelen TO_ECC_64(0xE9, 0xDA, 0x31, 0x13, 0xB5, 0xF0, 0xB8, 0xC0), 305*5c591343SA. Cody Schuffelen TO_ECC_64(0x0A, 0x60, 0xB1, 0xCE, 0x1D, 0x7E, 0x81, 0x9D), 306*5c591343SA. Cody Schuffelen TO_ECC_64(0x7A, 0x43, 0x1D, 0x7C, 0x90, 0xEA, 0x0E, 0x5F))); 307*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P384_n, 48, TO_ECC_384( 308*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 309*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 310*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 311*5c591343SA. Cody Schuffelen TO_ECC_64(0xC7, 0x63, 0x4D, 0x81, 0xF4, 0x37, 0x2D, 0xDF), 312*5c591343SA. Cody Schuffelen TO_ECC_64(0x58, 0x1A, 0x0D, 0xB2, 0x48, 0xB0, 0xA7, 0x7A), 313*5c591343SA. Cody Schuffelen TO_ECC_64(0xEC, 0xEC, 0x19, 0x6A, 0xCC, 0xC5, 0x29, 0x73))); 314*5c591343SA. Cody Schuffelen #define NIST_P384_h ECC_ONE 315*5c591343SA. Cody Schuffelen #define NIST_P384_gZ ECC_ONE 316*5c591343SA. Cody Schuffelen 317*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 318*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P384 = { 319*5c591343SA. Cody Schuffelen (bigNum)&NIST_P384_p, (bigNum)&NIST_P384_n, (bigNum)&NIST_P384_h, 320*5c591343SA. Cody Schuffelen (bigNum)&NIST_P384_a, (bigNum)&NIST_P384_b, 321*5c591343SA. Cody Schuffelen {(bigNum)&NIST_P384_gX, (bigNum)&NIST_P384_gY, (bigNum)&NIST_P384_gZ}}; 322*5c591343SA. Cody Schuffelen 323*5c591343SA. Cody Schuffelen #else 324*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P384 = { 325*5c591343SA. Cody Schuffelen &NIST_P384_p.b, &NIST_P384_n.b, &NIST_P384_h.b, 326*5c591343SA. Cody Schuffelen &NIST_P384_a.b, &NIST_P384_b.b, 327*5c591343SA. Cody Schuffelen {&NIST_P384_gX.b, &NIST_P384_gY.b, &NIST_P384_gZ.b}}; 328*5c591343SA. Cody Schuffelen 329*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 330*5c591343SA. Cody Schuffelen 331*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P384 332*5c591343SA. Cody Schuffelen 333*5c591343SA. Cody Schuffelen 334*5c591343SA. Cody Schuffelen #if ECC_NIST_P521 335*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P521_p, 66, TO_ECC_528( 336*5c591343SA. Cody Schuffelen TO_ECC_16(0x01, 0xFF), 337*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 338*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 339*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 340*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 341*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 342*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 343*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 344*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF))); 345*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P521_a, 66, TO_ECC_528( 346*5c591343SA. Cody Schuffelen TO_ECC_16(0x01, 0xFF), 347*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 348*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 349*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 350*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 351*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 352*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 353*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 354*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC))); 355*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P521_b, 66, TO_ECC_528( 356*5c591343SA. Cody Schuffelen TO_ECC_16(0x00, 0x51), 357*5c591343SA. Cody Schuffelen TO_ECC_64(0x95, 0x3E, 0xB9, 0x61, 0x8E, 0x1C, 0x9A, 0x1F), 358*5c591343SA. Cody Schuffelen TO_ECC_64(0x92, 0x9A, 0x21, 0xA0, 0xB6, 0x85, 0x40, 0xEE), 359*5c591343SA. Cody Schuffelen TO_ECC_64(0xA2, 0xDA, 0x72, 0x5B, 0x99, 0xB3, 0x15, 0xF3), 360*5c591343SA. Cody Schuffelen TO_ECC_64(0xB8, 0xB4, 0x89, 0x91, 0x8E, 0xF1, 0x09, 0xE1), 361*5c591343SA. Cody Schuffelen TO_ECC_64(0x56, 0x19, 0x39, 0x51, 0xEC, 0x7E, 0x93, 0x7B), 362*5c591343SA. Cody Schuffelen TO_ECC_64(0x16, 0x52, 0xC0, 0xBD, 0x3B, 0xB1, 0xBF, 0x07), 363*5c591343SA. Cody Schuffelen TO_ECC_64(0x35, 0x73, 0xDF, 0x88, 0x3D, 0x2C, 0x34, 0xF1), 364*5c591343SA. Cody Schuffelen TO_ECC_64(0xEF, 0x45, 0x1F, 0xD4, 0x6B, 0x50, 0x3F, 0x00))); 365*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P521_gX, 66, TO_ECC_528( 366*5c591343SA. Cody Schuffelen TO_ECC_16(0x00, 0xC6), 367*5c591343SA. Cody Schuffelen TO_ECC_64(0x85, 0x8E, 0x06, 0xB7, 0x04, 0x04, 0xE9, 0xCD), 368*5c591343SA. Cody Schuffelen TO_ECC_64(0x9E, 0x3E, 0xCB, 0x66, 0x23, 0x95, 0xB4, 0x42), 369*5c591343SA. Cody Schuffelen TO_ECC_64(0x9C, 0x64, 0x81, 0x39, 0x05, 0x3F, 0xB5, 0x21), 370*5c591343SA. Cody Schuffelen TO_ECC_64(0xF8, 0x28, 0xAF, 0x60, 0x6B, 0x4D, 0x3D, 0xBA), 371*5c591343SA. Cody Schuffelen TO_ECC_64(0xA1, 0x4B, 0x5E, 0x77, 0xEF, 0xE7, 0x59, 0x28), 372*5c591343SA. Cody Schuffelen TO_ECC_64(0xFE, 0x1D, 0xC1, 0x27, 0xA2, 0xFF, 0xA8, 0xDE), 373*5c591343SA. Cody Schuffelen TO_ECC_64(0x33, 0x48, 0xB3, 0xC1, 0x85, 0x6A, 0x42, 0x9B), 374*5c591343SA. Cody Schuffelen TO_ECC_64(0xF9, 0x7E, 0x7E, 0x31, 0xC2, 0xE5, 0xBD, 0x66))); 375*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P521_gY, 66, TO_ECC_528( 376*5c591343SA. Cody Schuffelen TO_ECC_16(0x01, 0x18), 377*5c591343SA. Cody Schuffelen TO_ECC_64(0x39, 0x29, 0x6A, 0x78, 0x9A, 0x3B, 0xC0, 0x04), 378*5c591343SA. Cody Schuffelen TO_ECC_64(0x5C, 0x8A, 0x5F, 0xB4, 0x2C, 0x7D, 0x1B, 0xD9), 379*5c591343SA. Cody Schuffelen TO_ECC_64(0x98, 0xF5, 0x44, 0x49, 0x57, 0x9B, 0x44, 0x68), 380*5c591343SA. Cody Schuffelen TO_ECC_64(0x17, 0xAF, 0xBD, 0x17, 0x27, 0x3E, 0x66, 0x2C), 381*5c591343SA. Cody Schuffelen TO_ECC_64(0x97, 0xEE, 0x72, 0x99, 0x5E, 0xF4, 0x26, 0x40), 382*5c591343SA. Cody Schuffelen TO_ECC_64(0xC5, 0x50, 0xB9, 0x01, 0x3F, 0xAD, 0x07, 0x61), 383*5c591343SA. Cody Schuffelen TO_ECC_64(0x35, 0x3C, 0x70, 0x86, 0xA2, 0x72, 0xC2, 0x40), 384*5c591343SA. Cody Schuffelen TO_ECC_64(0x88, 0xBE, 0x94, 0x76, 0x9F, 0xD1, 0x66, 0x50))); 385*5c591343SA. Cody Schuffelen ECC_CONST(NIST_P521_n, 66, TO_ECC_528( 386*5c591343SA. Cody Schuffelen TO_ECC_16(0x01, 0xFF), 387*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 388*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 389*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 390*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA), 391*5c591343SA. Cody Schuffelen TO_ECC_64(0x51, 0x86, 0x87, 0x83, 0xBF, 0x2F, 0x96, 0x6B), 392*5c591343SA. Cody Schuffelen TO_ECC_64(0x7F, 0xCC, 0x01, 0x48, 0xF7, 0x09, 0xA5, 0xD0), 393*5c591343SA. Cody Schuffelen TO_ECC_64(0x3B, 0xB5, 0xC9, 0xB8, 0x89, 0x9C, 0x47, 0xAE), 394*5c591343SA. Cody Schuffelen TO_ECC_64(0xBB, 0x6F, 0xB7, 0x1E, 0x91, 0x38, 0x64, 0x09))); 395*5c591343SA. Cody Schuffelen #define NIST_P521_h ECC_ONE 396*5c591343SA. Cody Schuffelen #define NIST_P521_gZ ECC_ONE 397*5c591343SA. Cody Schuffelen 398*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 399*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P521 = { 400*5c591343SA. Cody Schuffelen (bigNum)&NIST_P521_p, (bigNum)&NIST_P521_n, (bigNum)&NIST_P521_h, 401*5c591343SA. Cody Schuffelen (bigNum)&NIST_P521_a, (bigNum)&NIST_P521_b, 402*5c591343SA. Cody Schuffelen {(bigNum)&NIST_P521_gX, (bigNum)&NIST_P521_gY, (bigNum)&NIST_P521_gZ}}; 403*5c591343SA. Cody Schuffelen 404*5c591343SA. Cody Schuffelen #else 405*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA NIST_P521 = { 406*5c591343SA. Cody Schuffelen &NIST_P521_p.b, &NIST_P521_n.b, &NIST_P521_h.b, 407*5c591343SA. Cody Schuffelen &NIST_P521_a.b, &NIST_P521_b.b, 408*5c591343SA. Cody Schuffelen {&NIST_P521_gX.b, &NIST_P521_gY.b, &NIST_P521_gZ.b}}; 409*5c591343SA. Cody Schuffelen 410*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 411*5c591343SA. Cody Schuffelen 412*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P521 413*5c591343SA. Cody Schuffelen 414*5c591343SA. Cody Schuffelen 415*5c591343SA. Cody Schuffelen #if ECC_BN_P256 416*5c591343SA. Cody Schuffelen ECC_CONST(BN_P256_p, 32, TO_ECC_256( 417*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD), 418*5c591343SA. Cody Schuffelen TO_ECC_64(0x46, 0xE5, 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F), 419*5c591343SA. Cody Schuffelen TO_ECC_64(0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82), 420*5c591343SA. Cody Schuffelen TO_ECC_64(0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13))); 421*5c591343SA. Cody Schuffelen #define BN_P256_a ECC_ZERO 422*5c591343SA. Cody Schuffelen ECC_CONST(BN_P256_b, 1, TO_ECC_8(3)); 423*5c591343SA. Cody Schuffelen #define BN_P256_gX ECC_ONE 424*5c591343SA. Cody Schuffelen ECC_CONST(BN_P256_gY, 1, TO_ECC_8(2)); 425*5c591343SA. Cody Schuffelen ECC_CONST(BN_P256_n, 32, TO_ECC_256( 426*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD), 427*5c591343SA. Cody Schuffelen TO_ECC_64(0x46, 0xE5, 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9E), 428*5c591343SA. Cody Schuffelen TO_ECC_64(0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A), 429*5c591343SA. Cody Schuffelen TO_ECC_64(0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D))); 430*5c591343SA. Cody Schuffelen #define BN_P256_h ECC_ONE 431*5c591343SA. Cody Schuffelen #define BN_P256_gZ ECC_ONE 432*5c591343SA. Cody Schuffelen 433*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 434*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA BN_P256 = { 435*5c591343SA. Cody Schuffelen (bigNum)&BN_P256_p, (bigNum)&BN_P256_n, (bigNum)&BN_P256_h, 436*5c591343SA. Cody Schuffelen (bigNum)&BN_P256_a, (bigNum)&BN_P256_b, 437*5c591343SA. Cody Schuffelen {(bigNum)&BN_P256_gX, (bigNum)&BN_P256_gY, (bigNum)&BN_P256_gZ}}; 438*5c591343SA. Cody Schuffelen 439*5c591343SA. Cody Schuffelen #else 440*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA BN_P256 = { 441*5c591343SA. Cody Schuffelen &BN_P256_p.b, &BN_P256_n.b, &BN_P256_h.b, 442*5c591343SA. Cody Schuffelen &BN_P256_a.b, &BN_P256_b.b, 443*5c591343SA. Cody Schuffelen {&BN_P256_gX.b, &BN_P256_gY.b, &BN_P256_gZ.b}}; 444*5c591343SA. Cody Schuffelen 445*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 446*5c591343SA. Cody Schuffelen 447*5c591343SA. Cody Schuffelen #endif // ECC_BN_P256 448*5c591343SA. Cody Schuffelen 449*5c591343SA. Cody Schuffelen 450*5c591343SA. Cody Schuffelen #if ECC_BN_P638 451*5c591343SA. Cody Schuffelen ECC_CONST(BN_P638_p, 80, TO_ECC_640( 452*5c591343SA. Cody Schuffelen TO_ECC_64(0x23, 0xFF, 0xFF, 0xFD, 0xC0, 0x00, 0x00, 0x0D), 453*5c591343SA. Cody Schuffelen TO_ECC_64(0x7F, 0xFF, 0xFF, 0xB8, 0x00, 0x00, 0x01, 0xD3), 454*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xF9, 0x42, 0xD0, 0x00, 0x16, 0x5E), 455*5c591343SA. Cody Schuffelen TO_ECC_64(0x3F, 0xFF, 0x94, 0x87, 0x00, 0x00, 0xD5, 0x2F), 456*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFD, 0xD0, 0xE0, 0x00, 0x08, 0xDE, 0x55), 457*5c591343SA. Cody Schuffelen TO_ECC_64(0xC0, 0x00, 0x86, 0x52, 0x00, 0x21, 0xE5, 0x5B), 458*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xF5, 0x1F, 0xFF, 0xF4, 0xEB, 0x80), 459*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x4C, 0x80, 0x01, 0x5A, 0xCD), 460*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xE0), 461*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67))); 462*5c591343SA. Cody Schuffelen #define BN_P638_a ECC_ZERO 463*5c591343SA. Cody Schuffelen ECC_CONST(BN_P638_b, 2, TO_ECC_16(0x01,0x01)); 464*5c591343SA. Cody Schuffelen ECC_CONST(BN_P638_gX, 80, TO_ECC_640( 465*5c591343SA. Cody Schuffelen TO_ECC_64(0x23, 0xFF, 0xFF, 0xFD, 0xC0, 0x00, 0x00, 0x0D), 466*5c591343SA. Cody Schuffelen TO_ECC_64(0x7F, 0xFF, 0xFF, 0xB8, 0x00, 0x00, 0x01, 0xD3), 467*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xF9, 0x42, 0xD0, 0x00, 0x16, 0x5E), 468*5c591343SA. Cody Schuffelen TO_ECC_64(0x3F, 0xFF, 0x94, 0x87, 0x00, 0x00, 0xD5, 0x2F), 469*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFD, 0xD0, 0xE0, 0x00, 0x08, 0xDE, 0x55), 470*5c591343SA. Cody Schuffelen TO_ECC_64(0xC0, 0x00, 0x86, 0x52, 0x00, 0x21, 0xE5, 0x5B), 471*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xF5, 0x1F, 0xFF, 0xF4, 0xEB, 0x80), 472*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x4C, 0x80, 0x01, 0x5A, 0xCD), 473*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xE0), 474*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66))); 475*5c591343SA. Cody Schuffelen ECC_CONST(BN_P638_gY, 1, TO_ECC_8(0x10)); 476*5c591343SA. Cody Schuffelen ECC_CONST(BN_P638_n, 80, TO_ECC_640( 477*5c591343SA. Cody Schuffelen TO_ECC_64(0x23, 0xFF, 0xFF, 0xFD, 0xC0, 0x00, 0x00, 0x0D), 478*5c591343SA. Cody Schuffelen TO_ECC_64(0x7F, 0xFF, 0xFF, 0xB8, 0x00, 0x00, 0x01, 0xD3), 479*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xF9, 0x42, 0xD0, 0x00, 0x16, 0x5E), 480*5c591343SA. Cody Schuffelen TO_ECC_64(0x3F, 0xFF, 0x94, 0x87, 0x00, 0x00, 0xD5, 0x2F), 481*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFD, 0xD0, 0xE0, 0x00, 0x08, 0xDE, 0x55), 482*5c591343SA. Cody Schuffelen TO_ECC_64(0x60, 0x00, 0x86, 0x55, 0x00, 0x21, 0xE5, 0x55), 483*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xF5, 0x4F, 0xFF, 0xF4, 0xEA, 0xC0), 484*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x49, 0x80, 0x01, 0x54, 0xD9), 485*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xA0), 486*5c591343SA. Cody Schuffelen TO_ECC_64(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61))); 487*5c591343SA. Cody Schuffelen #define BN_P638_h ECC_ONE 488*5c591343SA. Cody Schuffelen #define BN_P638_gZ ECC_ONE 489*5c591343SA. Cody Schuffelen 490*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 491*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA BN_P638 = { 492*5c591343SA. Cody Schuffelen (bigNum)&BN_P638_p, (bigNum)&BN_P638_n, (bigNum)&BN_P638_h, 493*5c591343SA. Cody Schuffelen (bigNum)&BN_P638_a, (bigNum)&BN_P638_b, 494*5c591343SA. Cody Schuffelen {(bigNum)&BN_P638_gX, (bigNum)&BN_P638_gY, (bigNum)&BN_P638_gZ}}; 495*5c591343SA. Cody Schuffelen 496*5c591343SA. Cody Schuffelen #else 497*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA BN_P638 = { 498*5c591343SA. Cody Schuffelen &BN_P638_p.b, &BN_P638_n.b, &BN_P638_h.b, 499*5c591343SA. Cody Schuffelen &BN_P638_a.b, &BN_P638_b.b, 500*5c591343SA. Cody Schuffelen {&BN_P638_gX.b, &BN_P638_gY.b, &BN_P638_gZ.b}}; 501*5c591343SA. Cody Schuffelen 502*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 503*5c591343SA. Cody Schuffelen 504*5c591343SA. Cody Schuffelen #endif // ECC_BN_P638 505*5c591343SA. Cody Schuffelen 506*5c591343SA. Cody Schuffelen 507*5c591343SA. Cody Schuffelen #if ECC_SM2_P256 508*5c591343SA. Cody Schuffelen ECC_CONST(SM2_P256_p, 32, TO_ECC_256( 509*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF), 510*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 511*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00), 512*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF))); 513*5c591343SA. Cody Schuffelen ECC_CONST(SM2_P256_a, 32, TO_ECC_256( 514*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF), 515*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 516*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00), 517*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC))); 518*5c591343SA. Cody Schuffelen ECC_CONST(SM2_P256_b, 32, TO_ECC_256( 519*5c591343SA. Cody Schuffelen TO_ECC_64(0x28, 0xE9, 0xFA, 0x9E, 0x9D, 0x9F, 0x5E, 0x34), 520*5c591343SA. Cody Schuffelen TO_ECC_64(0x4D, 0x5A, 0x9E, 0x4B, 0xCF, 0x65, 0x09, 0xA7), 521*5c591343SA. Cody Schuffelen TO_ECC_64(0xF3, 0x97, 0x89, 0xF5, 0x15, 0xAB, 0x8F, 0x92), 522*5c591343SA. Cody Schuffelen TO_ECC_64(0xDD, 0xBC, 0xBD, 0x41, 0x4D, 0x94, 0x0E, 0x93))); 523*5c591343SA. Cody Schuffelen ECC_CONST(SM2_P256_gX, 32, TO_ECC_256( 524*5c591343SA. Cody Schuffelen TO_ECC_64(0x32, 0xC4, 0xAE, 0x2C, 0x1F, 0x19, 0x81, 0x19), 525*5c591343SA. Cody Schuffelen TO_ECC_64(0x5F, 0x99, 0x04, 0x46, 0x6A, 0x39, 0xC9, 0x94), 526*5c591343SA. Cody Schuffelen TO_ECC_64(0x8F, 0xE3, 0x0B, 0xBF, 0xF2, 0x66, 0x0B, 0xE1), 527*5c591343SA. Cody Schuffelen TO_ECC_64(0x71, 0x5A, 0x45, 0x89, 0x33, 0x4C, 0x74, 0xC7))); 528*5c591343SA. Cody Schuffelen ECC_CONST(SM2_P256_gY, 32, TO_ECC_256( 529*5c591343SA. Cody Schuffelen TO_ECC_64(0xBC, 0x37, 0x36, 0xA2, 0xF4, 0xF6, 0x77, 0x9C), 530*5c591343SA. Cody Schuffelen TO_ECC_64(0x59, 0xBD, 0xCE, 0xE3, 0x6B, 0x69, 0x21, 0x53), 531*5c591343SA. Cody Schuffelen TO_ECC_64(0xD0, 0xA9, 0x87, 0x7C, 0xC6, 0x2A, 0x47, 0x40), 532*5c591343SA. Cody Schuffelen TO_ECC_64(0x02, 0xDF, 0x32, 0xE5, 0x21, 0x39, 0xF0, 0xA0))); 533*5c591343SA. Cody Schuffelen ECC_CONST(SM2_P256_n, 32, TO_ECC_256( 534*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF), 535*5c591343SA. Cody Schuffelen TO_ECC_64(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), 536*5c591343SA. Cody Schuffelen TO_ECC_64(0x72, 0x03, 0xDF, 0x6B, 0x21, 0xC6, 0x05, 0x2B), 537*5c591343SA. Cody Schuffelen TO_ECC_64(0x53, 0xBB, 0xF4, 0x09, 0x39, 0xD5, 0x41, 0x23))); 538*5c591343SA. Cody Schuffelen #define SM2_P256_h ECC_ONE 539*5c591343SA. Cody Schuffelen #define SM2_P256_gZ ECC_ONE 540*5c591343SA. Cody Schuffelen 541*5c591343SA. Cody Schuffelen #if USE_BN_ECC_DATA 542*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA SM2_P256 = { 543*5c591343SA. Cody Schuffelen (bigNum)&SM2_P256_p, (bigNum)&SM2_P256_n, (bigNum)&SM2_P256_h, 544*5c591343SA. Cody Schuffelen (bigNum)&SM2_P256_a, (bigNum)&SM2_P256_b, 545*5c591343SA. Cody Schuffelen {(bigNum)&SM2_P256_gX, (bigNum)&SM2_P256_gY, (bigNum)&SM2_P256_gZ}}; 546*5c591343SA. Cody Schuffelen 547*5c591343SA. Cody Schuffelen #else 548*5c591343SA. Cody Schuffelen const ECC_CURVE_DATA SM2_P256 = { 549*5c591343SA. Cody Schuffelen &SM2_P256_p.b, &SM2_P256_n.b, &SM2_P256_h.b, 550*5c591343SA. Cody Schuffelen &SM2_P256_a.b, &SM2_P256_b.b, 551*5c591343SA. Cody Schuffelen {&SM2_P256_gX.b, &SM2_P256_gY.b, &SM2_P256_gZ.b}}; 552*5c591343SA. Cody Schuffelen 553*5c591343SA. Cody Schuffelen #endif // USE_BN_ECC_DATA 554*5c591343SA. Cody Schuffelen 555*5c591343SA. Cody Schuffelen #endif // ECC_SM2_P256 556*5c591343SA. Cody Schuffelen 557*5c591343SA. Cody Schuffelen 558*5c591343SA. Cody Schuffelen #define comma 559*5c591343SA. Cody Schuffelen const ECC_CURVE eccCurves[] = { 560*5c591343SA. Cody Schuffelen #if ECC_NIST_P192 561*5c591343SA. Cody Schuffelen comma 562*5c591343SA. Cody Schuffelen {TPM_ECC_NIST_P192, 563*5c591343SA. Cody Schuffelen 192, 564*5c591343SA. Cody Schuffelen {TPM_ALG_KDF1_SP800_56A, {{TPM_ALG_SHA256}}}, 565*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 566*5c591343SA. Cody Schuffelen &NIST_P192, 567*5c591343SA. Cody Schuffelen OID_ECC_NIST_P192 568*5c591343SA. Cody Schuffelen CURVE_NAME("NIST_P192")} 569*5c591343SA. Cody Schuffelen # undef comma 570*5c591343SA. Cody Schuffelen # define comma , 571*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P192 572*5c591343SA. Cody Schuffelen #if ECC_NIST_P224 573*5c591343SA. Cody Schuffelen comma 574*5c591343SA. Cody Schuffelen {TPM_ECC_NIST_P224, 575*5c591343SA. Cody Schuffelen 224, 576*5c591343SA. Cody Schuffelen {TPM_ALG_KDF1_SP800_56A, {{TPM_ALG_SHA256}}}, 577*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 578*5c591343SA. Cody Schuffelen &NIST_P224, 579*5c591343SA. Cody Schuffelen OID_ECC_NIST_P224 580*5c591343SA. Cody Schuffelen CURVE_NAME("NIST_P224")} 581*5c591343SA. Cody Schuffelen # undef comma 582*5c591343SA. Cody Schuffelen # define comma , 583*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P224 584*5c591343SA. Cody Schuffelen #if ECC_NIST_P256 585*5c591343SA. Cody Schuffelen comma 586*5c591343SA. Cody Schuffelen {TPM_ECC_NIST_P256, 587*5c591343SA. Cody Schuffelen 256, 588*5c591343SA. Cody Schuffelen {TPM_ALG_KDF1_SP800_56A, {{TPM_ALG_SHA256}}}, 589*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 590*5c591343SA. Cody Schuffelen &NIST_P256, 591*5c591343SA. Cody Schuffelen OID_ECC_NIST_P256 592*5c591343SA. Cody Schuffelen CURVE_NAME("NIST_P256")} 593*5c591343SA. Cody Schuffelen # undef comma 594*5c591343SA. Cody Schuffelen # define comma , 595*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P256 596*5c591343SA. Cody Schuffelen #if ECC_NIST_P384 597*5c591343SA. Cody Schuffelen comma 598*5c591343SA. Cody Schuffelen {TPM_ECC_NIST_P384, 599*5c591343SA. Cody Schuffelen 384, 600*5c591343SA. Cody Schuffelen {TPM_ALG_KDF1_SP800_56A, {{TPM_ALG_SHA384}}}, 601*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 602*5c591343SA. Cody Schuffelen &NIST_P384, 603*5c591343SA. Cody Schuffelen OID_ECC_NIST_P384 604*5c591343SA. Cody Schuffelen CURVE_NAME("NIST_P384")} 605*5c591343SA. Cody Schuffelen # undef comma 606*5c591343SA. Cody Schuffelen # define comma , 607*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P384 608*5c591343SA. Cody Schuffelen #if ECC_NIST_P521 609*5c591343SA. Cody Schuffelen comma 610*5c591343SA. Cody Schuffelen {TPM_ECC_NIST_P521, 611*5c591343SA. Cody Schuffelen 521, 612*5c591343SA. Cody Schuffelen {TPM_ALG_KDF1_SP800_56A, {{TPM_ALG_SHA512}}}, 613*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 614*5c591343SA. Cody Schuffelen &NIST_P521, 615*5c591343SA. Cody Schuffelen OID_ECC_NIST_P521 616*5c591343SA. Cody Schuffelen CURVE_NAME("NIST_P521")} 617*5c591343SA. Cody Schuffelen # undef comma 618*5c591343SA. Cody Schuffelen # define comma , 619*5c591343SA. Cody Schuffelen #endif // ECC_NIST_P521 620*5c591343SA. Cody Schuffelen #if ECC_BN_P256 621*5c591343SA. Cody Schuffelen comma 622*5c591343SA. Cody Schuffelen {TPM_ECC_BN_P256, 623*5c591343SA. Cody Schuffelen 256, 624*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 625*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 626*5c591343SA. Cody Schuffelen &BN_P256, 627*5c591343SA. Cody Schuffelen OID_ECC_BN_P256 628*5c591343SA. Cody Schuffelen CURVE_NAME("BN_P256")} 629*5c591343SA. Cody Schuffelen # undef comma 630*5c591343SA. Cody Schuffelen # define comma , 631*5c591343SA. Cody Schuffelen #endif // ECC_BN_P256 632*5c591343SA. Cody Schuffelen #if ECC_BN_P638 633*5c591343SA. Cody Schuffelen comma 634*5c591343SA. Cody Schuffelen {TPM_ECC_BN_P638, 635*5c591343SA. Cody Schuffelen 638, 636*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 637*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 638*5c591343SA. Cody Schuffelen &BN_P638, 639*5c591343SA. Cody Schuffelen OID_ECC_BN_P638 640*5c591343SA. Cody Schuffelen CURVE_NAME("BN_P638")} 641*5c591343SA. Cody Schuffelen # undef comma 642*5c591343SA. Cody Schuffelen # define comma , 643*5c591343SA. Cody Schuffelen #endif // ECC_BN_P638 644*5c591343SA. Cody Schuffelen #if ECC_SM2_P256 645*5c591343SA. Cody Schuffelen comma 646*5c591343SA. Cody Schuffelen {TPM_ECC_SM2_P256, 647*5c591343SA. Cody Schuffelen 256, 648*5c591343SA. Cody Schuffelen {TPM_ALG_KDF1_SP800_56A, {{TPM_ALG_SM3_256}}}, 649*5c591343SA. Cody Schuffelen {TPM_ALG_NULL, {{TPM_ALG_NULL}}}, 650*5c591343SA. Cody Schuffelen &SM2_P256, 651*5c591343SA. Cody Schuffelen OID_ECC_SM2_P256 652*5c591343SA. Cody Schuffelen CURVE_NAME("SM2_P256")} 653*5c591343SA. Cody Schuffelen # undef comma 654*5c591343SA. Cody Schuffelen # define comma , 655*5c591343SA. Cody Schuffelen #endif // ECC_SM2_P256 656*5c591343SA. Cody Schuffelen }; 657*5c591343SA. Cody Schuffelen #endif // TPM_ALG_ECC 658