NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Common TA Service Attributes

Detailed Description

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...
 

Macro Definition Documentation

#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.

Enumeration Type Documentation

Defines attribute ID types.

Enumerator
OTE_ATTR_SECRET_VALUE 
OTE_ATTR_RSA_MODULES 

OTE_ATTR_PUB.

OTE_ATTR_RSA_PUBLIC_EXPONENT 

OTE_ATTR_PUB.

OTE_ATTR_RSA_PRIVATE_EXPONENT 
OTE_ATTR_RSA_PRIME1 
OTE_ATTR_RSA_PRIME2 
OTE_ATTR_RSA_EXPONENT1 
OTE_ATTR_RSA_EXPONENT2 
OTE_ATTR_RSA_COEFFICIENT 
OTE_ATTR_DSA_PRIME 
OTE_ATTR_DSA_SUBPRIME 

OTE_ATTR_PUB.

OTE_ATTR_DSA_BASE 

OTE_ATTR_PUB.

OTE_ATTR_DSA_PUBLIC_VALUE 

OTE_ATTR_PUB.

OTE_ATTR_DSA_PRIVATE_VALUE 

OTE_ATTR_PUB.

OTE_ATTR_DH_PRIME 

OTE_ATTR_PUB.

OTE_ATTR_DH_SUBPRIME 

OTE_ATTR_PUB.

OTE_ATTR_DH_BASE 

OTE_ATTR_PUB.

OTE_ATTR_DH_X_BITS 

OTE_ATTR_VAL | OTE_ATTR_PUB.

OTE_ATTR_DH_PUBLIC_VALUE 

OTE_ATTR_PUB.

OTE_ATTR_DH_PRIVATE_VALUE 
OTE_ATTR_RSA_OAEP_LABEL 

OTE_ATTR_PUB.

OTE_ATTR_RSA_PSS_SALT_LENGTH 

OTE_ATTR_VAL | OTE_ATTR_PUB.

Definition at line 50 of file ote_attrs.h.

Function Documentation

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.

Parameters
[in,out]dstDestination attribute.
[in]srcSource 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.

Parameters
[in,out]bufferDestination buffer.
[in]keySource attribute.
void te_free_internal_attribute ( te_attribute_t attr)

Frees internal attribute memory.

Frees any memory refereces by attribute.

Parameters
[in]attrAttribute 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.

Parameters
[in]attrAttribute object.
[out]retReturn buffer pointer.
Return values
OTE_SUCCESSIndicates 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.

Parameters
[in]attrAttribute object.
[out]retReturn size.
Return values
OTE_SUCCESSIndicates 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.

Return values
OTE_SUCCESSIndicates the operation was successful.
Parameters
[in,out]attrAttribute object.
[in]idAttribute ID.
[in]aInteger value.
[in]bInteger 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.

See also
te_get_mem_attribute_buffer() and te_get_mem_attribute_size()
Parameters
[in,out]attrAttribute object.
[in]idAttribute ID of the buffer.
[in]bufferMemory location of the buffer.
[in]sizeSize of the buffer.
Return values
OTE_SUCCESSIndicates the operation was successful.