MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClOsccaPkc_Functions.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2018-2022 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
20 #ifndef MCUXCLOSCCAPKC_FUNCTIONS_H_
21 #define MCUXCLOSCCAPKC_FUNCTIONS_H_
22 
23 
24 #include <stdint.h>
25 #include <stdbool.h>
26 #include <mcuxClConfig.h> // Exported features flags header
27 #include <mcuxCsslFlowProtection.h>
29 
40 typedef struct mcuxClOsccaPkc_State_t
41 {
42  uint32_t cfg;
43  uint32_t ctrl;
45 
47 typedef const struct mcuxClOsccaPkc_FUPEntry * mcuxClOsccaPkc_PtrFUPEntry_t;
48 
49 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_Reset) /* No semicolon */
50 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_Reset(mcuxClOsccaPkc_State_t *state) ;
51 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_Init) /* No semicolon */
52 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_Init(mcuxClOsccaPkc_State_t *state) ;
53 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_SetWordSize) /* No semicolon */
54 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_SetWordSize(uint32_t redmul) ;
55 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_GetWordSize) /* No semicolon */
56 MCUX_CSSL_FP_PROTECTED_TYPE(uint32_t) mcuxClOsccaPkc_GetWordSize(void) ;
57 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_WaitforFinish) /* No semicolon */
58 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_WaitforFinish(void) ;
59 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_SetFupTable) /* No semicolon */
60 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_SetFupTable(void *pUPTRT) ;
61 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_Op) /* No semicolon */
62 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_Op(uint32_t mode, uint32_t iRiXiYiZ) ;
63 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_StartFupProgram) /* No semicolon */
64 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_StartFupProgram(mcuxClOsccaPkc_PtrFUPEntry_t fupProgram, uint32_t fupProgramSize);
65 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_ComputeNDash) /* No semicolon */
66 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_ComputeNDash(uint32_t iNiTiXiX);
67 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_ComputeQSquared) /* No semicolon */
68 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_ComputeQSquared(uint32_t iQiMiTiX, uint16_t iMs);
69 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_GeneratePointerTable) /* No semicolon */
70 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_GeneratePointerTable(uint16_t *pOperandsBase, uint8_t *pBufferBase, uint32_t bufferSize, uint32_t bufferNums);
71 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_MultipleShiftRotate_Index) /* No semicolon */
72 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_MultipleShiftRotate_Index(uint32_t iModuluss, uint32_t iModulus, uint32_t leadingZeroBits, _Bool shiftLeft);
73 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_LeadingZeros) /* No semicolon */
74 MCUX_CSSL_FP_PROTECTED_TYPE(uint32_t) mcuxClOsccaPkc_LeadingZeros(uint8_t *pNum, uint32_t numLen);
75 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_ComputeModInv) /* No semicolon */
76 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_ComputeModInv(uint32_t iRiIiNiT, uint32_t iT2);
77 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClOsccaPkc_CalcMontInverse) /* No semicolon */
78 MCUX_CSSL_FP_PROTECTED_TYPE(void) mcuxClOsccaPkc_CalcMontInverse(uint32_t iIiRiNiT, uint32_t R2);
79 
80  /* mcuxClOsccaPkc_Functions */
84 
85 #endif /*MCUXCLOSCCAPKC_FUNCTIONS_H_*/
struct mcuxClOsccaPkc_State_t mcuxClOsccaPkc_State_t
Structure of PKC state backup.
Definition of function identifiers for the flow protection mechanism.
Provides the API for the CSSL flow protection mechanism.
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:125
const struct mcuxClOsccaPkc_FUPEntry * mcuxClOsccaPkc_PtrFUPEntry_t
type of FUP program address.
Definition: mcuxClOsccaPkc_Functions.h:47
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition: mcuxCsslFlowProtection.h:81
Structure of PKC state backup.
Definition: mcuxClOsccaPkc_Functions.h:40