|
AM64x MCU+ SDK
10.00.00
|
|
Go to the documentation of this file.
56 #include <security_common/drivers/crypto/pka/eip29t2_firmware.h>
57 #include <security_common/drivers/crypto/pka/hw_include/cslr_cp_ace.h>
77 typedef enum PKA_Return_e
87 #define PKA_BIGINT_MAX (130U)
90 #define PKA_EC_BIGINT_MAX (18U)
96 #define PKA_EC_PARAM_MAXLEN (68U)
101 #define PKA_BIGINT_LEN(bytelen) (((bytelen) / 4U) + 1U)
104 #define PKA_RSA_KEY_E_MAXLEN (8U)
106 #define PKA_RSA_KEY_N_MAXLEN (520U)
108 #define PKA_RSA_KEY_PQ_MAXLEN ((PKA_RSA_KEY_N_MAXLEN / 2U) + 4U)
110 #define PKA_RSA_SIG_MAXLEN PKA_RSA_KEY_N_MAXLEN
PKA_Return_t PKA_ECDSASign(PKA_Handle handle, const struct PKA_ECPrimeCurveP *cp, const uint32_t priv[PKA_EC_BIGINT_MAX], const uint32_t k[PKA_EC_BIGINT_MAX], const uint32_t h[PKA_EC_BIGINT_MAX], struct PKA_ECDSASig *sig)
ECDSA sign primitive function.
#define PKA_RSA_KEY_N_MAXLEN
Definition: pka.h:106
uint32_t prime[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:186
void * PKA_Handle
Handle to the PKA driver.
Definition: pka.h:84
@ PKA_RETURN_SUCCESS
Definition: pka.h:79
uint32_t a[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:190
uint16_t index
Definition: tisci_rm_proxy.h:3
#define PKA_EC_BIGINT_MAX
Definition: pka.h:90
uint32_t n[PKA_BIGINT_LEN(PKA_RSA_KEY_N_MAXLEN)]
Definition: pka.h:145
PKA_Return_t PKA_close(PKA_Handle handle)
Function to close a PKA module specified by the PKA handle.
#define PKA_BIGINT_MAX
Definition: pka.h:87
uint32_t gPkaConfigNum
Externally defined driver configuration Num.
uint32_t b[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:192
RSA public key. All values are in biginteger format (size followed by word value array,...
Definition: pka.h:123
This file contains the prototype of crypto_util driver APIs.
@ PKA_RETURN_FAILURE
Definition: pka.h:80
uint32_t p[PKA_BIGINT_LEN(PKA_RSA_KEY_PQ_MAXLEN)]
Definition: pka.h:151
#define PKA_RSA_KEY_PQ_MAXLEN
Definition: pka.h:108
uint32_t e[PKA_BIGINT_LEN(PKA_RSA_KEY_E_MAXLEN)]
Definition: pka.h:147
uint32_t coefficient[PKA_BIGINT_LEN(PKA_RSA_KEY_PQ_MAXLEN)]
Definition: pka.h:159
PKA driver context.
Definition: pka.h:226
ECDSA signature.
Definition: pka.h:203
uint32_t q[PKA_BIGINT_LEN(PKA_RSA_KEY_PQ_MAXLEN)]
Definition: pka.h:153
PKA_Return_t
PKA Driver Error code.
Definition: pka.h:78
uint32_t e[PKA_BIGINT_LEN(PKA_RSA_KEY_E_MAXLEN)]
Definition: pka.h:127
uint32_t isOpen
Definition: pka.h:220
uint32_t y[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:172
PKA_Return_t PKA_ECDSAVerify(PKA_Handle handle, const struct PKA_ECPrimeCurveP *cp, const struct PKA_ECPoint *pub, const struct PKA_ECDSASig *sig, const uint32_t h[PKA_EC_BIGINT_MAX])
ECDSA verify primitive function.
PKA_Return_t PKA_RSAPrivate(PKA_Handle handle, const uint32_t m[PKA_BIGINT_MAX], const struct PKA_RSAPrivkey *k, uint32_t result[PKA_BIGINT_MAX])
This Function performs Decryption or Signing operations.
uint32_t d[PKA_BIGINT_LEN(PKA_RSA_KEY_N_MAXLEN)]
Definition: pka.h:149
uint32_t n[PKA_BIGINT_LEN(PKA_RSA_KEY_N_MAXLEN)]
Definition: pka.h:125
EC Point, also the public key.
Definition: pka.h:168
PKA_Attrs * attrs
Definition: pka.h:227
uint32_t dp[PKA_BIGINT_LEN(PKA_RSA_KEY_PQ_MAXLEN)]
Definition: pka.h:155
#define PKA_EC_PARAM_MAXLEN
Definition: pka.h:96
uint32_t x[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:170
uint32_t caBaseAddr
Definition: pka.h:216
PKA_Config gPkaConfig[]
Externally defined driver configuration array.
PKA_Return_t PKA_RSAPublic(PKA_Handle handle, const uint32_t m[PKA_BIGINT_MAX], const struct PKA_RSAPubkey *k, uint32_t result[PKA_BIGINT_MAX])
This Function performs Encryption or Verification operations.
RSA private key. All values are in biginteger format (size followed by word value array,...
Definition: pka.h:143
#define PKA_BIGINT_LEN(bytelen)
Definition: pka.h:101
PKA attributes.
Definition: pka.h:212
EC prime curve parameters.
Definition: pka.h:184
uint32_t pkaBaseAddr
Definition: pka.h:218
uint32_t s[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:207
#define PKA_RSA_KEY_E_MAXLEN
Definition: pka.h:104
struct PKA_ECPoint g
Definition: pka.h:194
uint32_t order[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:188
uint32_t dq[PKA_BIGINT_LEN(PKA_RSA_KEY_PQ_MAXLEN)]
Definition: pka.h:157
uint32_t r[PKA_BIGINT_LEN(PKA_EC_PARAM_MAXLEN)]
Definition: pka.h:205
PKA_Handle PKA_open(uint32_t index)
Function to Open PKA instance, enable PKA engine, Initialize clocks and Load PKA Fw.