BOLOS TEE
Typedefs | Enumerations | Functions
bolos_wrapping.h File Reference

Bind data to a specific device, device session, and running application. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum bls_wrapping_scope_e bls_wrapping_scope_t
 

Enumerations

enum  bls_wrapping_scope_e {
  BLS_SCOPE_DEVICE, BLS_SCOPE_APPLICATION, BLS_SCOPE_SESSION, BLS_SCOPE_SESSION_APPLICATION,
  BLS_SCOPE_PERSONALIZATION
}
 Describe the scope of the wrapped data. More...
 

Functions

unsigned int bls_wrap (bls_wrapping_scope_t scope, const uint8_t WIDE *in, size_t length, uint8_t *out, size_t outLength)
 Wrap data. More...
 
unsigned int bls_unwrap (bls_wrapping_scope_t scope, const uint8_t WIDE *in, size_t length, uint8_t *out, size_t outLength)
 Unwrap data. More...
 

Detailed Description

Bind data to a specific device, device session, and running application.

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

The wrapping API allows executed code to exchange secret blobs with the Normal World to be consumed later.

Blobs can have different lifetimes described in the wrapping scope below

The lifetime of a session is defined by the lower level communication API

The size of the metadata added by the wrapping operation is implementation dependant

Enumeration Type Documentation

Describe the scope of the wrapped data.

Enumerator
BLS_SCOPE_DEVICE 

all applications can access on this device

BLS_SCOPE_APPLICATION 

only the creating application can access on this device

BLS_SCOPE_SESSION 

all applications can access on this device for this session

BLS_SCOPE_SESSION_APPLICATION 

only the creating application can access on this device for this session

BLS_SCOPE_PERSONALIZATION 

can only unwrap a blob sent by the issuer server

Function Documentation

unsigned int bls_unwrap ( bls_wrapping_scope_t  scope,
const uint8_t WIDE *  in,
size_t  length,
uint8_t *  out,
size_t  outLength 
)

Unwrap data.

Parameters
[in]scopeScope for which the data had been wrapped
[in]inInput buffer containing the data to unwrap
[in]lengthLength of the data to unwrap
[out]outOutput buffer to contain the unwrapped data
[in]outLengthSize of the output buffer containing the unwrapped data
Returns
size of the unwrapped data
Exceptions
INVALID_PARAMETER
unsigned int bls_wrap ( bls_wrapping_scope_t  scope,
const uint8_t WIDE *  in,
size_t  length,
uint8_t *  out,
size_t  outLength 
)

Wrap data.

Parameters
[in]scopeScope for which the data shall be wrapped
[in]inInput buffer containing the data to wrap
[in]lengthLength of the data to wrap
[out]outOutput buffer to contain the wrapped data
[in]outLengthSize of the output buffer containing the wrapped data
Returns
size of the wrapped data
Exceptions
INVALID_PARAMETER