BOLOS TEE
bolos_endorsement.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 
40 #ifndef __BOLOS_ENDORSEMENT_H__
41 #define __BOLOS_ENDORSEMENT_H__
42 
50 };
51 typedef enum bls_endorsement_key_e bls_endorsement_key_t;
52 
61 int bls_endorsement_supported(bls_endorsement_key_t key);
62 
74 int bls_endorsement_get_authentication_public_key(uint8_t *out, size_t outLength);
75 
94 int bls_endorsement_init(bls_endorsement_key_t key, uint8_t *out, size_t outLength);
95 
112 int bls_endorsement_commit(bls_endorsement_key_t key, uint8_t *response, size_t responseLength);
113 
127 int bls_endorsement_get_code_hash(uint8_t *out, size_t outLength);
128 
143 int bls_endorsement_key1_get_app_secret(uint8_t *out, size_t outLength);
144 
165 int bls_endorsement_key1_sign_data(const uint8_t WIDE *in, size_t length,
166  uint8_t *out, size_t outLength);
167 
189 int bls_endorsement_key2_derive_sign_data(const uint8_t WIDE *in, size_t length,
190  uint8_t *out, size_t outLength);
191 
192 
207 int bls_endorsement_get_public_key(bls_endorsement_key_t endorsementKey,
208  uint8_t *out, size_t outLength);
209 
224 int bls_endorsement_get_certificate(bls_endorsement_key_t endorsementKey,
225  uint8_t *out, size_t outLength);
226 
227 #endif // __BOLOS_ENDORSEMENT_H__
Definition: bolos_endorsement.h:48
int bls_endorsement_supported(bls_endorsement_key_t key)
Check if endorsement is supported for the given key.
int bls_endorsement_get_certificate(bls_endorsement_key_t endorsementKey, uint8_t *out, size_t outLength)
Get the certificate associated to an endorsement key.
Definition: bolos_endorsement.h:49
int bls_endorsement_get_public_key(bls_endorsement_key_t endorsementKey, uint8_t *out, size_t outLength)
Get the public component of an endorsement key.
int bls_endorsement_init(bls_endorsement_key_t key, uint8_t *out, size_t outLength)
Initialize an endorsement key provisioning for the given key.
int bls_endorsement_key2_derive_sign_data(const uint8_t WIDE *in, size_t length, uint8_t *out, size_t outLength)
Sign a message using a key derived from endorsement key 2.
int bls_endorsement_get_authentication_public_key(uint8_t *out, size_t outLength)
Get the per device unique uncompressed public key signing the endorsement initialization request...
int bls_endorsement_get_code_hash(uint8_t *out, size_t outLength)
Get the currently running code hash.
int bls_endorsement_commit(bls_endorsement_key_t key, uint8_t *response, size_t responseLength)
Finalize an endorsement key provisioning process by providing the associated certificate.
bls_endorsement_key_e
Describe the endorsement key to use.
Definition: bolos_endorsement.h:47
int bls_endorsement_key1_get_app_secret(uint8_t *out, size_t outLength)
Get the application secret for endorsement key 1.
int bls_endorsement_key1_sign_data(const uint8_t WIDE *in, size_t length, uint8_t *out, size_t outLength)
Sign a message using endorsement key 1.