|
SmartSnippets DA1459x SDK
|
Elliptic curves data. More...
Files | |
| file | crypto_ec.h |
| Elliptic curves data. | |
| file | crypto_ecc_provider_function_map.h |
| ECC curvetype - libprovider mapping macro definitions. | |
| file | crypto_ecc_provider_functions.h |
| Elliptic curves primitives and basic datatypes. Depending on ecc library and curve settings, the primitives provided from this header will be mapped to the respective functions. | |
| file | crypto_ecc_provider_params.h |
| Elliptic curves parameters. | |
Data Structures | |
| struct | crypto_ec_params_t |
| Elliptic curve parameters. More... | |
Macros | |
| #define | dg_ALLOW_DYNAMIC_LIB_PROVIDER 0 |
| Dynamic ecc library selection flag. More... | |
Enumerations | |
| enum | ECC_CRYPTO_LIB_PROVIDER { HW_ECC = HW_ECC_ID, UECC_LIB = UECC_LIB_ID, SODIUM_LIB = SODIUM_LIB_ID } |
| ECC library providers. More... | |
| enum | CRYPTO_ECC_CURVE |
| ECC supported curves type. | |
| enum | CRYPTO_ECC_PROVIDER_RET { CRYPTO_ECC_PROVIDER_RET_OK = 0, CRYPTO_ECC_PROVIDER_RET_INIT_FAIL, CRYPTO_ECC_PROVIDER_RET_NOT_PROVIDED, CRYPTO_ECC_PROVIDER_RET_INVALID_LIB, CRYPTO_ECC_PROVIDER_RET_INVALID_CURVE, CRYPTO_ECC_PROVIDER_RET_MUTEX_LOCKED, CRYPTO_ECC_PROVIDER_RET_ERROR } |
| ECC Provider API return codes. More... | |
Functions | |
| CRYPTO_ECC_PROVIDER_RET | crypto_ecc_curve_init (crypto_ec_params_t *curve, CRYPTO_ECC_CURVE curve_type) |
| Initialize ecc_curve. | |
| CRYPTO_ECC_PROVIDER_RET | crypto_ecc_compute_public_key (crypto_ec_params_t *curve, uint8_t *d, uint8_t *Q) |
| Compute public key ecc primitive. More... | |
| CRYPTO_ECC_PROVIDER_RET | crypto_ecc_compute_private_key (crypto_ec_params_t *curve, uint8_t *d) |
| Compute private key ecc primitive. More... | |
| CRYPTO_ECC_PROVIDER_RET | crypto_ecc_compute_shared_secret (crypto_ec_params_t *curve, uint8_t *d, uint8_t *Qp, uint8_t *s) |
| Compute shared secret key ecc primitive. More... | |
Variables | |
| ECC_CRYPTO_LIB_PROVIDER | curve_lib_provider_index [ECC_CRYPTO_LAST_VALUE] |
| Index table informs which curve is implemented by which library provider. More... | |
| const bool | lib_provider_truthtable [ECC_CRYPTO_LAST_VALUE][CRYPTO_ECC_PROVIDER_LAST_VALUE] |
| Truth table informs if a curve is provided by the respective library. More... | |
Elliptic curves data.
Elliptic curves primitives and basic datatypes.
Elliptic curves provider function mapping.
| #define dg_ALLOW_DYNAMIC_LIB_PROVIDER 0 |
Dynamic ecc library selection flag.
Set in order to allow ecc library providers to be changed during runtime. This is practical only for testing purposes, ie cross checking library implementations of the same algorithm from the same binary file.
ECC Provider API return codes.
| CRYPTO_ECC_PROVIDER_RET crypto_ecc_compute_private_key | ( | crypto_ec_params_t * | curve, |
| uint8_t * | d | ||
| ) |
Compute private key ecc primitive.
Calculates the private key. Depending on ecc library provider and curve settings, the appropriate function call will be made from ecc_compute_public_jump_table.
| [in] | curve | The curve parameter object for which the key will be generated |
| [out] | d | Pointer to the private key. |
| CRYPTO_ECC_PROVIDER_RET crypto_ecc_compute_public_key | ( | crypto_ec_params_t * | curve, |
| uint8_t * | d, | ||
| uint8_t * | Q | ||
| ) |
Compute public key ecc primitive.
Calculates the public key given a private key. Depending on ecc library provider and curve settings, the appropriate function call will be made from ecc_compute_public_jump_table.
| [in] | curve | The curve parameter object for which the key will be generated |
| [in] | d | Pointer to the private key. |
| [out] | Q | Pointer to the public key to be generated. |
| CRYPTO_ECC_PROVIDER_RET crypto_ecc_compute_shared_secret | ( | crypto_ec_params_t * | curve, |
| uint8_t * | d, | ||
| uint8_t * | Qp, | ||
| uint8_t * | s | ||
| ) |
Compute shared secret key ecc primitive.
Calculates the public key given a private key. Depending on ecc library provider and curve settings, the appropriate function call will be made from ecc_compute_public_jump_table.
| [in] | curve | The curve parameter object for which the key will be generated |
| [in] | d | Pointer to the private key. |
| [in] | Qp | Pointer to the peers public key that will be used to create the shared key. |
| [out] | s | Pointer to the generated shared key. |
| ECC_CRYPTO_LIB_PROVIDER curve_lib_provider_index[ECC_CRYPTO_LAST_VALUE] |
Index table informs which curve is implemented by which library provider.
This is used for dynamically changing library provider for a specific curve. Row index must be the same as CRYPTO_ECC_CURVE
| const bool lib_provider_truthtable[ECC_CRYPTO_LAST_VALUE][CRYPTO_ECC_PROVIDER_LAST_VALUE] |
Truth table informs if a curve is provided by the respective library.
This is used for checking if a requested curved can be implemented by a requested library.
1.8.16