BOLOS TEE
Functions
bolos_antireplay.h File Reference

Anti replay API used to avoid reuse of formerly generated cryptographic material when supported by the platform. More...

Go to the source code of this file.

Functions

int bls_antireplay_supported (void)
 Check if antireplay hardware APIs are supported on this platform. More...
 
int bls_antireplay_create (uint8_t *referenceOut, size_t referenceOutLength)
 Create a new anti-replay counter. More...
 
int bls_antireplay_query (uint8_t *reference, size_t referenceLength, uint32_t *value)
 Query the value of an anti-replay counter. More...
 
int bls_antireplay_increase (uint8_t *reference, size_t referenceLength)
 Increase the value of an anti-replay counter. More...
 
int bls_antireplay_delete (uint8_t *reference, size_t referenceLength)
 Delete a previously created anti-replay counter. More...
 

Detailed Description

Anti replay API used to avoid reuse of formerly generated cryptographic material when supported by the platform.

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

The anti replay API provides access to hardware based monotonic counters that can be increased and compared against a given value.

Support of this API is platform dependent

Function Documentation

int bls_antireplay_create ( uint8_t *  referenceOut,
size_t  referenceOutLength 
)

Create a new anti-replay counter.

Parameters
[out]outBuffer to contain the counter reference used in future calls
[in]outLengthSize of the buffer to contain the counter reference
Returns
size of the created reference if success, 0 if error
int bls_antireplay_delete ( uint8_t *  reference,
size_t  referenceLength 
)

Delete a previously created anti-replay counter.

Parameters
[in]referenceBuffer containing the counter reference
[in]referenceLengthSize of the counter reference
Returns
1 if success, 0 if error
int bls_antireplay_increase ( uint8_t *  reference,
size_t  referenceLength 
)

Increase the value of an anti-replay counter.

Parameters
[in]referenceBuffer containing the counter reference
[in]referenceLengthSize of the counter reference
Returns
1 if success, 0 if error
int bls_antireplay_query ( uint8_t *  reference,
size_t  referenceLength,
uint32_t *  value 
)

Query the value of an anti-replay counter.

Parameters
[in]referenceBuffer containing the counter reference
[in]referenceLengthSize of the counter reference
[out]valueReturned value of the counter
Returns
1 if success, 0 if error
int bls_antireplay_supported ( void  )

Check if antireplay hardware APIs are supported on this platform.

Returns
1 if supported, 0 if not supported