AM64x MCU+ SDK  12.00.00
asym_crypt.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * 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
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
48 #ifndef ASYM_CRYPT_H_
49 #define ASYM_CRYPT_H_
50 
51 /* ========================================================================== */
52 /* Include Files */
53 /* ========================================================================== */
54 
55 #include <stdint.h>
56 #include <kernel/dpl/SystemP.h>
58 
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>
63 #endif
64 
65 #if defined(SOC_F29H85X) || defined (SOC_AM261X) || defined(SOC_F29P32X)
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>
69 #endif
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 /* ========================================================================== */
76 /* Macros & Typedefs */
77 /* ========================================================================== */
78 
87 typedef enum AsymCrypt_Return_e
88 {
89  ASYM_CRYPT_RETURN_SUCCESS = 0xCEF6A572U,
90  ASYM_CRYPT_RETURN_FAILURE = 0xD20341DDU,
92 
100 typedef enum AsymCrypt_EdCurve_e
101 {
105 
107 typedef void *AsymCrypt_Handle;
108 
110 #define RSA_MAX_LENGTH (130U)
111 
113 #define ECDSA_MAX_LENGTH (18U)
114 
119 #define EC_PARAM_MAXLEN (68U)
120 
124 #define ASYM_CRYPT_LEN(bytelen) (((bytelen) / 4U) + 1U)
125 
127 #define RSA_KEY_E_MAXLEN (8U)
128 
129 #define RSA_KEY_N_MAXLEN (520U)
130 
131 #define RSA_KEY_PQ_MAXLEN ((RSA_KEY_N_MAXLEN / 2U) + 4U)
132 
133 #define RSA_SIG_MAXLEN (RSA_KEY_N_MAXLEN)
134 
136 #define EDDSA_MAX_KEY_LEN (57U)
137 
139 #define EDDSA_MAX_BIGINT_LEN (ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN - 1U))
140 
142 #define EDDSA_ED25519_KEY_LEN (32U)
143 
145 #define EDDSA_ED448_KEY_LEN (57U)
146 
148 #define EDDSA_ED25519_HASH_LEN (64U)
149 
151 #define EDDSA_ED448_HASH_LEN (114U)
152 
154 #define DEVTYPE_HSSE (0x0AU)
155 
156 /* ========================================================================== */
157 /* Structure Declarations */
158 /* ========================================================================== */
159 
172 };
173 
204 };
205 
217 };
218 
238  struct AsymCrypt_ECPoint g;
239 };
240 
263  struct AsymCrypt_ECPoint g;
264 };
265 
277 };
278 
290 };
291 
314  struct AsymCrypt_EddsaPoint g;
315 };
316 
328 };
329 
341 };
342 
354 };
355 
356 /* ========================================================================== */
357 /* Global Variables */
358 /* ========================================================================== */
359 
360 /* ========================================================================== */
361 /* Function Definitions */
362 /* ========================================================================== */
363 
373 typedef AsymCrypt_Return_t (*AsymCrypt_ExecuteShaCallback)(uint8_t *in_addr, uint32_t length, uint8_t *sha_addr);
374 
382 
389 
405  const uint32_t m[RSA_MAX_LENGTH],
406  const struct AsymCrypt_RSAPrivkey *k,
407  uint32_t result[RSA_MAX_LENGTH]);
408 
423  const uint32_t m[RSA_MAX_LENGTH],
424  const struct AsymCrypt_RSAPubkey *k,
425  uint32_t result[RSA_MAX_LENGTH]);
426 
440  struct AsymCrypt_RSAPrivkey *k,
441  uint32_t keybitsize);
442 
456  const struct AsymCrypt_RSAPrivkey *privKey,
457  struct AsymCrypt_RSAPubkey *pubKey,
458  uint32_t keybitsize);
459 
475  const struct AsymCrypt_ECPrimeCurveP *cp,
476  const uint32_t priv[ECDSA_MAX_LENGTH],
477  const uint32_t k[ECDSA_MAX_LENGTH],
478  const uint32_t h[ECDSA_MAX_LENGTH],
479  struct AsymCrypt_ECDSASig *sig,
480  uint32_t curveId);
481 
497  const struct AsymCrypt_ECPrimeCurveP *cp,
498  const struct AsymCrypt_ECPoint *pub,
499  const struct AsymCrypt_ECDSASig *sig,
500  const uint32_t h[ECDSA_MAX_LENGTH],
501  uint32_t curveId);
502 
515  const struct AsymCrypt_ECPrimeCurveP *cp,
516  uint32_t priv[ECDSA_MAX_LENGTH],
517  uint32_t curveType);
518 
532  const struct AsymCrypt_ECPrimeCurveP *cp,
533  struct AsymCrypt_ECPoint *pub,
534  const uint32_t priv[ECDSA_MAX_LENGTH],
535  uint32_t curveType);
536 
552  uint8_t privKey[EDDSA_MAX_KEY_LEN],
553  uint8_t pubKey[EDDSA_MAX_KEY_LEN],
554  AsymCrypt_EdCurveType_t input_curve);
555 
573  const struct AsymCrypt_EddsaKey *key,
574  const uint8_t *ptrData,
575  const uint32_t dataSizeByte,
576  struct AsymCrypt_EddsaSig *sig,
577  AsymCrypt_EdCurveType_t input_curve);
578 
596  const uint8_t pubKey[EDDSA_MAX_KEY_LEN],
597  const uint8_t *ptrData,
598  const uint32_t dataSizeByte,
599  const struct AsymCrypt_EddsaSig *sig,
600  AsymCrypt_EdCurveType_t input_curve);
601 
616  const struct AsymCrypt_ECPrimeCurveP *cp,
617  const uint32_t priv[ECDSA_MAX_LENGTH],
618  const struct AsymCrypt_ECPoint *pubKey,
619  struct AsymCrypt_ECPoint *ecShSecret,
620  uint32_t curveType);
621 
635  const uint32_t priv[ECDSA_MAX_LENGTH],
636  const uint32_t k[ECDSA_MAX_LENGTH],
637  const uint32_t h[ECDSA_MAX_LENGTH],
638  struct AsymCrypt_SM2DSASig *sig);
639 
653  const struct AsymCrypt_ECPoint *pub,
654  const struct AsymCrypt_SM2DSASig *sig,
655  const uint32_t h[ECDSA_MAX_LENGTH]);
656 
667  uint32_t priv[ECDSA_MAX_LENGTH]);
668 
680  struct AsymCrypt_ECPoint *pub,
681  const uint32_t priv[ECDSA_MAX_LENGTH]);
682 
683 #ifdef __cplusplus
684 }
685 #endif
686 
687 #endif /* ASYM_CRYPT_H_ */
688 
AsymCrypt_ExecuteShaCallback
AsymCrypt_Return_t(* AsymCrypt_ExecuteShaCallback)(uint8_t *in_addr, uint32_t length, uint8_t *sha_addr)
This callback implemented to configure a SHA for EDDSA algorithms.
Definition: asym_crypt.h:373
AsymCrypt_EcdhGenSharedSecret
AsymCrypt_Return_t AsymCrypt_EcdhGenSharedSecret(AsymCrypt_Handle handle, const struct AsymCrypt_ECPrimeCurveP *cp, const uint32_t priv[ECDSA_MAX_LENGTH], const struct AsymCrypt_ECPoint *pubKey, struct AsymCrypt_ECPoint *ecShSecret, uint32_t curveType)
ECDH shared secret generation function.
AsymCrypt_EdCurveParam::d
uint32_t d[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:312
AsymCrypt_RSAPrivkey::n
uint32_t n[ASYM_CRYPT_LEN(RSA_KEY_N_MAXLEN)]
Definition: asym_crypt.h:189
AsymCrypt_RSAPrivkey::e
uint32_t e[ASYM_CRYPT_LEN(RSA_KEY_E_MAXLEN)]
Definition: asym_crypt.h:191
AsymCrypt_ECPrimeCurveP::b
uint32_t b[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:236
RSA_KEY_N_MAXLEN
#define RSA_KEY_N_MAXLEN
Definition: asym_crypt.h:129
AsymCrypt_close
AsymCrypt_Return_t AsymCrypt_close(AsymCrypt_Handle handle)
Function to close a AsymCrypt module specified by the AsymCrypt handle.
ASYM_CRYPT_RETURN_SUCCESS
@ ASYM_CRYPT_RETURN_SUCCESS
Definition: asym_crypt.h:89
AsymCrypt_RSAPubkey::n
uint32_t n[ASYM_CRYPT_LEN(RSA_KEY_N_MAXLEN)]
Definition: asym_crypt.h:169
AsymCrypt_EddsaSig::R
uint8_t R[EDDSA_MAX_KEY_LEN]
Definition: asym_crypt.h:325
AsymCrypt_ECDSASig::s
uint32_t s[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:276
index
uint16_t index
Definition: tisci_rm_proxy.h:3
ECDSA_MAX_LENGTH
#define ECDSA_MAX_LENGTH
Definition: asym_crypt.h:113
SystemP.h
AsymCrypt_ECPrimeCurveP::prime
uint32_t prime[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:230
AsymCrypt_EdCurveParam::prime
uint32_t prime[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:304
AsymCrypt_ECPrimeCurveP::order
uint32_t order[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:232
AsymCrypt_SM2DSASig
SM2DSA signature.
Definition: asym_crypt.h:349
AsymCrypt_ECDSAKeyGenPublic
AsymCrypt_Return_t AsymCrypt_ECDSAKeyGenPublic(AsymCrypt_Handle handle, const struct AsymCrypt_ECPrimeCurveP *cp, struct AsymCrypt_ECPoint *pub, const uint32_t priv[ECDSA_MAX_LENGTH], uint32_t curveType)
ECDSA KeyGen Public Key function.
AsymCrypt_ECMontCurveP::B
uint32_t B[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:261
AsymCrypt_RSAPrivkey::coefficient
uint32_t coefficient[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:203
AsymCrypt_ECMontCurveP::prime
uint32_t prime[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:253
crypto_util.h
This file contains the prototype of crypto_util driver APIs.
AsymCrypt_ECDSASig::r
uint32_t r[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:274
AsymCrypt_ECPoint::x
uint32_t x[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:214
RSA_KEY_E_MAXLEN
#define RSA_KEY_E_MAXLEN
Definition: asym_crypt.h:127
AsymCrypt_EddsaSig::s
uint8_t s[EDDSA_MAX_KEY_LEN]
Definition: asym_crypt.h:327
AsymCrypt_RSAPubkey
RSA public key. All values are in biginteger format (size followed by word value array,...
Definition: asym_crypt.h:167
AsymCrypt_ECPrimeCurveP::a
uint32_t a[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:234
AsymCrypt_RSAPrivkey::q
uint32_t q[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:197
AsymCrypt_EddsaPoint
Point on Eddsa Elliptical Curve.
Definition: asym_crypt.h:285
AsymCrypt_SM2DSAKeyGenPublic
AsymCrypt_Return_t AsymCrypt_SM2DSAKeyGenPublic(AsymCrypt_Handle handle, struct AsymCrypt_ECPoint *pub, const uint32_t priv[ECDSA_MAX_LENGTH])
SM2DSA KeyGen Public Key function.
AsymCrypt_SM2DSAVerify
AsymCrypt_Return_t AsymCrypt_SM2DSAVerify(AsymCrypt_Handle handle, const struct AsymCrypt_ECPoint *pub, const struct AsymCrypt_SM2DSASig *sig, const uint32_t h[ECDSA_MAX_LENGTH])
SM2DSA verify primitive function.
AsymCrypt_RSAKeyGenPublic
AsymCrypt_Return_t AsymCrypt_RSAKeyGenPublic(AsymCrypt_Handle handle, const struct AsymCrypt_RSAPrivkey *privKey, struct AsymCrypt_RSAPubkey *pubKey, uint32_t keybitsize)
This Function performs Encryption or Verification operations.
AsymCrypt_EddsaSign
AsymCrypt_Return_t AsymCrypt_EddsaSign(AsymCrypt_Handle handle, AsymCrypt_ExecuteShaCallback shaCbFxn, const struct AsymCrypt_EddsaKey *key, const uint8_t *ptrData, const uint32_t dataSizeByte, struct AsymCrypt_EddsaSig *sig, AsymCrypt_EdCurveType_t input_curve)
EDDSA Signing primitive function.
AsymCrypt_EddsaPoint::x
uint32_t x[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:287
RSA_KEY_PQ_MAXLEN
#define RSA_KEY_PQ_MAXLEN
Definition: asym_crypt.h:131
AsymCrypt_ECMontCurveP::A
uint32_t A[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:259
AsymCrypt_EdCurveParam::order
uint32_t order[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:306
AsymCrypt_Handle
void * AsymCrypt_Handle
Handle to the AsymCrypt driver.
Definition: asym_crypt.h:107
AsymCrypt_SM2DSASign
AsymCrypt_Return_t AsymCrypt_SM2DSASign(AsymCrypt_Handle handle, const uint32_t priv[ECDSA_MAX_LENGTH], const uint32_t k[ECDSA_MAX_LENGTH], const uint32_t h[ECDSA_MAX_LENGTH], struct AsymCrypt_SM2DSASig *sig)
SM2DSA sign primitive function.
AsymCrypt_SM2DSASig::s
uint32_t s[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:353
AsymCrypt_ECMontCurveP::g
struct AsymCrypt_ECPoint g
Definition: asym_crypt.h:263
AsymCrypt_EddsaVerify
AsymCrypt_Return_t AsymCrypt_EddsaVerify(AsymCrypt_Handle handle, AsymCrypt_ExecuteShaCallback shaCbFxn, const uint8_t pubKey[EDDSA_MAX_KEY_LEN], const uint8_t *ptrData, const uint32_t dataSizeByte, const struct AsymCrypt_EddsaSig *sig, AsymCrypt_EdCurveType_t input_curve)
ECDSA verify primitive function.
AsymCrypt_RSAKeyGenPrivate
AsymCrypt_Return_t AsymCrypt_RSAKeyGenPrivate(AsymCrypt_Handle handle, struct AsymCrypt_RSAPrivkey *k, uint32_t keybitsize)
This Function performs Encryption or Verification operations.
AsymCrypt_RSAPrivkey::p
uint32_t p[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:195
AsymCrypt_ECPoint
EC Point, also the public key.
Definition: asym_crypt.h:212
ASYM_CRYPT_CURVE_TYPE_EDDSA_448
@ ASYM_CRYPT_CURVE_TYPE_EDDSA_448
Definition: asym_crypt.h:103
AsymCrypt_EddsaKey::pubKey
uint8_t pubKey[EDDSA_MAX_KEY_LEN]
Definition: asym_crypt.h:340
AsymCrypt_SM2DSASig::r
uint32_t r[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:351
AsymCrypt_EdCurveParam::g
struct AsymCrypt_EddsaPoint g
Definition: asym_crypt.h:314
AsymCrypt_ECDSASign
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, uint32_t curveId)
ECDSA sign primitive function.
AsymCrypt_RSAPublic
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.
AsymCrypt_EddsaPoint::y
uint32_t y[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:289
AsymCrypt_ECMontCurveP::order
uint32_t order[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:255
AsymCrypt_SM2DSAKeyGenPrivate
AsymCrypt_Return_t AsymCrypt_SM2DSAKeyGenPrivate(AsymCrypt_Handle handle, uint32_t priv[ECDSA_MAX_LENGTH])
SM2DSA KeyGen Private Key function.
EDDSA_MAX_KEY_LEN
#define EDDSA_MAX_KEY_LEN
Definition: asym_crypt.h:136
AsymCrypt_RSAPubkey::e
uint32_t e[ASYM_CRYPT_LEN(RSA_KEY_E_MAXLEN)]
Definition: asym_crypt.h:171
AsymCrypt_EddsaKey::privKey
uint8_t privKey[EDDSA_MAX_KEY_LEN]
Definition: asym_crypt.h:338
AsymCrypt_EdCurveParam::cofactor
uint32_t cofactor[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:308
AsymCrypt_ECPoint::y
uint32_t y[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:216
AsymCrypt_Return_t
AsymCrypt_Return_t
ASYM CRYPTO Driver Error code.
Definition: asym_crypt.h:88
AsymCrypt_EddsaKey
Eddsa EDDSA Private key - Public key pair in uint8 array form.
Definition: asym_crypt.h:336
AsymCrypt_ECPrimeCurveP::g
struct AsymCrypt_ECPoint g
Definition: asym_crypt.h:238
AsymCrypt_RSAPrivkey::dq
uint32_t dq[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:201
AsymCrypt_RSAPrivkey
RSA private key. All values are in biginteger format (size followed by word value array,...
Definition: asym_crypt.h:187
AsymCrypt_ECMontCurveP::cofactor
uint32_t cofactor[ASYM_CRYPT_LEN(EC_PARAM_MAXLEN)]
Definition: asym_crypt.h:257
AsymCrypt_ECDSAVerify
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], uint32_t curveId)
ECDSA verify primitive function.
AsymCrypt_EddsaSig
Eddsa EDDSA signature.
Definition: asym_crypt.h:323
AsymCrypt_open
AsymCrypt_Handle AsymCrypt_open(uint32_t index)
Function to Open AsymCrypt instance, enable AsymCrypt engine, Initialize clocks.
ASYM_CRYPT_LEN
#define ASYM_CRYPT_LEN(bytelen)
Definition: asym_crypt.h:124
AsymCrypt_EdCurveParam
Structure to hold Edward Curve Eddsa parameters.
Definition: asym_crypt.h:302
AsymCrypt_EddsaGetPubKey
AsymCrypt_Return_t AsymCrypt_EddsaGetPubKey(AsymCrypt_Handle handle, AsymCrypt_ExecuteShaCallback shaCbFxn, uint8_t privKey[EDDSA_MAX_KEY_LEN], uint8_t pubKey[EDDSA_MAX_KEY_LEN], AsymCrypt_EdCurveType_t input_curve)
ECDSA KeyGen Public Key function.
ASYM_CRYPT_CURVE_TYPE_EDDSA_25519
@ ASYM_CRYPT_CURVE_TYPE_EDDSA_25519
Definition: asym_crypt.h:102
AsymCrypt_ECPrimeCurveP
EC prime curve parameters.
Definition: asym_crypt.h:228
AsymCrypt_ECMontCurveP
EC Montogomery curve parameters.
Definition: asym_crypt.h:251
AsymCrypt_RSAPrivate
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.
AsymCrypt_RSAPrivkey::dp
uint32_t dp[ASYM_CRYPT_LEN(RSA_KEY_PQ_MAXLEN)]
Definition: asym_crypt.h:199
ASYM_CRYPT_RETURN_FAILURE
@ ASYM_CRYPT_RETURN_FAILURE
Definition: asym_crypt.h:90
RSA_MAX_LENGTH
#define RSA_MAX_LENGTH
Definition: asym_crypt.h:110
AsymCrypt_ECDSASig
ECDSA signature.
Definition: asym_crypt.h:272
EC_PARAM_MAXLEN
#define EC_PARAM_MAXLEN
Definition: asym_crypt.h:119
AsymCrypt_EdCurveType_t
AsymCrypt_EdCurveType_t
ASYM EDDSA Curve Type.
Definition: asym_crypt.h:101
AsymCrypt_RSAPrivkey::d
uint32_t d[ASYM_CRYPT_LEN(RSA_KEY_N_MAXLEN)]
Definition: asym_crypt.h:193
AsymCrypt_ECDSAKeyGenPrivate
AsymCrypt_Return_t AsymCrypt_ECDSAKeyGenPrivate(AsymCrypt_Handle handle, const struct AsymCrypt_ECPrimeCurveP *cp, uint32_t priv[ECDSA_MAX_LENGTH], uint32_t curveType)
ECDSA KeyGen Private Key function.
AsymCrypt_EdCurveParam::a
uint32_t a[ASYM_CRYPT_LEN(EDDSA_MAX_KEY_LEN)]
Definition: asym_crypt.h:310