BOLOS TEE
bolos_crypto_platform_tee.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * BOLOS TEE
4 * (c) 2016 Ledger
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 ********************************************************************************/
18 
29 #ifndef __BOLOS_CRYPTO_PLATFORM_TEE_H__
30 
31 #define __BOLOS_CRYPTO_PLATFORM_TEE_H__
32 
33 typedef uint32_t bls_crypto_handle_t;
34 
36  bls_crypto_handle_t header;
37 };
38 typedef struct bls_ripemd160_s bls_ripemd160_t;
39 
40 struct bls_sha256_s {
41  bls_crypto_handle_t header;
42 };
43 typedef struct bls_sha256_s bls_sha256_t;
44 
45 struct bls_sha512_s {
46  bls_crypto_handle_t header;
47 };
48 typedef struct bls_sha512_s bls_sha512_t;
49 
50 struct bls_sha1_s {
51  bls_crypto_handle_t header;
52 };
53 typedef struct bls_sha1_s bls_sha1_t;
54 
55 
56 //typedef struct bls_crypto_handle_t bls_hash_t;
57 typedef bls_crypto_handle_t bls_hash_t;
58 
59 /* ======================================================================= */
60 /* HASH MAC */
61 /* ======================================================================= */
62 
64  bls_crypto_handle_t handle;
65 };
67 
69  bls_crypto_handle_t handle;
70 };
72 
74  bls_crypto_handle_t handle;
75 };
77 
78 struct bls_hmac_s {
79  bls_crypto_handle_t handle;
80 };
81 typedef struct bls_hmac_s bls_hmac_t;
82 
83 
84 
85 /* ####################################################################### */
86 /* CIPHER/SIGNATURE */
87 /* ####################################################################### */
88 /* - DES
89  * - ECDSA
90  * - ECDH
91  * - RSA
92  */
93 
94 
95 /* ======================================================================= */
96 /* DES */
97 /* ======================================================================= */
98 
99 
100 #define CX_DES_BLOCK_SIZE 8
101 
103  bls_crypto_handle_t handle;
104 } ;
105 
106 typedef struct bls_des_key_s bls_des_key_t;
107 
108 
109 /* ======================================================================= */
110 /* AES */
111 /* ======================================================================= */
112 
113 
115  bls_crypto_handle_t handle;
116 };
117 
118 typedef struct bls_aes_key_s bls_aes_key_t;
119 
120 
121 /* ======================================================================= */
122 /* RSA */
123 /* ======================================================================= */
124 
126  bls_crypto_handle_t handle;
127 };
129 
131  bls_crypto_handle_t handle;
132 };
134 
135 
136 /* ======================================================================= */
137 /* ECDSA */
138 /* ======================================================================= */
139 
140 typedef struct bls_curve_domain_s {
141  bls_curve_t curve;
143 
145  bls_crypto_handle_t handle;
146 };
147 
149  bls_crypto_handle_t handle;
150 };
151 
154 
155 #endif //__BOLOS_CRYPTO_PLATFORM_TEE_H__
Definition: bolos_crypto_platform_tee.h:78
Definition: bolos_crypto_platform_tee.h:68
Definition: bolos_crypto_platform_tee.h:140
Definition: bolos_crypto_platform_tee.h:45
Definition: bolos_crypto_platform_tee.h:144
Definition: bolos_crypto_platform_tee.h:102
Definition: bolos_crypto_platform_tee.h:114
Definition: bolos_crypto_platform_tee.h:125
Definition: bolos_crypto_platform_tee.h:130
Definition: bolos_crypto_platform_tee.h:40
Definition: bolos_crypto_platform_tee.h:148
Definition: bolos_crypto_platform_tee.h:50
Definition: bolos_crypto_platform_tee.h:63
Definition: bolos_crypto_platform_tee.h:35
Definition: bolos_crypto_platform_tee.h:73