Mistake on this page? Email us
pal_plat_rot.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright 2016-2018 ARM Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *******************************************************************************/
16 
17 
18 #ifndef _PAL_PLAT_ROT_H
19 #define _PAL_PLAT_ROT_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #include "pal.h"
26 
27 #include <stdint.h>
28 #include <stddef.h>
29 
30 #define PAL_SHA256_DEVICE_KEY_SIZE_IN_BYTES 32
31 #define PAL_DEVICE_KEY_SIZE_IN_BITS (128)
32 #define PAL_DEVICE_KEY_SIZE_IN_BYTES (PAL_DEVICE_KEY_SIZE_IN_BITS / 8)
33 
46 palStatus_t pal_plat_osGetRoT(uint8_t *keyBuf, size_t keyLenBytes);
47 
48 #if PAL_USE_HW_ROT
49 
58 palStatus_t pal_plat_osGetRoTFromHW(uint8_t *keyBuf, size_t keyLenBytes);
59 #endif
60 
61 #if defined (PAL_USE_HW_ROT) && (PAL_USE_HW_ROT==0)
62 
75 palStatus_t pal_plat_osSetRoT(uint8_t *keyBuf, size_t keyLenBytes);
76 #endif
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif //_PAL_PLAT_ROT_H
PAL. This file contains the general API to initiate and destroy the PAL component. This is part of the PAL service API.
palStatus_t pal_plat_osGetRoTFromHW(uint8_t *keyBuf, size_t keyLenBytes)
Retrieve platform Root of Trust (RoT) certificate.
palStatus_t pal_plat_osGetRoT(uint8_t *keyBuf, size_t keyLenBytes)
Retrieves a platform Root of Trust certificate.
int32_t palStatus_t
Definition: pal_types.h:49