1 /*
2  * Copyright (c) 2022-2023, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef BL1_2_PQ_CRYPTO_H
9 #define BL1_2_PQ_CRYPTO_H
10 
11 #include <stddef.h>
12 #include <stdint.h>
13 #include "crypto_key_defs.h"
14 #include "fih.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /* Verify signature using the LMS stateful-hash post-quantum crypto algorithm as
21  * per IETF RFC8554 and NIST SP800-208.
22  */
23 fih_int pq_crypto_verify(enum tfm_bl1_key_id_t key,
24                          const uint8_t *data,
25                          size_t data_length,
26                          const uint8_t *signature,
27                          size_t signature_length);
28 
29 /* Get the hash of the public key */
30 int pq_crypto_get_pub_key_hash(enum tfm_bl1_key_id_t key,
31                                uint8_t *hash,
32                                size_t hash_size,
33                                size_t *hash_length);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif /* BL1_2_PQ_CRYPTO_H */
40