1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** NetX Crypto Component */ 17 /** */ 18 /** Elliptical Curve Cryptography */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 #include "nx_crypto_ec.h" 24 static NX_CRYPTO_CONST HN_UBASE secp256r1_fixed_points_data[][32 >> HN_SIZE_SHIFT] = 25 { 26 27 /* 2G.x */ 28 { 29 HN_ULONG_TO_UBASE(0x8E14DB63), HN_ULONG_TO_UBASE(0x90E75CB4), 30 HN_ULONG_TO_UBASE(0xAD651F7E), HN_ULONG_TO_UBASE(0x29493BAA), 31 HN_ULONG_TO_UBASE(0x326E25DE), HN_ULONG_TO_UBASE(0x8492592E), 32 HN_ULONG_TO_UBASE(0x2811AAA5), HN_ULONG_TO_UBASE(0x0FA822BC) 33 }, 34 35 /* 2G.y */ 36 { 37 HN_ULONG_TO_UBASE(0x5F462EE7), HN_ULONG_TO_UBASE(0xE4112454), 38 HN_ULONG_TO_UBASE(0x50FE82F5), HN_ULONG_TO_UBASE(0x34B1A650), 39 HN_ULONG_TO_UBASE(0xB3DF188B), HN_ULONG_TO_UBASE(0x6F4AD4BC), 40 HN_ULONG_TO_UBASE(0xF5DBA80D), HN_ULONG_TO_UBASE(0xBFF44AE8) 41 }, 42 43 /* 3G.x */ 44 { 45 HN_ULONG_TO_UBASE(0x097992AF), HN_ULONG_TO_UBASE(0x93391CE2), 46 HN_ULONG_TO_UBASE(0x0D35F1FA), HN_ULONG_TO_UBASE(0xE96C98FD), 47 HN_ULONG_TO_UBASE(0x95E02789), HN_ULONG_TO_UBASE(0xB257C0DE), 48 HN_ULONG_TO_UBASE(0x89D6726F), HN_ULONG_TO_UBASE(0x300A4BBC) 49 }, 50 51 /* 3G.y */ 52 { 53 HN_ULONG_TO_UBASE(0xC08127A0), HN_ULONG_TO_UBASE(0xAA54A291), 54 HN_ULONG_TO_UBASE(0xA9D806A5), HN_ULONG_TO_UBASE(0x5BB1EEAD), 55 HN_ULONG_TO_UBASE(0xFF1E3C6F), HN_ULONG_TO_UBASE(0x7F1DDB25), 56 HN_ULONG_TO_UBASE(0xD09B4644), HN_ULONG_TO_UBASE(0x72AAC7E0) 57 }, 58 59 /* 4G.x */ 60 { 61 HN_ULONG_TO_UBASE(0xD789BD85), HN_ULONG_TO_UBASE(0x57C84FC9), 62 HN_ULONG_TO_UBASE(0xC297EAC3), HN_ULONG_TO_UBASE(0xFC35FF7D), 63 HN_ULONG_TO_UBASE(0x88C6766E), HN_ULONG_TO_UBASE(0xFB982FD5), 64 HN_ULONG_TO_UBASE(0xEEDB5E67), HN_ULONG_TO_UBASE(0x447D739B) 65 }, 66 67 /* 4G.y */ 68 { 69 HN_ULONG_TO_UBASE(0x72E25B32), HN_ULONG_TO_UBASE(0x0C7E33C9), 70 HN_ULONG_TO_UBASE(0xA7FAE500), HN_ULONG_TO_UBASE(0x3D349B95), 71 HN_ULONG_TO_UBASE(0x3A4AAFF7), HN_ULONG_TO_UBASE(0xE12E9D95), 72 HN_ULONG_TO_UBASE(0x834131EE), HN_ULONG_TO_UBASE(0x2D4825AB) 73 }, 74 75 /* 5G.x */ 76 { 77 HN_ULONG_TO_UBASE(0x2A1D367F), HN_ULONG_TO_UBASE(0x13949C93), 78 HN_ULONG_TO_UBASE(0x1A0A11B7), HN_ULONG_TO_UBASE(0xEF7FBD2B), 79 HN_ULONG_TO_UBASE(0xB91DFC60), HN_ULONG_TO_UBASE(0xDDC6068B), 80 HN_ULONG_TO_UBASE(0x8A9C72FF), HN_ULONG_TO_UBASE(0xEF951932) 81 }, 82 83 /* 5G.y */ 84 { 85 HN_ULONG_TO_UBASE(0x7376D8A8), HN_ULONG_TO_UBASE(0x196035A7), 86 HN_ULONG_TO_UBASE(0x95CA1740), HN_ULONG_TO_UBASE(0x23183B08), 87 HN_ULONG_TO_UBASE(0x022C219C), HN_ULONG_TO_UBASE(0xC1EE9807), 88 HN_ULONG_TO_UBASE(0x7DBB2C9B), HN_ULONG_TO_UBASE(0x611E9FC3) 89 }, 90 91 /* 6G.x */ 92 { 93 HN_ULONG_TO_UBASE(0x0B57F4BC), HN_ULONG_TO_UBASE(0xCAE2B192), 94 HN_ULONG_TO_UBASE(0xC6C9BC36), HN_ULONG_TO_UBASE(0x2936DF5E), 95 HN_ULONG_TO_UBASE(0xE11238BF), HN_ULONG_TO_UBASE(0x7DEA6482), 96 HN_ULONG_TO_UBASE(0x7B51F5D8), HN_ULONG_TO_UBASE(0x55066379) 97 }, 98 99 /* 6G.y */ 100 { 101 HN_ULONG_TO_UBASE(0x348A964C), HN_ULONG_TO_UBASE(0x44FFE216), 102 HN_ULONG_TO_UBASE(0xDBDEFBE1), HN_ULONG_TO_UBASE(0x9FB3D576), 103 HN_ULONG_TO_UBASE(0x8D9D50E5), HN_ULONG_TO_UBASE(0x0AFA4001), 104 HN_ULONG_TO_UBASE(0x8AECB851), HN_ULONG_TO_UBASE(0x15716484) 105 }, 106 107 /* 7G.x */ 108 { 109 HN_ULONG_TO_UBASE(0xFC5CDE01), HN_ULONG_TO_UBASE(0xE48ECAFF), 110 HN_ULONG_TO_UBASE(0x0D715F26), HN_ULONG_TO_UBASE(0x7CCD84E7), 111 HN_ULONG_TO_UBASE(0xF43E4391), HN_ULONG_TO_UBASE(0xA2E8F483), 112 HN_ULONG_TO_UBASE(0xB21141EA), HN_ULONG_TO_UBASE(0xEB5D7745) 113 }, 114 115 /* 7G.y */ 116 { 117 HN_ULONG_TO_UBASE(0x731A3479), HN_ULONG_TO_UBASE(0xCAC917E2), 118 HN_ULONG_TO_UBASE(0x2844B645), HN_ULONG_TO_UBASE(0x85F22CFE), 119 HN_ULONG_TO_UBASE(0x58006CEE), HN_ULONG_TO_UBASE(0x0990E6A1), 120 HN_ULONG_TO_UBASE(0xDBECC17B), HN_ULONG_TO_UBASE(0xEAFD72EB) 121 }, 122 123 /* 8G.x */ 124 { 125 HN_ULONG_TO_UBASE(0x313728BE), HN_ULONG_TO_UBASE(0x6CF20FFB), 126 HN_ULONG_TO_UBASE(0xA3C6B94A), HN_ULONG_TO_UBASE(0x96439591), 127 HN_ULONG_TO_UBASE(0x44315FC5), HN_ULONG_TO_UBASE(0x2736FF83), 128 HN_ULONG_TO_UBASE(0xA7849276), HN_ULONG_TO_UBASE(0xA6D39677) 129 }, 130 131 /* 8G.y */ 132 { 133 HN_ULONG_TO_UBASE(0xC357F5F4), HN_ULONG_TO_UBASE(0xF2BAB833), 134 HN_ULONG_TO_UBASE(0x2284059B), HN_ULONG_TO_UBASE(0x824A920C), 135 HN_ULONG_TO_UBASE(0x2D27ECDF), HN_ULONG_TO_UBASE(0x66B8BABD), 136 HN_ULONG_TO_UBASE(0x9B0B8816), HN_ULONG_TO_UBASE(0x674F8474) 137 }, 138 139 /* 9G.x */ 140 { 141 HN_ULONG_TO_UBASE(0x677C8A3E), HN_ULONG_TO_UBASE(0x2DF48C04), 142 HN_ULONG_TO_UBASE(0x0203A56B), HN_ULONG_TO_UBASE(0x74E02F08), 143 HN_ULONG_TO_UBASE(0xB8C7FEDB), HN_ULONG_TO_UBASE(0x31855F7D), 144 HN_ULONG_TO_UBASE(0x72C9DDAD), HN_ULONG_TO_UBASE(0x4E769E76) 145 }, 146 147 /* 9G.y */ 148 { 149 HN_ULONG_TO_UBASE(0xB824BBB0), HN_ULONG_TO_UBASE(0xA4C36165), 150 HN_ULONG_TO_UBASE(0x3B9122A5), HN_ULONG_TO_UBASE(0xFB9AE16F), 151 HN_ULONG_TO_UBASE(0x06947281), HN_ULONG_TO_UBASE(0x1EC00572), 152 HN_ULONG_TO_UBASE(0xDE830663), HN_ULONG_TO_UBASE(0x42B99082) 153 }, 154 155 /* 10G.x */ 156 { 157 HN_ULONG_TO_UBASE(0xDDA868B9), HN_ULONG_TO_UBASE(0x6EF95150), 158 HN_ULONG_TO_UBASE(0x9C0CE131), HN_ULONG_TO_UBASE(0xD1F89E79), 159 HN_ULONG_TO_UBASE(0x08A1C478), HN_ULONG_TO_UBASE(0x7FDC1CA0), 160 HN_ULONG_TO_UBASE(0x1C6CE04D), HN_ULONG_TO_UBASE(0x78878EF6) 161 }, 162 163 /* 10G.y */ 164 { 165 HN_ULONG_TO_UBASE(0x1FE0D976), HN_ULONG_TO_UBASE(0x9C62B912), 166 HN_ULONG_TO_UBASE(0xBDE08D4F), HN_ULONG_TO_UBASE(0x6ACE570E), 167 HN_ULONG_TO_UBASE(0x12309DEF), HN_ULONG_TO_UBASE(0xDE53142C), 168 HN_ULONG_TO_UBASE(0x7B72C321), HN_ULONG_TO_UBASE(0xB6CB3F5D) 169 }, 170 171 /* 11G.x */ 172 { 173 HN_ULONG_TO_UBASE(0xC31A3573), HN_ULONG_TO_UBASE(0x7F991ED2), 174 HN_ULONG_TO_UBASE(0xD54FB496), HN_ULONG_TO_UBASE(0x5B82DD5B), 175 HN_ULONG_TO_UBASE(0x812FFCAE), HN_ULONG_TO_UBASE(0x595C5220), 176 HN_ULONG_TO_UBASE(0x716B1287), HN_ULONG_TO_UBASE(0x0C88BC4D) 177 }, 178 179 /* 11G.y */ 180 { 181 HN_ULONG_TO_UBASE(0x5F48ACA8), HN_ULONG_TO_UBASE(0x3A57BF63), 182 HN_ULONG_TO_UBASE(0xDF2564F3), HN_ULONG_TO_UBASE(0x7C8181F4), 183 HN_ULONG_TO_UBASE(0x9C04E6AA), HN_ULONG_TO_UBASE(0x18D1B5B3), 184 HN_ULONG_TO_UBASE(0xF3901DC6), HN_ULONG_TO_UBASE(0xDD5DDEA3) 185 }, 186 187 /* 12G.x */ 188 { 189 HN_ULONG_TO_UBASE(0x3E72AD0C), HN_ULONG_TO_UBASE(0xE96A79FB), 190 HN_ULONG_TO_UBASE(0x42BA792F), HN_ULONG_TO_UBASE(0x43A0A28C), 191 HN_ULONG_TO_UBASE(0x083E49F3), HN_ULONG_TO_UBASE(0xEFE0A423), 192 HN_ULONG_TO_UBASE(0x6B317466), HN_ULONG_TO_UBASE(0x68F344AF) 193 }, 194 195 /* 12G.y */ 196 { 197 HN_ULONG_TO_UBASE(0x3FB24D4A), HN_ULONG_TO_UBASE(0xCDFE17DB), 198 HN_ULONG_TO_UBASE(0x71F5C626), HN_ULONG_TO_UBASE(0x668BFC22), 199 HN_ULONG_TO_UBASE(0x24D67FF3), HN_ULONG_TO_UBASE(0x604ED93C), 200 HN_ULONG_TO_UBASE(0xF8540A20), HN_ULONG_TO_UBASE(0x31B9C405) 201 }, 202 203 /* 13G.x */ 204 { 205 HN_ULONG_TO_UBASE(0xA2582E7F), HN_ULONG_TO_UBASE(0xD36B4789), 206 HN_ULONG_TO_UBASE(0x4EC39C28), HN_ULONG_TO_UBASE(0x0D1A1014), 207 HN_ULONG_TO_UBASE(0xEDBAD7A0), HN_ULONG_TO_UBASE(0x663C62C3), 208 HN_ULONG_TO_UBASE(0x6F461DB9), HN_ULONG_TO_UBASE(0x4052BF4B) 209 }, 210 211 /* 13G.y */ 212 { 213 HN_ULONG_TO_UBASE(0x188D25EB), HN_ULONG_TO_UBASE(0x235A27C3), 214 HN_ULONG_TO_UBASE(0x99BFCC5B), HN_ULONG_TO_UBASE(0xE724F339), 215 HN_ULONG_TO_UBASE(0x71D70CC8), HN_ULONG_TO_UBASE(0x862BE6BD), 216 HN_ULONG_TO_UBASE(0x90B0FC61), HN_ULONG_TO_UBASE(0xFECF4D51) 217 }, 218 219 /* 14G.x */ 220 { 221 HN_ULONG_TO_UBASE(0xA1D4CFAC), HN_ULONG_TO_UBASE(0x74346C10), 222 HN_ULONG_TO_UBASE(0x8526A7A4), HN_ULONG_TO_UBASE(0xAFDF5CC0), 223 HN_ULONG_TO_UBASE(0xF62BFF7A), HN_ULONG_TO_UBASE(0x123202A8), 224 HN_ULONG_TO_UBASE(0xC802E41A), HN_ULONG_TO_UBASE(0x1EDDBAE2) 225 }, 226 227 /* 14G.y */ 228 { 229 HN_ULONG_TO_UBASE(0xD603F844), HN_ULONG_TO_UBASE(0x8FA0AF2D), 230 HN_ULONG_TO_UBASE(0x4C701917), HN_ULONG_TO_UBASE(0x36E06B7E), 231 HN_ULONG_TO_UBASE(0x73DB33A0), HN_ULONG_TO_UBASE(0x0C45F452), 232 HN_ULONG_TO_UBASE(0x560EBCFC), HN_ULONG_TO_UBASE(0x43104D86) 233 }, 234 235 /* 15G.x */ 236 { 237 HN_ULONG_TO_UBASE(0x0D1D78E5), HN_ULONG_TO_UBASE(0x9615B511), 238 HN_ULONG_TO_UBASE(0x25C4744B), HN_ULONG_TO_UBASE(0x66B0DE32), 239 HN_ULONG_TO_UBASE(0x6AAF363A), HN_ULONG_TO_UBASE(0x0A4A46FB), 240 HN_ULONG_TO_UBASE(0x84F7A21C), HN_ULONG_TO_UBASE(0xB48E26B4) 241 }, 242 243 /* 15G.y */ 244 { 245 HN_ULONG_TO_UBASE(0x21A01B2D), HN_ULONG_TO_UBASE(0x06EBB0F6), 246 HN_ULONG_TO_UBASE(0x8B7B0F98), HN_ULONG_TO_UBASE(0xC004E404), 247 HN_ULONG_TO_UBASE(0xFED6F668), HN_ULONG_TO_UBASE(0x64131BCD), 248 HN_ULONG_TO_UBASE(0x4D4D3DAB), HN_ULONG_TO_UBASE(0xFAC01540) 249 } 250 }; 251 static NX_CRYPTO_CONST HN_UBASE secp256r1_fixed_points_2e_data[][32 >> HN_SIZE_SHIFT] = 252 { 253 254 /* 2^e * 1G.x */ 255 { 256 HN_ULONG_TO_UBASE(0x185A5943), HN_ULONG_TO_UBASE(0x3A5A9E22), 257 HN_ULONG_TO_UBASE(0x5C65DFB6), HN_ULONG_TO_UBASE(0x1AB91936), 258 HN_ULONG_TO_UBASE(0x262C71DA), HN_ULONG_TO_UBASE(0x21656B32), 259 HN_ULONG_TO_UBASE(0xAF22AF89), HN_ULONG_TO_UBASE(0x7FE36B40) 260 }, 261 262 /* 2^e * 1G.y */ 263 { 264 HN_ULONG_TO_UBASE(0x699CA101), HN_ULONG_TO_UBASE(0xD50D152C), 265 HN_ULONG_TO_UBASE(0x7B8AF212), HN_ULONG_TO_UBASE(0x74B3D586), 266 HN_ULONG_TO_UBASE(0x07DCA6F1), HN_ULONG_TO_UBASE(0x9F09F404), 267 HN_ULONG_TO_UBASE(0x25B63624), HN_ULONG_TO_UBASE(0xE697D458) 268 }, 269 270 /* 2^e * 2G.x */ 271 { 272 HN_ULONG_TO_UBASE(0x7512218E), HN_ULONG_TO_UBASE(0xA84AA939), 273 HN_ULONG_TO_UBASE(0x74CA0141), HN_ULONG_TO_UBASE(0xE9A521B0), 274 HN_ULONG_TO_UBASE(0x18A2E902), HN_ULONG_TO_UBASE(0x57880B3A), 275 HN_ULONG_TO_UBASE(0x12A677A6), HN_ULONG_TO_UBASE(0x4A5B5066) 276 }, 277 278 /* 2^e * 2G.y */ 279 { 280 HN_ULONG_TO_UBASE(0x4C4F3840), HN_ULONG_TO_UBASE(0x0BEADA7A), 281 HN_ULONG_TO_UBASE(0x19E26D9D), HN_ULONG_TO_UBASE(0x626DB154), 282 HN_ULONG_TO_UBASE(0xE1627D40), HN_ULONG_TO_UBASE(0xC42604FB), 283 HN_ULONG_TO_UBASE(0xEAC089F1), HN_ULONG_TO_UBASE(0xEB13461C) 284 }, 285 286 /* 2^e * 3G.x */ 287 { 288 HN_ULONG_TO_UBASE(0x27A43281), HN_ULONG_TO_UBASE(0xF9FAED09), 289 HN_ULONG_TO_UBASE(0x4103ECBC), HN_ULONG_TO_UBASE(0x5E52C414), 290 HN_ULONG_TO_UBASE(0xA815C857), HN_ULONG_TO_UBASE(0xC342967A), 291 HN_ULONG_TO_UBASE(0x1C6A220A), HN_ULONG_TO_UBASE(0x0781B829) 292 }, 293 294 /* 2^e * 3G.y */ 295 { 296 HN_ULONG_TO_UBASE(0xEAC55F80), HN_ULONG_TO_UBASE(0x5A8343CE), 297 HN_ULONG_TO_UBASE(0xE54A05E3), HN_ULONG_TO_UBASE(0x88F80EEE), 298 HN_ULONG_TO_UBASE(0x12916434), HN_ULONG_TO_UBASE(0x97B2A14F), 299 HN_ULONG_TO_UBASE(0xF0151593), HN_ULONG_TO_UBASE(0x690CDE8D) 300 }, 301 302 /* 2^e * 4G.x */ 303 { 304 HN_ULONG_TO_UBASE(0xF7F82F2A), HN_ULONG_TO_UBASE(0xAEE9C75D), 305 HN_ULONG_TO_UBASE(0x4AFDF43A), HN_ULONG_TO_UBASE(0x9E4C3587), 306 HN_ULONG_TO_UBASE(0x37371326), HN_ULONG_TO_UBASE(0xF5622DF4), 307 HN_ULONG_TO_UBASE(0x6EC73617), HN_ULONG_TO_UBASE(0x8A535F56) 308 }, 309 310 /* 2^e * 4G.y */ 311 { 312 HN_ULONG_TO_UBASE(0x223094B7), HN_ULONG_TO_UBASE(0xC5F9A0AC), 313 HN_ULONG_TO_UBASE(0x4C8C7669), HN_ULONG_TO_UBASE(0xCDE53386), 314 HN_ULONG_TO_UBASE(0x085A92BF), HN_ULONG_TO_UBASE(0x37E02819), 315 HN_ULONG_TO_UBASE(0x68B08BD7), HN_ULONG_TO_UBASE(0x0455C084) 316 }, 317 318 /* 2^e * 5G.x */ 319 { 320 HN_ULONG_TO_UBASE(0x9477B5D9), HN_ULONG_TO_UBASE(0x0C0A6E2C), 321 HN_ULONG_TO_UBASE(0x876DC444), HN_ULONG_TO_UBASE(0xF9A4BF62), 322 HN_ULONG_TO_UBASE(0xB6CDC279), HN_ULONG_TO_UBASE(0x5050A949), 323 HN_ULONG_TO_UBASE(0xB77F8276), HN_ULONG_TO_UBASE(0x06BADA7A) 324 }, 325 326 /* 2^e * 5G.y */ 327 { 328 HN_ULONG_TO_UBASE(0xEA48DAC9), HN_ULONG_TO_UBASE(0xC8B4AED1), 329 HN_ULONG_TO_UBASE(0x7EA1070F), HN_ULONG_TO_UBASE(0xDEBD8A4B), 330 HN_ULONG_TO_UBASE(0x1366EB70), HN_ULONG_TO_UBASE(0x427D4910), 331 HN_ULONG_TO_UBASE(0x0E6CB18A), HN_ULONG_TO_UBASE(0x5B476DFD) 332 }, 333 334 /* 2^e * 6G.x */ 335 { 336 HN_ULONG_TO_UBASE(0x278C340A), HN_ULONG_TO_UBASE(0x7C5C3E44), 337 HN_ULONG_TO_UBASE(0x12D66F3B), HN_ULONG_TO_UBASE(0x4D546068), 338 HN_ULONG_TO_UBASE(0xAE23C5D8), HN_ULONG_TO_UBASE(0x29A751B1), 339 HN_ULONG_TO_UBASE(0x8A2EC908), HN_ULONG_TO_UBASE(0x3E29864E) 340 }, 341 342 /* 2^e * 6G.y */ 343 { 344 HN_ULONG_TO_UBASE(0x26DBB850), HN_ULONG_TO_UBASE(0x142D2A66), 345 HN_ULONG_TO_UBASE(0x765BD780), HN_ULONG_TO_UBASE(0xAD1744C4), 346 HN_ULONG_TO_UBASE(0xE322D1ED), HN_ULONG_TO_UBASE(0x1F150E68), 347 HN_ULONG_TO_UBASE(0x3DC31E7E), HN_ULONG_TO_UBASE(0x239B90EA) 348 }, 349 350 /* 2^e * 7G.x */ 351 { 352 HN_ULONG_TO_UBASE(0x7A53322A), HN_ULONG_TO_UBASE(0x78C41652), 353 HN_ULONG_TO_UBASE(0x09776F8E), HN_ULONG_TO_UBASE(0x305DDE67), 354 HN_ULONG_TO_UBASE(0xF8862ED4), HN_ULONG_TO_UBASE(0xDBCAB759), 355 HN_ULONG_TO_UBASE(0x49F72FF7), HN_ULONG_TO_UBASE(0x820F4DD9) 356 }, 357 358 /* 2^e * 7G.y */ 359 { 360 HN_ULONG_TO_UBASE(0x2B5DEBD4), HN_ULONG_TO_UBASE(0x6CC544A6), 361 HN_ULONG_TO_UBASE(0x7B4E8CC4), HN_ULONG_TO_UBASE(0x75BE5D93), 362 HN_ULONG_TO_UBASE(0x215C14D3), HN_ULONG_TO_UBASE(0x1B481B1B), 363 HN_ULONG_TO_UBASE(0x783A05EC), HN_ULONG_TO_UBASE(0x140406EC) 364 }, 365 366 /* 2^e * 8G.x */ 367 { 368 HN_ULONG_TO_UBASE(0xE895DF07), HN_ULONG_TO_UBASE(0x6A703F10), 369 HN_ULONG_TO_UBASE(0x01876BD8), HN_ULONG_TO_UBASE(0xFD75F3FA), 370 HN_ULONG_TO_UBASE(0x0CE08FFE), HN_ULONG_TO_UBASE(0xEB5B06E7), 371 HN_ULONG_TO_UBASE(0x2783DFEE), HN_ULONG_TO_UBASE(0x68F6B854) 372 }, 373 374 /* 2^e * 8G.y */ 375 { 376 HN_ULONG_TO_UBASE(0x78712655), HN_ULONG_TO_UBASE(0x90C76F8A), 377 HN_ULONG_TO_UBASE(0xF310BF7F), HN_ULONG_TO_UBASE(0xCF5293D2), 378 HN_ULONG_TO_UBASE(0xFDA45028), HN_ULONG_TO_UBASE(0xFBC8044D), 379 HN_ULONG_TO_UBASE(0x92E40CE6), HN_ULONG_TO_UBASE(0xCBE1FEBA) 380 }, 381 382 /* 2^e * 9G.x */ 383 { 384 HN_ULONG_TO_UBASE(0x4396E4C1), HN_ULONG_TO_UBASE(0xE998CEEA), 385 HN_ULONG_TO_UBASE(0x6ACEA274), HN_ULONG_TO_UBASE(0xFC82EF0B), 386 HN_ULONG_TO_UBASE(0x2250E927), HN_ULONG_TO_UBASE(0x230F729F), 387 HN_ULONG_TO_UBASE(0x2F420109), HN_ULONG_TO_UBASE(0xD0B2F94D) 388 }, 389 390 /* 2^e * 9G.y */ 391 { 392 HN_ULONG_TO_UBASE(0xB38D4966), HN_ULONG_TO_UBASE(0x4305ADDD), 393 HN_ULONG_TO_UBASE(0x624C3B45), HN_ULONG_TO_UBASE(0x10B838F8), 394 HN_ULONG_TO_UBASE(0x58954E7A), HN_ULONG_TO_UBASE(0x7DB26366), 395 HN_ULONG_TO_UBASE(0x8B0719E5), HN_ULONG_TO_UBASE(0x97145982) 396 }, 397 398 /* 2^e * 10G.x */ 399 { 400 HN_ULONG_TO_UBASE(0x23369FC9), HN_ULONG_TO_UBASE(0x4BD6B726), 401 HN_ULONG_TO_UBASE(0x53D0B876), HN_ULONG_TO_UBASE(0x57F2929E), 402 HN_ULONG_TO_UBASE(0xF2340687), HN_ULONG_TO_UBASE(0xC2D5CBA4), 403 HN_ULONG_TO_UBASE(0x4A866ABA), HN_ULONG_TO_UBASE(0x96161000) 404 }, 405 406 /* 2^e * 10G.y */ 407 { 408 HN_ULONG_TO_UBASE(0x2E407A5E), HN_ULONG_TO_UBASE(0x49997BCD), 409 HN_ULONG_TO_UBASE(0x92DDCB24), HN_ULONG_TO_UBASE(0x69AB197D), 410 HN_ULONG_TO_UBASE(0x8FE5131C), HN_ULONG_TO_UBASE(0x2CF1F243), 411 HN_ULONG_TO_UBASE(0xCEE75E44), HN_ULONG_TO_UBASE(0x7ACB9FAD) 412 }, 413 414 /* 2^e * 11G.x */ 415 { 416 HN_ULONG_TO_UBASE(0x23D2D4C0), HN_ULONG_TO_UBASE(0x254E8394), 417 HN_ULONG_TO_UBASE(0x7AEA685B), HN_ULONG_TO_UBASE(0xF57F0C91), 418 HN_ULONG_TO_UBASE(0x6F75AAEA), HN_ULONG_TO_UBASE(0xA60D880F), 419 HN_ULONG_TO_UBASE(0xA333BF5B), HN_ULONG_TO_UBASE(0x24EB9ACC) 420 }, 421 422 /* 2^e * 11G.y */ 423 { 424 HN_ULONG_TO_UBASE(0x1CDA5DEA), HN_ULONG_TO_UBASE(0xE3DE4CCB), 425 HN_ULONG_TO_UBASE(0xC51A6B4F), HN_ULONG_TO_UBASE(0xFEEF9341), 426 HN_ULONG_TO_UBASE(0x8BAC4C4D), HN_ULONG_TO_UBASE(0x743125F8), 427 HN_ULONG_TO_UBASE(0xACD079CC), HN_ULONG_TO_UBASE(0x69F891C5) 428 }, 429 430 /* 2^e * 12G.x */ 431 { 432 HN_ULONG_TO_UBASE(0x702476B5), HN_ULONG_TO_UBASE(0xEEE44B35), 433 HN_ULONG_TO_UBASE(0xE45C2258), HN_ULONG_TO_UBASE(0x7ED031A0), 434 HN_ULONG_TO_UBASE(0xBD6F8514), HN_ULONG_TO_UBASE(0xB422D1E7), 435 HN_ULONG_TO_UBASE(0x5972A107), HN_ULONG_TO_UBASE(0xE51F547C) 436 }, 437 438 /* 2^e * 12G.y */ 439 { 440 HN_ULONG_TO_UBASE(0xC9CF343D), HN_ULONG_TO_UBASE(0xA25BCD6F), 441 HN_ULONG_TO_UBASE(0x097C184E), HN_ULONG_TO_UBASE(0x8CA922EE), 442 HN_ULONG_TO_UBASE(0xA9FE9A06), HN_ULONG_TO_UBASE(0xA62F98B3), 443 HN_ULONG_TO_UBASE(0x25BB1387), HN_ULONG_TO_UBASE(0x1C309A2B) 444 }, 445 446 /* 2^e * 13G.x */ 447 { 448 HN_ULONG_TO_UBASE(0x1967C459), HN_ULONG_TO_UBASE(0x9295DBEB), 449 HN_ULONG_TO_UBASE(0x3472C98E), HN_ULONG_TO_UBASE(0xB0014883), 450 HN_ULONG_TO_UBASE(0x08011828), HN_ULONG_TO_UBASE(0xC5049777), 451 HN_ULONG_TO_UBASE(0xA2C4E503), HN_ULONG_TO_UBASE(0x20B87B8A) 452 }, 453 454 /* 2^e * 13G.y */ 455 { 456 HN_ULONG_TO_UBASE(0xE057C277), HN_ULONG_TO_UBASE(0x3063175D), 457 HN_ULONG_TO_UBASE(0x8FE582DD), HN_ULONG_TO_UBASE(0x1BD53933), 458 HN_ULONG_TO_UBASE(0x5F69A044), HN_ULONG_TO_UBASE(0x0D11ADEF), 459 HN_ULONG_TO_UBASE(0x919776BE), HN_ULONG_TO_UBASE(0xF5C6FA49) 460 }, 461 462 /* 2^e * 14G.x */ 463 { 464 HN_ULONG_TO_UBASE(0x0FD59E11), HN_ULONG_TO_UBASE(0x8C944E76), 465 HN_ULONG_TO_UBASE(0x102FAD5F), HN_ULONG_TO_UBASE(0x3876CBA1), 466 HN_ULONG_TO_UBASE(0xD83FAA56), HN_ULONG_TO_UBASE(0xA454C3FA), 467 HN_ULONG_TO_UBASE(0x332010B9), HN_ULONG_TO_UBASE(0x1ED7D1B9) 468 }, 469 470 /* 2^e * 14G.y */ 471 { 472 HN_ULONG_TO_UBASE(0x0024B889), HN_ULONG_TO_UBASE(0xA1011A27), 473 HN_ULONG_TO_UBASE(0xAC0CD344), HN_ULONG_TO_UBASE(0x05E4D0DC), 474 HN_ULONG_TO_UBASE(0xEB6A2A24), HN_ULONG_TO_UBASE(0x52B520F0), 475 HN_ULONG_TO_UBASE(0x3217257A), HN_ULONG_TO_UBASE(0x3A2B03F0) 476 }, 477 478 /* 2^e * 15G.x */ 479 { 480 HN_ULONG_TO_UBASE(0xDF1D043D), HN_ULONG_TO_UBASE(0xF20FC2AF), 481 HN_ULONG_TO_UBASE(0xB58D5A62), HN_ULONG_TO_UBASE(0xF330240D), 482 HN_ULONG_TO_UBASE(0xA0058C3B), HN_ULONG_TO_UBASE(0xFC7D229C), 483 HN_ULONG_TO_UBASE(0xC78DD9F6), HN_ULONG_TO_UBASE(0x15FEE545) 484 }, 485 486 /* 2^e * 15G.y */ 487 { 488 HN_ULONG_TO_UBASE(0x5BC98CDA), HN_ULONG_TO_UBASE(0x501E8288), 489 HN_ULONG_TO_UBASE(0xD046AC04), HN_ULONG_TO_UBASE(0x41EF80E5), 490 HN_ULONG_TO_UBASE(0x461210FB), HN_ULONG_TO_UBASE(0x557D9F49), 491 HN_ULONG_TO_UBASE(0xB8753F81), HN_ULONG_TO_UBASE(0x4AB5B6B2) 492 } 493 }; 494 static NX_CRYPTO_CONST NX_CRYPTO_EC_POINT secp256r1_fixed_points_array[] = 495 { 496 497 /* 2G */ 498 { 499 NX_CRYPTO_EC_POINT_AFFINE, 500 { 501 (HN_UBASE *)&secp256r1_fixed_points_data[0], 502 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 503 }, 504 { 505 (HN_UBASE *)&secp256r1_fixed_points_data[1], 506 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 507 }, 508 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 509 }, 510 511 /* 3G */ 512 { 513 NX_CRYPTO_EC_POINT_AFFINE, 514 { 515 (HN_UBASE *)&secp256r1_fixed_points_data[2], 516 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 517 }, 518 { 519 (HN_UBASE *)&secp256r1_fixed_points_data[3], 520 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 521 }, 522 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 523 }, 524 525 /* 4G */ 526 { 527 NX_CRYPTO_EC_POINT_AFFINE, 528 { 529 (HN_UBASE *)&secp256r1_fixed_points_data[4], 530 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 531 }, 532 { 533 (HN_UBASE *)&secp256r1_fixed_points_data[5], 534 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 535 }, 536 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 537 }, 538 539 /* 5G */ 540 { 541 NX_CRYPTO_EC_POINT_AFFINE, 542 { 543 (HN_UBASE *)&secp256r1_fixed_points_data[6], 544 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 545 }, 546 { 547 (HN_UBASE *)&secp256r1_fixed_points_data[7], 548 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 549 }, 550 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 551 }, 552 553 /* 6G */ 554 { 555 NX_CRYPTO_EC_POINT_AFFINE, 556 { 557 (HN_UBASE *)&secp256r1_fixed_points_data[8], 558 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 559 }, 560 { 561 (HN_UBASE *)&secp256r1_fixed_points_data[9], 562 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 563 }, 564 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 565 }, 566 567 /* 7G */ 568 { 569 NX_CRYPTO_EC_POINT_AFFINE, 570 { 571 (HN_UBASE *)&secp256r1_fixed_points_data[10], 572 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 573 }, 574 { 575 (HN_UBASE *)&secp256r1_fixed_points_data[11], 576 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 577 }, 578 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 579 }, 580 581 /* 8G */ 582 { 583 NX_CRYPTO_EC_POINT_AFFINE, 584 { 585 (HN_UBASE *)&secp256r1_fixed_points_data[12], 586 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 587 }, 588 { 589 (HN_UBASE *)&secp256r1_fixed_points_data[13], 590 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 591 }, 592 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 593 }, 594 595 /* 9G */ 596 { 597 NX_CRYPTO_EC_POINT_AFFINE, 598 { 599 (HN_UBASE *)&secp256r1_fixed_points_data[14], 600 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 601 }, 602 { 603 (HN_UBASE *)&secp256r1_fixed_points_data[15], 604 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 605 }, 606 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 607 }, 608 609 /* 10G */ 610 { 611 NX_CRYPTO_EC_POINT_AFFINE, 612 { 613 (HN_UBASE *)&secp256r1_fixed_points_data[16], 614 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 615 }, 616 { 617 (HN_UBASE *)&secp256r1_fixed_points_data[17], 618 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 619 }, 620 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 621 }, 622 623 /* 11G */ 624 { 625 NX_CRYPTO_EC_POINT_AFFINE, 626 { 627 (HN_UBASE *)&secp256r1_fixed_points_data[18], 628 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 629 }, 630 { 631 (HN_UBASE *)&secp256r1_fixed_points_data[19], 632 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 633 }, 634 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 635 }, 636 637 /* 12G */ 638 { 639 NX_CRYPTO_EC_POINT_AFFINE, 640 { 641 (HN_UBASE *)&secp256r1_fixed_points_data[20], 642 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 643 }, 644 { 645 (HN_UBASE *)&secp256r1_fixed_points_data[21], 646 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 647 }, 648 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 649 }, 650 651 /* 13G */ 652 { 653 NX_CRYPTO_EC_POINT_AFFINE, 654 { 655 (HN_UBASE *)&secp256r1_fixed_points_data[22], 656 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 657 }, 658 { 659 (HN_UBASE *)&secp256r1_fixed_points_data[23], 660 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 661 }, 662 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 663 }, 664 665 /* 14G */ 666 { 667 NX_CRYPTO_EC_POINT_AFFINE, 668 { 669 (HN_UBASE *)&secp256r1_fixed_points_data[24], 670 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 671 }, 672 { 673 (HN_UBASE *)&secp256r1_fixed_points_data[25], 674 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 675 }, 676 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 677 }, 678 679 /* 15G */ 680 { 681 NX_CRYPTO_EC_POINT_AFFINE, 682 { 683 (HN_UBASE *)&secp256r1_fixed_points_data[26], 684 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 685 }, 686 { 687 (HN_UBASE *)&secp256r1_fixed_points_data[27], 688 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 689 }, 690 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 691 } 692 }; 693 static NX_CRYPTO_CONST NX_CRYPTO_EC_POINT secp256r1_fixed_points_2e_array[] = 694 { 695 696 /* 2^e * 1G */ 697 { 698 NX_CRYPTO_EC_POINT_AFFINE, 699 { 700 (HN_UBASE *)&secp256r1_fixed_points_2e_data[0], 701 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 702 }, 703 { 704 (HN_UBASE *)&secp256r1_fixed_points_2e_data[1], 705 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 706 }, 707 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 708 }, 709 710 /* 2^e * 2G */ 711 { 712 NX_CRYPTO_EC_POINT_AFFINE, 713 { 714 (HN_UBASE *)&secp256r1_fixed_points_2e_data[2], 715 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 716 }, 717 { 718 (HN_UBASE *)&secp256r1_fixed_points_2e_data[3], 719 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 720 }, 721 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 722 }, 723 724 /* 2^e * 3G */ 725 { 726 NX_CRYPTO_EC_POINT_AFFINE, 727 { 728 (HN_UBASE *)&secp256r1_fixed_points_2e_data[4], 729 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 730 }, 731 { 732 (HN_UBASE *)&secp256r1_fixed_points_2e_data[5], 733 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 734 }, 735 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 736 }, 737 738 /* 2^e * 4G */ 739 { 740 NX_CRYPTO_EC_POINT_AFFINE, 741 { 742 (HN_UBASE *)&secp256r1_fixed_points_2e_data[6], 743 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 744 }, 745 { 746 (HN_UBASE *)&secp256r1_fixed_points_2e_data[7], 747 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 748 }, 749 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 750 }, 751 752 /* 2^e * 5G */ 753 { 754 NX_CRYPTO_EC_POINT_AFFINE, 755 { 756 (HN_UBASE *)&secp256r1_fixed_points_2e_data[8], 757 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 758 }, 759 { 760 (HN_UBASE *)&secp256r1_fixed_points_2e_data[9], 761 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 762 }, 763 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 764 }, 765 766 /* 2^e * 6G */ 767 { 768 NX_CRYPTO_EC_POINT_AFFINE, 769 { 770 (HN_UBASE *)&secp256r1_fixed_points_2e_data[10], 771 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 772 }, 773 { 774 (HN_UBASE *)&secp256r1_fixed_points_2e_data[11], 775 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 776 }, 777 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 778 }, 779 780 /* 2^e * 7G */ 781 { 782 NX_CRYPTO_EC_POINT_AFFINE, 783 { 784 (HN_UBASE *)&secp256r1_fixed_points_2e_data[12], 785 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 786 }, 787 { 788 (HN_UBASE *)&secp256r1_fixed_points_2e_data[13], 789 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 790 }, 791 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 792 }, 793 794 /* 2^e * 8G */ 795 { 796 NX_CRYPTO_EC_POINT_AFFINE, 797 { 798 (HN_UBASE *)&secp256r1_fixed_points_2e_data[14], 799 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 800 }, 801 { 802 (HN_UBASE *)&secp256r1_fixed_points_2e_data[15], 803 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 804 }, 805 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 806 }, 807 808 /* 2^e * 9G */ 809 { 810 NX_CRYPTO_EC_POINT_AFFINE, 811 { 812 (HN_UBASE *)&secp256r1_fixed_points_2e_data[16], 813 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 814 }, 815 { 816 (HN_UBASE *)&secp256r1_fixed_points_2e_data[17], 817 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 818 }, 819 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 820 }, 821 822 /* 2^e * 10G */ 823 { 824 NX_CRYPTO_EC_POINT_AFFINE, 825 { 826 (HN_UBASE *)&secp256r1_fixed_points_2e_data[18], 827 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 828 }, 829 { 830 (HN_UBASE *)&secp256r1_fixed_points_2e_data[19], 831 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 832 }, 833 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 834 }, 835 836 /* 2^e * 11G */ 837 { 838 NX_CRYPTO_EC_POINT_AFFINE, 839 { 840 (HN_UBASE *)&secp256r1_fixed_points_2e_data[20], 841 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 842 }, 843 { 844 (HN_UBASE *)&secp256r1_fixed_points_2e_data[21], 845 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 846 }, 847 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 848 }, 849 850 /* 2^e * 12G */ 851 { 852 NX_CRYPTO_EC_POINT_AFFINE, 853 { 854 (HN_UBASE *)&secp256r1_fixed_points_2e_data[22], 855 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 856 }, 857 { 858 (HN_UBASE *)&secp256r1_fixed_points_2e_data[23], 859 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 860 }, 861 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 862 }, 863 864 /* 2^e * 13G */ 865 { 866 NX_CRYPTO_EC_POINT_AFFINE, 867 { 868 (HN_UBASE *)&secp256r1_fixed_points_2e_data[24], 869 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 870 }, 871 { 872 (HN_UBASE *)&secp256r1_fixed_points_2e_data[25], 873 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 874 }, 875 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 876 }, 877 878 /* 2^e * 14G */ 879 { 880 NX_CRYPTO_EC_POINT_AFFINE, 881 { 882 (HN_UBASE *)&secp256r1_fixed_points_2e_data[26], 883 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 884 }, 885 { 886 (HN_UBASE *)&secp256r1_fixed_points_2e_data[27], 887 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 888 }, 889 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 890 }, 891 892 /* 2^e * 15G */ 893 { 894 NX_CRYPTO_EC_POINT_AFFINE, 895 { 896 (HN_UBASE *)&secp256r1_fixed_points_2e_data[28], 897 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 898 }, 899 { 900 (HN_UBASE *)&secp256r1_fixed_points_2e_data[29], 901 32 >> HN_SIZE_SHIFT, 32, (UINT)NX_CRYPTO_FALSE 902 }, 903 {(HN_UBASE *)NX_CRYPTO_NULL, 0u, 0u, 0u} 904 } 905 }; 906 907 908 NX_CRYPTO_CONST NX_CRYPTO_EC_FIXED_POINTS _nx_crypto_ec_secp256r1_fixed_points = 909 { 910 4u, 256u, 64u, 32u, 911 (NX_CRYPTO_EC_POINT *)secp256r1_fixed_points_array, 912 (NX_CRYPTO_EC_POINT *)secp256r1_fixed_points_2e_array 913 }; 914 915