|
OPTIGA™ Trust M
Host Library Documentation
|
Go to the documentation of this file.
38 #ifndef _OPTIGA_CMD_H_
39 #define _OPTIGA_CMD_H_
78 void * caller_context);
254 #if defined (OPTIGA_CRYPT_RANDOM_ENABLED) || defined (OPTIGA_CRYPT_RSA_PRE_MASTER_SECRET_ENABLED)
285 #endif //OPTIGA_CRYPT_RANDOM_ENABLED || OPTIGA_CRYPT_RSA_PRE_MASTER_SECRET_ENABLED
287 #ifdef OPTIGA_CRYPT_HASH_ENABLED
319 #endif //OPTIGA_CRYPT_HASH_ENABLED
321 #if defined (OPTIGA_CRYPT_ECDSA_SIGN_ENABLED) || defined (OPTIGA_CRYPT_RSA_SIGN_ENABLED)
354 #endif //OPTIGA_CRYPT_ECDSA_SIGN_ENABLED || OPTIGA_CRYPT_RSA_SIGN_ENABLED
356 #if defined (OPTIGA_CRYPT_ECDSA_VERIFY_ENABLED) || defined (OPTIGA_CRYPT_RSA_VERIFY_ENABLED)
385 #endif //OPTIGA_CRYPT_ECDSA_VERIFY_ENABLED || OPTIGA_CRYPT_RSA_VERIFY_ENABLED
387 #ifdef OPTIGA_CRYPT_ECDH_ENABLED
421 #endif //OPTIGA_CRYPT_ECDH_ENABLED
423 #if defined (OPTIGA_CRYPT_TLS_PRF_SHA256_ENABLED) || defined (OPTIGA_CRYPT_TLS_PRF_SHA384_ENABLED) || defined (OPTIGA_CRYPT_TLS_PRF_SHA512_ENABLED) || defined (OPTIGA_CRYPT_HKDF_ENABLED)
456 #endif //OPTIGA_CRYPT_TLS_PRF_SHA256_ENABLED || OPTIGA_CRYPT_TLS_PRF_SHA384_ENABLED || OPTIGA_CRYPT_TLS_PRF_SHA512_ENABLED || OPTIGA_CRYPT_HKDF_ENABLED
458 #if defined (OPTIGA_CRYPT_ECC_GENERATE_KEYPAIR_ENABLED) || defined (OPTIGA_CRYPT_RSA_GENERATE_KEYPAIR_ENABLED)
490 #endif //(OPTIGA_CRYPT_ECC_GENERATE_KEYPAIR_ENABLED) || (OPTIGA_CRYPT_RSA_GENERATE_KEYPAIR_ENABLED)
492 #ifdef OPTIGA_CRYPT_RSA_ENCRYPT_ENABLED
525 #endif // OPTIGA_CRYPT_RSA_ENCRYPT_ENABLED
527 #ifdef OPTIGA_CRYPT_RSA_DECRYPT_ENABLED
559 #endif // OPTIGA_CRYPT_RSA_DECRYPT_ENABLED
592 #if defined (OPTIGA_CRYPT_SYM_ENCRYPT_ENABLED) || defined (OPTIGA_CRYPT_HMAC_ENABLED)
626 #if defined (OPTIGA_CRYPT_SYM_DECRYPT_ENABLED) || defined (OPTIGA_CRYPT_HMAC_VERIFY_ENABLED) ||\
627 defined (OPTIGA_CRYPT_CLEAR_AUTO_STATE_ENABLED)
661 #ifdef OPTIGA_CRYPT_SYM_GENERATE_KEY_ENABLED
693 #endif // OPTIGA_CRYPT_SYM_GENERATE_KEY_ENABLED
Specifies the data structure for ecdh secret generation.
Specifies the data structure for symmetric encrypt and decrypt.
struct optiga_cmd optiga_cmd_t
OPTIGA command instance structure type.
optiga_lib_status_t optiga_cmd_set_data_object(optiga_cmd_t *me, uint8_t cmd_param, optiga_set_data_object_params_t *params)
Writes data or metadata to the specified data object.
optiga_cmd_t * optiga_cmd_create(uint8_t optiga_instance_id, callback_handler_t handler, void *caller_context)
Creates an instance of optiga_cmd_t.
optiga_lib_status_t optiga_cmd_get_random(optiga_cmd_t *me, uint8_t cmd_param, optiga_get_random_params_t *params)
Generates random data or pre-master secret for RSA key exchange.
Specifies the data structure for data to be written to OPTIGA.
Specifies the data structure for data to be read from OPTIGA.
optiga_lib_status_t optiga_cmd_get_data_object(optiga_cmd_t *me, uint8_t cmd_param, optiga_get_data_object_params_t *params)
Reads data or metadata of the specified data object.
optiga_lib_status_t optiga_cmd_calc_sign(optiga_cmd_t *me, uint8_t cmd_param, optiga_calc_sign_params_t *params)
Calculate signature on digest.
optiga_lib_status_t optiga_cmd_verify_sign(optiga_cmd_t *me, uint8_t cmd_param, optiga_verify_sign_params_t *params)
Verifies the signature over the given digest.
Specifies the data structure of random generation.
optiga_lib_status_t optiga_cmd_derive_key(optiga_cmd_t *me, uint8_t cmd_param, optiga_derive_key_params_t *params)
Derives a key.
optiga_lib_status_t optiga_cmd_gen_symkey(optiga_cmd_t *me, uint8_t cmd_param, optiga_gen_symkey_params_t *params)
Generate symmetric key using OPTIGA.
Specifies the data structure for symmetric generate key.
optiga_lib_status_t optiga_cmd_open_application(optiga_cmd_t *me, uint8_t cmd_param, void *params)
Opens the OPTIGA Application.
optiga_lib_status_t optiga_cmd_gen_keypair(optiga_cmd_t *me, uint8_t cmd_param, optiga_gen_keypair_params_t *params)
Generates ECC or RSA key-pair.
optiga_lib_status_t optiga_cmd_set_object_protected(optiga_cmd_t *me, uint8_t cmd_param, optiga_set_object_protected_params_t *params)
Writes protected object fragments to OPTIGA.
Specifies the data structure of calculate hash.
optiga_lib_status_t optiga_cmd_release_lock(const optiga_cmd_t *me)
Releases the OPTIGA cmd lock.
optiga_lib_status_t optiga_cmd_destroy(optiga_cmd_t *me)
Destroys the instance of optiga_cmd_t.
optiga_lib_status_t optiga_cmd_encrypt_asym(optiga_cmd_t *me, uint8_t cmd_param, optiga_encrypt_asym_params_t *params)
Encrypt data using RSA public key.
Specifies the data structure for ECDSA signature verification.
optiga_lib_status_t optiga_cmd_close_application(optiga_cmd_t *me, uint8_t cmd_param, void *params)
Closes the OPTIGA Application.
optiga_lib_status_t optiga_cmd_decrypt_asym(optiga_cmd_t *me, uint8_t cmd_param, optiga_decrypt_asym_params_t *params)
Decrypts data using OPTIGA RSA private key.
optiga_lib_status_t optiga_cmd_decrypt_sym(optiga_cmd_t *me, uint8_t cmd_param, optiga_decrypt_sym_params_t *params)
Decrypt data using optiga_symmetric_encryption_mode_t encryption scheme.
optiga_lib_status_t optiga_cmd_calc_hash(optiga_cmd_t *me, uint8_t cmd_param, optiga_calc_hash_params_t *params)
Generates hash on external data or data in OID.
Specifies the structure for asymmetric encryption and decryption.
Specifies the data structure for protected update.
Specifies the data structure for ECDSA signature.
This file provides the prototypes for the commonly used functions and structures of OPTIGA Library.
Specifies the data structure for generate key pair.
struct optiga_context optiga_context_t
OPTIGA comms instance structure type.
void(* callback_handler_t)(void *callback_ctx, optiga_lib_status_t event)
typedef for event callback handler
uint16_t optiga_lib_status_t
typedef for OPTIGA host library status
optiga_lib_status_t optiga_cmd_encrypt_sym(optiga_cmd_t *me, uint8_t cmd_param, optiga_encrypt_sym_params_t *params)
Encrypt data using optiga_symmetric_encryption_mode_t encryption scheme.
optiga_lib_status_t optiga_cmd_calc_ssec(optiga_cmd_t *me, uint8_t cmd_param, optiga_calc_ssec_params_t *params)
Calculates shared secret.
Specifies the structure for derivation of key using pseudo random function.