NVIDIA DRIVE OS Linux API Reference5.1.0.2 Release |
Defines Trusted Little Kernel (TLK) common Trusted Application (TA) service attributes.
Data Structures | |
struct | te_attribute_t |
Defines attribute object internals. More... | |
Macros | |
#define | OTE_ATTR_VAL 1 << 29 |
Defines attribute ID type flag bitmasks. More... | |
#define | OTE_ATTR_PUB 1 << 28 |
Enumerations | |
enum | te_attribute_id_t { OTE_ATTR_SECRET_VALUE = 0xC0000000U, OTE_ATTR_RSA_MODULES = 0xD0000130U, OTE_ATTR_RSA_PUBLIC_EXPONENT = 0xD0000230U, OTE_ATTR_RSA_PRIVATE_EXPONENT = 0xC0000330U, OTE_ATTR_RSA_PRIME1 = 0xC0000430U, OTE_ATTR_RSA_PRIME2 = 0xC0000530U, OTE_ATTR_RSA_EXPONENT1 = 0xC0000630U, OTE_ATTR_RSA_EXPONENT2 = 0xC0000730U, OTE_ATTR_RSA_COEFFICIENT = 0xC0000830U, OTE_ATTR_DSA_PRIME = 0xD0001031U, OTE_ATTR_DSA_SUBPRIME = 0xD0001131U, OTE_ATTR_DSA_BASE = 0xD0001231U, OTE_ATTR_DSA_PUBLIC_VALUE = 0xD0000131U, OTE_ATTR_DSA_PRIVATE_VALUE = 0xD0000231U, OTE_ATTR_DH_PRIME = 0xD0001032U, OTE_ATTR_DH_SUBPRIME = 0xD0001132U, OTE_ATTR_DH_BASE = 0xD0001232U, OTE_ATTR_DH_X_BITS = 0xF0001332U, OTE_ATTR_DH_PUBLIC_VALUE = 0xD0000132U, OTE_ATTR_DH_PRIVATE_VALUE = 0xC0000232U, OTE_ATTR_RSA_OAEP_LABEL = 0xD0000930U, OTE_ATTR_RSA_PSS_SALT_LENGTH = 0xF0000A30U } |
Defines attribute ID types. More... | |
Functions | |
te_error_t | te_set_mem_attribute (te_attribute_t *attr, te_attribute_id_t id, void *buffer, uint32_t size) |
Sets up a memory attribute struct for use in other functions. More... | |
te_error_t | te_get_mem_attribute_buffer (te_attribute_t *attr, void **ret) |
Gets a memory attribute buffer. More... | |
te_error_t | te_get_mem_attribute_size (te_attribute_t *attr, size_t *ret) |
Gets memory attribute size. More... | |
void | te_copy_mem_attribute (void *buffer, te_attribute_t *key) |
Copies the memory attribute. More... | |
te_error_t | te_set_int_attribute (te_attribute_t *attr, te_attribute_id_t id, uint32_t a, uint32_t b) |
Sets the integer attribute. More... | |
void | te_free_internal_attribute (te_attribute_t *attr) |
Frees internal attribute memory. More... | |
te_error_t | te_copy_attribute (te_attribute_t *dst, te_attribute_t *src) |
Copies attribute internals. More... | |
#define OTE_ATTR_PUB 1 << 28 |
Definition at line 77 of file ote_attrs.h.
#define OTE_ATTR_VAL 1 << 29 |
Defines attribute ID type flag bitmasks.
Definition at line 76 of file ote_attrs.h.
enum te_attribute_id_t |
Defines attribute ID types.
Definition at line 50 of file ote_attrs.h.
te_error_t te_copy_attribute | ( | te_attribute_t * | dst, |
te_attribute_t * | src | ||
) |
Copies attribute internals.
After allocating space in destination attribute, this function copies integer memory attributes.
[in,out] | dst | Destination attribute. |
[in] | src | Source attribute. |
void te_copy_mem_attribute | ( | void * | buffer, |
te_attribute_t * | key | ||
) |
Copies the memory attribute.
Copies the memory attribute buffer to the destination buffer, which must previously be allocated.
[in,out] | buffer | Destination buffer. |
[in] | key | Source attribute. |
void te_free_internal_attribute | ( | te_attribute_t * | attr | ) |
Frees internal attribute memory.
Frees any memory refereces by attribute.
[in] | attr | Attribute object. |
te_error_t te_get_mem_attribute_buffer | ( | te_attribute_t * | attr, |
void ** | ret | ||
) |
Gets a memory attribute buffer.
Stores in ret the address of the buffer in the memory attribute.
[in] | attr | Attribute object. |
[out] | ret | Return buffer pointer. |
OTE_SUCCESS | Indicates the operation was successful. |
te_error_t te_get_mem_attribute_size | ( | te_attribute_t * | attr, |
size_t * | ret | ||
) |
Gets memory attribute size.
Stores in ret the size of the buffer in the mem attribute.
[in] | attr | Attribute object. |
[out] | ret | Return size. |
OTE_SUCCESS | Indicates the operation was successful. |
te_error_t te_set_int_attribute | ( | te_attribute_t * | attr, |
te_attribute_id_t | id, | ||
uint32_t | a, | ||
uint32_t | b | ||
) |
Sets the integer attribute.
Sets the attribute with integer values and id. The id parameter must match the integer type.
OTE_SUCCESS | Indicates the operation was successful. |
[in,out] | attr | Attribute object. |
[in] | id | Attribute ID. |
[in] | a | Integer value. |
[in] | b | Integer value. |
te_error_t te_set_mem_attribute | ( | te_attribute_t * | attr, |
te_attribute_id_t | id, | ||
void * | buffer, | ||
uint32_t | size | ||
) |
Sets up a memory attribute struct for use in other functions.
This function stores the id, buffer, and size parameters in the memory attribute. The id parameter must be compatible with the memory attributes.
[in,out] | attr | Attribute object. |
[in] | id | Attribute ID of the buffer. |
[in] | buffer | Memory location of the buffer. |
[in] | size | Size of the buffer. |
OTE_SUCCESS | Indicates the operation was successful. |