ECCParamsLPF3HSM.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*
33  * ======== ECCParamsLPF3HSM.h ========
34  *
35  * This file contains structure declarations for various ECC curves for use
36  * on CC27XX devices.
37  */
38 
39 /* For curves with parameter lengths that are not divisible by 4 (which
40  * is only the case on NISTP521 curves), 2 bytes of 0s must be added to
41  * the parameter buffers
42  */
43 #define HSM_PADDED_PARAM_BYTES 2
44 
45 /* The HSM requires base points of ECC multiplications to have padding bytes
46  * between the X and Y components, depending on the number of words that are
47  * required per component.
48  */
49 #define PADDING_BYTES_EVEN 8
50 #define PADDING_BYTES_ODD 12
51 
60 #define ECCParams_NISTP192_LENGTH 24
61 
65 typedef union
66 {
68  uint32_t word[ECCParams_NISTP192_LENGTH / sizeof(uint32_t)];
70 
75 
80 
85 
91 
97 
102 
107 
112 
117  /* end of nistp192_params */
119 
128 #define ECCParams_NISTP384_LENGTH 48
129 
133 typedef union
134 {
136  uint32_t word[ECCParams_NISTP384_LENGTH / sizeof(uint32_t)];
138 
143 
148 
153 
159 
165 
170 
175 
180 
185  /* end of nistp384_params */
187 
196 #define ECCParams_NISTP521_LENGTH 66
197 
203 #define ECC_NISTP521_PARAM_LENGTH_WITH_PADDED_BYTES (ECCParams_NISTP521_LENGTH + HSM_PADDED_PARAM_BYTES)
204 
208 typedef union
209 {
211  uint32_t word[ECC_NISTP521_PARAM_LENGTH_WITH_PADDED_BYTES / sizeof(uint32_t)];
213 
218 
223 
228 
234 
240 
245 
250 
255 
260  /* end of nistp521_params */
262 
271 #define ECCParams_BrainpoolP256R1_LENGTH 32
272 
276 typedef union
277 {
279  uint32_t word[ECCParams_BrainpoolP256R1_LENGTH / sizeof(uint32_t)];
281 
286 
291 
296 
302 
308 
313 
318 
323 
328  /* end of BrainpoolP256R1_params */
330 
339 #define ECCParams_BrainpoolP384R1_LENGTH 48
340 
344 typedef union
345 {
347  uint32_t word[ECCParams_BrainpoolP384R1_LENGTH / sizeof(uint32_t)];
349 
354 
359 
364 
370 
376 
381 
386 
391 
396  /* end of BrainpoolP384R1_params */
398 
407 #define ECCParams_BrainpoolP512R1_LENGTH 64
408 
412 typedef union
413 {
415  uint32_t word[ECCParams_BrainpoolP512R1_LENGTH / sizeof(uint32_t)];
417 
422 
427 
432 
438 
444 
449 
454 
459 
464  /* end of BrainpoolP512R1_params */
const ECC_NISTP521_Param ECC_NISTP521_b
'b' constant of the ECC_NISTP521 curve when expressed in short Weierstrass form (y^2 = x^3 + a*x + b)...
const ECC_NISTP384_Param ECC_NISTP384_generatorY
Y coordinate of the generator point of the ECC_NISTP384 curve.
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_a
'a' constant of the ECC_BrainpoolP512R1 curve when expressed in short Weierstrass form (y^2 = x^3 + a...
const ECC_NISTP384_Param ECC_NISTP384_b_mont
'b' in Montgomery domain of the ECC_NISTP384 curve.
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_generatorX
X coordinate of the generator point of the ECC_BrainpoolP512R1 curve.
const ECC_NISTP192_Param ECC_NISTP192_b_mont
'b' in Montgomery domain of the ECC_NISTP192 curve.
const ECC_NISTP521_Param ECC_NISTP521_k_mont
'k' in Montgomery domain of the ECC_NISTP521 curve.
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_a_mont
'a' in Montgomery domain of the ECC_BrainpoolP384R1 curve.
const ECC_NISTP192_Param ECC_NISTP192_prime
Prime of the generator point of the ECC_NISTP192 curve.
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_a
'a' constant of the ECC_BrainpoolP384R1 curve when expressed in short Weierstrass form (y^2 = x^3 + a...
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_prime
Prime of the generator point of the ECC_BrainpoolP384R1 curve.
const ECC_NISTP384_Param ECC_NISTP384_order
Order of the generator point of the ECC_NISTP384 curve.
const ECC_NISTP521_Param ECC_NISTP521_generatorY
Y coordinate of the generator point of the ECC_NISTP521 curve.
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_b
'b' constant of the ECC_BrainpoolP384R1 curve when expressed in short Weierstrass form (y^2 = x^3 + a...
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_generatorY
Y coordinate of the generator point of the ECC_BrainpoolP512R1 curve.
Union to access ECC_BrainpoolP384R1 curve params in bytes or words.
Definition: ECCParamsLPF3HSM.h:344
const ECC_NISTP384_Param ECC_NISTP384_a
'a' constant of the ECC_NISTP384 curve when expressed in short Weierstrass form (y^2 = x^3 + a*x + b)...
Union to access ECC_NISTP384 curve params in bytes or words.
Definition: ECCParamsLPF3HSM.h:133
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_prime
Prime of the generator point of the ECC_BrainpoolP256R1 curve.
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_generatorX
X coordinate of the generator point of the ECC_BrainpoolP384R1 curve.
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_generatorY
Y coordinate of the generator point of the ECC_BrainpoolP256R1 curve.
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_b_mont
'b' in Montgomery domain of the ECC_BrainpoolP512R1 curve.
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_b
'b' constant of the ECC_BrainpoolP256R1 curve when expressed in short Weierstrass form (y^2 = x^3 + a...
const ECC_NISTP384_Param ECC_NISTP384_b
'b' constant of the ECC_NISTP384 curve when expressed in short Weierstrass form (y^2 = x^3 + a*x + b)...
const ECC_NISTP521_Param ECC_NISTP521_prime
Prime of the generator point of the ECC_NISTP521 curve.
const ECC_NISTP521_Param ECC_NISTP521_b_mont
'b' in Montgomery domain of the ECC_NISTP521 curve.
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_b_mont
'b' in Montgomery domain of the ECC_BrainpoolP384R1 curve.
#define ECCParams_NISTP192_LENGTH
Length of NIST P192 curve parameters in bytes.
Definition: ECCParamsLPF3HSM.h:60
const ECC_NISTP192_Param ECC_NISTP192_k_mont
'k' in Montgomery domain of the ECC_NISTP192 curve.
const ECC_NISTP384_Param ECC_NISTP384_prime
Prime of the generator point of the ECC_NISTP384 curve.
Union to access ECC_NISTP192 curve params in bytes or words.
Definition: ECCParamsLPF3HSM.h:65
const ECC_NISTP192_Param ECC_NISTP192_b
'b' constant of the ECC_NISTP192 curve when expressed in short Weierstrass form (y^2 = x^3 + a*x + b)...
const ECC_NISTP521_Param ECC_NISTP521_a_mont
'a' in Montgomery domain of the ECC_NISTP521 curve.
const ECC_NISTP192_Param ECC_NISTP192_generatorY
Y coordinate of the generator point of the ECC_NISTP192 curve.
#define ECCParams_BrainpoolP384R1_LENGTH
Length of BrainpoolP384R1 curve parameters in bytes.
Definition: ECCParamsLPF3HSM.h:339
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_order
Order of the generator point of the ECC_BrainpoolP512R1 curve.
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_k_mont
'k' in Montgomery domain of the ECC_BrainpoolP384R1 curve.
const ECC_NISTP521_Param ECC_NISTP521_generatorX
X coordinate of the generator point of the ECC_NISTP521 curve.
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_a_mont
'a' in Montgomery domain of the ECC_BrainpoolP512R1 curve.
#define ECCParams_BrainpoolP512R1_LENGTH
Length of BrainpoolP512R1 curve parameters in bytes.
Definition: ECCParamsLPF3HSM.h:407
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_order
Order of the generator point of the ECC_BrainpoolP256R1 curve.
#define ECCParams_BrainpoolP256R1_LENGTH
Length of BrainpoolP256R1 curve parameters in bytes.
Definition: ECCParamsLPF3HSM.h:271
#define ECCParams_NISTP384_LENGTH
Length of NIST P384 curve parameters in bytes.
Definition: ECCParamsLPF3HSM.h:128
Union to access ECC_BrainpoolP256R1 curve params in bytes or words.
Definition: ECCParamsLPF3HSM.h:276
const ECC_NISTP521_Param ECC_NISTP521_order
Order of the generator point of the ECC_NISTP521 curve.
const ECC_NISTP192_Param ECC_NISTP192_a_mont
'a' in Montgomery domain of the ECC_NISTP192 curve.
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_prime
Prime of the generator point of the ECC_BrainpoolP512R1 curve.
const ECC_NISTP384_Param ECC_NISTP384_k_mont
'k' in Montgomery domain of the ECC_NISTP384 curve.
const ECC_NISTP192_Param ECC_NISTP192_generatorX
X coordinate of the generator point of the ECC_NISTP192 curve.
Union to access ECC_NISTP521 curve params in bytes or words.
Definition: ECCParamsLPF3HSM.h:208
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_b
'b' constant of the ECC_BrainpoolP512R1 curve when expressed in short Weierstrass form (y^2 = x^3 + a...
const ECC_NISTP384_Param ECC_NISTP384_generatorX
X coordinate of the generator point of the ECC_NISTP384 curve.
const ECC_NISTP192_Param ECC_NISTP192_order
Order of the generator point of the ECC_NISTP192 curve.
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_generatorX
X coordinate of the generator point of the ECC_BrainpoolP256R1 curve.
const ECC_NISTP384_Param ECC_NISTP384_a_mont
'a' in Montgomery domain of the ECC_NISTP384 curve.
const ECC_NISTP192_Param ECC_NISTP192_a
'a' constant of the ECC_NISTP192 curve when expressed in short Weierstrass form (y^2 = x^3 + a*x + b)...
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_k_mont
'k' in Montgomery domain of the ECC_BrainpoolP256R1 curve.
const ECC_BrainpoolP512R1_Param ECC_BrainpoolP512R1_k_mont
'k' in Montgomery domain of the ECC_BrainpoolP512R1 curve.
Union to access ECC_BrainpoolP512R1 curve params in bytes or words.
Definition: ECCParamsLPF3HSM.h:412
#define ECC_NISTP521_PARAM_LENGTH_WITH_PADDED_BYTES
Length in bytes of NISTP521 curve parameters including the padded 0s so that the HSM is provided curv...
Definition: ECCParamsLPF3HSM.h:203
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_order
Order of the generator point of the ECC_BrainpoolP384R1 curve.
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_a
'a' constant of the ECC_BrainpoolP256R1 curve when expressed in short Weierstrass form (y^2 = x^3 + a...
const ECC_BrainpoolP384R1_Param ECC_BrainpoolP384R1_generatorY
Y coordinate of the generator point of the ECC_BrainpoolP384R1 curve.
const ECC_NISTP521_Param ECC_NISTP521_a
'a' constant of the ECC_NISTP521 curve when expressed in short Weierstrass form (y^2 = x^3 + a*x + b)...
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_a_mont
'a' in Montgomery domain of the ECC_BrainpoolP256R1 curve.
const ECC_BrainpoolP256R1_Param ECC_BrainpoolP256R1_b_mont
'b' in Montgomery domain of the ECC_BrainpoolP256R1 curve.
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale