|
AM64x MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
59 #if defined (SOC_AM64X) || defined (SOC_AM243X)\
60 || defined(SOC_AM263X) || defined(SOC_AM263PX)\
61 || defined (SOC_AM273X) || defined (SOC_AWR294X)
62 #include <security_common/drivers/crypto/pka/pka.h>
65 #if defined(SOC_F29H85X) || defined (SOC_AM261X)
66 #include <security_common/drivers/crypto/pke/hw_include/pke_hw/inc/pke.h>
67 #include <security_common/drivers/crypto/pke/hw_include/pke_hw/src/pke4_driver.h>
68 #include <security_common/drivers/crypto/pke/hw_include/pke_hw/inc/pke_dpasl.h>
87 typedef enum AsymCrypt_Return_e
97 #define RSA_MAX_LENGTH (130U)
100 #define ECDSA_MAX_LENGTH (18U)
106 #define EC_PARAM_MAXLEN (68U)
111 #define ASYM_CRYPT_LEN(bytelen) (((bytelen) / 4U) + 1U)
114 #define RSA_KEY_E_MAXLEN (8U)
116 #define RSA_KEY_N_MAXLEN (520U)
118 #define RSA_KEY_PQ_MAXLEN ((RSA_KEY_N_MAXLEN / 2U) + 4U)
120 #define RSA_SIG_MAXLEN RSA_KEY_N_MAXLEN
uint32_t n[ASYM_CRYPT_LEN(RSA_KEY_N_MAXLEN)]
Definition: asym_crypt.h:155
uint32_t e[ASYM_CRYPT_LEN(RSA_KEY_E_MAXLEN)]
Definition: asym_crypt.h:157
uint32_t b[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:202
#define RSA_KEY_N_MAXLEN
Definition: asym_crypt.h:116
AsymCrypt_Return_t AsymCrypt_close(AsymCrypt_Handle handle)
Function to close a AsymCrypt module specified by the AsymCrypt handle.
@ ASYM_CRYPT_RETURN_SUCCESS
Definition: asym_crypt.h:89
uint32_t n[ASYM_CRYPT_LEN(RSA_KEY_N_MAXLEN)]
Definition: asym_crypt.h:135
uint32_t s[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:217
uint16_t index
Definition: tisci_rm_proxy.h:3
#define ECDSA_MAX_LENGTH
Definition: asym_crypt.h:100
uint32_t prime[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:196
uint32_t order[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:198
uint32_t coefficient[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:169
This file contains the prototype of crypto_util driver APIs.
uint32_t r[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:215
uint32_t x[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:180
#define RSA_KEY_E_MAXLEN
Definition: asym_crypt.h:114
RSA public key. All values are in biginteger format (size followed by word value array,...
Definition: asym_crypt.h:133
uint32_t a[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:200
uint32_t q[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:163
AsymCrypt_Return_t AsymCrypt_ECDSASign(AsymCrypt_Handle handle, const struct AsymCrypt_ECPrimeCurveP *cp, const uint32_t priv[ECDSA_MAX_LENGTH], const uint32_t k[ECDSA_MAX_LENGTH], const uint32_t h[ECDSA_MAX_LENGTH], struct AsymCrypt_ECDSASig *sig)
ECDSA sign primitive function.
#define RSA_KEY_PQ_MAXLEN
Definition: asym_crypt.h:118
void * AsymCrypt_Handle
Handle to the AsymCrypt driver.
Definition: asym_crypt.h:94
uint32_t p[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:161
EC Point, also the public key.
Definition: asym_crypt.h:178
AsymCrypt_Return_t AsymCrypt_RSAPublic(AsymCrypt_Handle handle, const uint32_t m[RSA_MAX_LENGTH], const struct AsymCrypt_RSAPubkey *k, uint32_t result[RSA_MAX_LENGTH])
This Function performs Encryption or Verification operations.
uint32_t e[ASYM_CRYPT_LEN(RSA_KEY_E_MAXLEN)]
Definition: asym_crypt.h:137
uint32_t y[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:182
AsymCrypt_Return_t
ASYM CRYPTO Driver Error code.
Definition: asym_crypt.h:88
struct AsymCrypt_ECPoint g
Definition: asym_crypt.h:204
uint32_t dq[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:167
RSA private key. All values are in biginteger format (size followed by word value array,...
Definition: asym_crypt.h:153
AsymCrypt_Handle AsymCrypt_open(uint32_t index)
Function to Open AsymCrypt instance, enable AsymCrypt engine, Initialize clocks.
#define ASYM_CRYPT_LEN(bytelen)
Definition: asym_crypt.h:111
AsymCrypt_Return_t AsymCrypt_ECDSAVerify(AsymCrypt_Handle handle, const struct AsymCrypt_ECPrimeCurveP *cp, const struct AsymCrypt_ECPoint *pub, const struct AsymCrypt_ECDSASig *sig, const uint32_t h[ECDSA_MAX_LENGTH])
ECDSA verify primitive function.
EC prime curve parameters.
Definition: asym_crypt.h:194
AsymCrypt_Return_t AsymCrypt_RSAPrivate(AsymCrypt_Handle handle, const uint32_t m[RSA_MAX_LENGTH], const struct AsymCrypt_RSAPrivkey *k, uint32_t result[RSA_MAX_LENGTH])
This Function performs Decryption or Signing operations.
uint32_t dp[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:165
@ ASYM_CRYPT_RETURN_FAILURE
Definition: asym_crypt.h:90
#define RSA_MAX_LENGTH
Definition: asym_crypt.h:97
ECDSA signature.
Definition: asym_crypt.h:213
#define EC_PARAM_MAXLEN
Definition: asym_crypt.h:106
uint32_t d[ASYM_CRYPT_LEN(RSA_KEY_N_MAXLEN)]
Definition: asym_crypt.h:159