This file contains the prototype of PKA driver APIs.
Go to the source code of this file.
Data Structures | |
struct | PKA_RSAPubkey |
RSA public key. All values are in biginteger format (size followed by word value array, least significant word first) More... | |
struct | PKA_RSAPrivkey |
RSA private key. All values are in biginteger format (size followed by word value array, least significant word first) More... | |
struct | PKA_ECPoint |
EC Point, also the public key. More... | |
struct | PKA_ECPrimeCurveP |
EC prime curve parameters. More... | |
struct | PKA_ECDSASig |
ECDSA signature. More... | |
struct | PKA_Attrs |
PKA attributes. More... | |
struct | PKA_Config |
PKA driver context. More... | |
Macros | |
#define | PKA_BIGINT_MAX (130U) |
#define | PKA_EC_BIGINT_MAX (18U) |
#define | PKA_EC_PARAM_MAXLEN (68U) |
#define | PKA_BIGINT_LEN(bytelen) (((bytelen) / 4U) + 1U) |
#define | PKA_RSA_KEY_E_MAXLEN (8U) |
#define | PKA_RSA_KEY_N_MAXLEN (520U) |
#define | PKA_RSA_KEY_PQ_MAXLEN ((PKA_RSA_KEY_N_MAXLEN / 2U) + 4U) |
#define | PKA_RSA_SIG_MAXLEN PKA_RSA_KEY_N_MAXLEN |
Typedefs | |
typedef void * | PKA_Handle |
Handle to the PKA driver. More... | |
Enumerations | |
enum | PKA_Return_t { PKA_RETURN_SUCCESS = 0xCEF6A572U, PKA_RETURN_FAILURE = 0xD20341DDU } |
PKA Driver Error code. More... | |
Functions | |
PKA_Handle | PKA_open (uint32_t index) |
Function to Open PKA instance, enable PKA engine, Initialize clocks and Load PKA Fw. More... | |
PKA_Return_t | PKA_close (PKA_Handle handle) |
Function to close a PKA module specified by the PKA handle. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Variables | |
PKA_Config | gPkaConfig [] |
Externally defined driver configuration array. More... | |
uint32_t | gPkaConfigNum |
Externally defined driver configuration Num. More... | |