BOLOS TEE
Data Structures | Macros | Typedefs | Enumerations
bolos_crypto_common.h File Reference

Common constants and structures used by the Cryptographic API. More...

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

Go to the source code of this file.

Data Structures

struct  bls_rsa_crt_s
 
struct  bls_rsa_keypair_data_s
 

Macros

#define BLS_LAST   (1<<0)
 
#define BLS_SIG_MODE   (1<<1)
 
#define BLS_MASK_SIGCRYPT   (3<<1)
 
#define BLS_ENCRYPT   (2<<1)
 
#define BLS_DECRYPT   (0<<1)
 
#define BLS_SIGN   (BLS_SIG_MODE|BLS_ENCRYPT)
 
#define BLS_VERIFY   (BLS_SIG_MODE|BLS_DECRYPT)
 
#define BLS_MASK_PAD   (7<<3)
 
#define BLS_PAD_NONE   (0<<3)
 
#define BLS_PAD_ISO9797M1   (1<<3)
 
#define BLS_PAD_ISO9797M2   (2<<3)
 
#define BLS_PAD_PKCS1_1o5   (3<<3)
 
#define BLS_PAD_PSS   BLS_PAD_ISO9797M1
 
#define BLS_PAD_PKCS5   BLS_PAD_PKCS1_1o5
 
#define BLS_MASK_CHAIN   (3<<6)
 
#define BLS_CHAIN_ECB   (0<<6)
 
#define BLS_CHAIN_CBC   (1<<6)
 
#define BLS_MASK_RND   (3<<8)
 
#define BLS_RND_PRNG   (1<<8)
 
#define BLS_RND_TRNG   (2<<8)
 
#define BLS_RND_RFC6979   (3<<8)
 
#define BLS_MASK_ECDH   (3<<10)
 
#define BLS_ECDH_POINT   (1<<10)
 
#define BLS_ECDH_X   (2<<10)
 
#define BLS_ECDH_HASHED   (3<<10)
 
#define BLS_DISCARD   (1<<12)
 
#define BLS_MASK_AES_CHAIN   (3<<13)
 
#define BLS_AES_CHAIN_CTR   (1<<13)
 
#define BLS_AES_CHAIN_CFB   (2<<13)
 
#define BLS_AES_CHAIN_OFB   (3<<13)
 
#define BLS_RIPEMD160_SIZE   20
 
#define BLS_SHA256_SIZE   32
 
#define BLS_SHA512_SIZE   64
 
#define BLS_HASH_MAX_BLOCK_COUNT   65535
 
#define BLS_DES_BLOCK_SIZE   8
 
#define BLS_AES_BLOCK_SIZE   16
 
#define BLS_CRC16_INIT   0xFFFF
 

Typedefs

typedef enum bls_md_e bls_md_t
 
typedef struct bls_rsa_crt_s bls_rsa_crt_t
 
typedef struct bls_rsa_keypair_data_s bls_rsa_keypair_data_t
 
typedef enum bls_curve_e bls_curve_t
 

Enumerations

enum  bls_md_e {
  BLS_NONE, BLS_RIPEMD160, BLS_SHA224, BLS_SHA256,
  BLS_SHA384, BLS_SHA512, BLS_SHA1
}
 
enum  bls_curve_e {
  BLS_CURVE_NONE, BLS_CURVE_256K1, BLS_CURVE_256R1, BLS_CURVE_192K1,
  BLS_CURVE_192R1
}
 

Detailed Description

Common constants and structures used by the Cryptographic API.

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

Defines common constants and structures used by BOLOS Cryptographic API

Macro Definition Documentation

#define BLS_DISCARD   (1<<12)

Bit 12

#define BLS_LAST   (1<<0)

Bit 0

#define BLS_MASK_AES_CHAIN   (3<<13)

Bit 14:13

#define BLS_MASK_CHAIN   (3<<6)

Bit 7:6

#define BLS_MASK_ECDH   (3<<10)

Bit 11:10

#define BLS_MASK_PAD   (7<<3)

Bit 5:3

#define BLS_MASK_RND   (3<<8)

Bit 9:8

#define BLS_MASK_SIGCRYPT   (3<<1)

Bit 2:1

#define BLS_SIG_MODE   (1<<1)

Bit 1