BOLOS TEE
Functions
bolos_sharedmemory.h File Reference

Shared memory API providing a common zone for applications to keep persistent private data in a session. More...

Go to the source code of this file.

Functions

int bls_sharedmemory_get_size (void)
 Get the size of the shared memory area. More...
 
size_t bls_sharedmemory_read (const uint8_t *parameters, uint32_t offset, size_t parametersLength)
 Read data from the shared memory area. More...
 
size_t bls_sharedmemory_write (const uint8_t *parameters, uint32_t offset, size_t parametersLength)
 Write data to the shared memory area. More...
 

Detailed Description

Shared memory API providing a common zone for applications to keep persistent private data in a session.

Author
Ledger Firmware Team hello.nosp@m.@led.nosp@m.ger.f.nosp@m.r
Version
1.0
Date
4th of December 2016

The shared memory API provides a small transient storage area for all applications that isn't shared with the host. It can be used to implement basic anti replay mechanisms when the anti replay API is not available

Function Documentation

int bls_sharedmemory_get_size ( void  )

Get the size of the shared memory area.

Returns
size of the shared memory area
size_t bls_sharedmemory_read ( const uint8_t *  parameters,
uint32_t  offset,
size_t  parametersLength 
)

Read data from the shared memory area.

Parameters
[out]parametersbuffer to store the data
[in]offsetoffset to start reading the data from
[in]parametersLengthlength of data to read
Returns
size of parameters copied
size_t bls_sharedmemory_write ( const uint8_t *  parameters,
uint32_t  offset,
size_t  parametersLength 
)

Write data to the shared memory area.

Parameters
[out]parametersbuffer containing the data
[in]offsetoffset to start writing the data to
[in]parametersLengthlength of data to write
Returns
size of parameters copied