NVIDIA DRIVE OS Linux API Reference5.1.0.2 Release |
NVIDIA Trusted Little Kernel Interface: Cryptography
Description: Declares the cryptography APIs in the TLK.
Definition in file ote_crypto.h.
Go to the source code of this file.
Data Structures | |
struct | te_crypto_operation_info_t |
Holds a crypto operation info object. More... | |
struct | __te_crypto_operation_t |
Internal data structure for te_crypto_operation_t . More... | |
struct | te_crypto_rsa_key_t |
Holds internal data for RSA keys. More... | |
struct | hwrng_cache |
Macros | |
#define | AES_BLOCK_SIZE 16 |
#define | AES_ENCRYPTION_PADDED_SIZE(clearlen) ((((clearlen) + AES_BLOCK_SIZE) / AES_BLOCK_SIZE) * AES_BLOCK_SIZE) |
#define | OTE_AES_MODE_NEEDS_PADDING(algo) |
#define | HWRNG_CACHE_SIZE_BYTES 1024 |
#define | HWRNG_CACHE_ENTROPY_SIZE_BYTES 256 |
Typedefs | |
typedef struct __te_crypto_object * | te_crypto_object_t |
typedef struct __te_crypto_operation_t * | te_crypto_operation_t |
Enumerations | |
enum | te_oper_crypto_algo_t { OTE_ALG_AES_ECB_NOPAD = 0x10000010, OTE_ALG_AES_CBC_NOPAD = 0x10000110, OTE_ALG_AES_CTR = 0x10000210, OTE_ALG_AES_CTS = 0x10000310, OTE_ALG_AES_ECB = 0x10000510, OTE_ALG_AES_CBC = 0x10000610, OTE_ALG_AES_CBC_256 = 0x10000710, OTE_ALG_AES_CBC_256_NOPAD = 0x10000810, OTE_ALG_AES_CMAC_128 = 0x20000110, OTE_ALG_AES_CMAC_192 = 0x20000120, OTE_ALG_AES_CMAC_256 = 0x20000130, OTE_ALG_SHA_HMAC_224 = 0x20000210, OTE_ALG_SHA_HMAC_256 = 0x20000220, OTE_ALG_SHA_HMAC_384 = 0x20000230, OTE_ALG_SHA_HMAC_512 = 0x20000240, OTE_ALG_SHA_HMAC_1 = 0x20000250, OTE_ALG_RSA_PKCS_OAEP = 0x30000100, OTE_ALG_RSA_PSS = 0x30000200, OTE_ALG_PKCS1_Block1 = 0x30000300, OTE_ALG_DRNG = 0x50000000 } |
Defines algorithm types. More... | |
enum | te_oper_crypto_algo_mode_t { OTE_ALG_MODE_ENCRYPT, OTE_ALG_MODE_DECRYPT, OTE_ALG_MODE_SIGN, OTE_ALG_MODE_VERIFY, OTE_ALG_MODE_DIGEST, OTE_ALG_MODE_DERIVE } |
Defines algrorithm modes. More... | |
Functions | |
te_error_t | te_allocate_object (te_crypto_object_t *obj) |
Allocates memory for a te_crypto_object_t. More... | |
te_error_t | te_populate_object (te_crypto_object_t obj, te_attribute_t *attrs, uint32_t attr_count) |
Populates crypto object from a list of attributes. More... | |
void | te_free_object (te_crypto_object_t obj) |
Frees allocated memory within crypto object. More... | |
te_error_t | te_allocate_operation (te_crypto_operation_t *oper, te_oper_crypto_algo_t algorithm, te_oper_crypto_algo_mode_t mode) |
Allocates memory for crypto operation. More... | |
te_error_t | te_set_operation_key (te_crypto_operation_t oper, te_crypto_object_t obj) |
Allocates memory in the crypto operation and copies the key from the crypto object to the operation object. More... | |
te_error_t | te_cipher_init (te_crypto_operation_t oper, void *iv, size_t iv_size) |
Initializes the operation cipher. More... | |
te_error_t | te_cipher_update (te_crypto_operation_t oper, const void *src_data, size_t src_size, void *dst_data, size_t *dst_size) |
Updates the cipher by calling the operation update function with the supplied parameters. More... | |
te_error_t | te_cipher_do_final (te_crypto_operation_t oper, const void *src_data, size_t src_len, void *dst_data, size_t *dst_len) |
Calls operation do_final with supplied parameters. More... | |
te_error_t | te_rsa_init (te_crypto_operation_t oper) |
Initializes the RSA operation. More... | |
te_error_t | te_rsa_get_modulus_size (te_crypto_operation_t oper, size_t *modulus_size_bytes) |
Returns the RSA modulus size in bytes. More... | |
te_error_t | te_rsa_handle_request (te_crypto_operation_t oper, const void *src_data, size_t src_size, void *dst_data, size_t *dst_size) |
Executes the specified RSA operations. More... | |
void | te_free_operation (te_crypto_operation_t oper) |
Frees operation internal memory. More... | |
void | te_generate_random (void *buffer, size_t size) |
Generates random data. More... | |
te_error_t | te_get_attribute_by_id (te_crypto_object_t object, te_attribute_id_t id, te_attribute_t **ret) |
Finds the first attribute in the crypto object that matches ID. More... | |
te_error_t | te_crypt_data (te_oper_crypto_algo_mode_t mode, te_oper_crypto_algo_t algo, unsigned char *key, unsigned int keysize, unsigned char *iv, unsigned int ivsize, unsigned char *in, unsigned int insize, unsigned char *out, unsigned int *outsize) |
Crypto wrapper around software crypto library. More... | |