1 /*
2  * Copyright (c) 2022-2023, STMicroelectronics - All Rights Reserved
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef STM32_PKA_H
8 #define STM32_PKA_H
9 
10 #include <stdint.h>
11 
12 enum stm32_pka_ecdsa_curve_id {
13 	PKA_NIST_P256,
14 	PKA_BRAINPOOL_P256R1,
15 	PKA_BRAINPOOL_P256T1,
16 	PKA_NIST_P521,
17 };
18 
19 struct stm32_pka_platdata {
20 	uintptr_t base;
21 	unsigned long clock_id;
22 	unsigned int reset_id;
23 };
24 
25 int stm32_pka_init(void);
26 int stm32_pka_ecdsa_verif(void *hash, unsigned int hash_size,
27 			  void *sig_r_ptr, unsigned int sig_r_size,
28 			  void *sig_s_ptr, unsigned int sig_s_size,
29 			  void *pk_x_ptr, unsigned int pk_x_size,
30 			  void *pk_y_ptr, unsigned int pk_y_size,
31 			  enum stm32_pka_ecdsa_curve_id cid);
32 
33 #endif /* STM32_PKA_H */
34