1 /*
2  * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*!
8  @addtogroup cc_pka_hw_plat_defs
9  @{
10  */
11 
12 /*!
13  @file
14  @brief This file contains the platform-dependent definitions of the CryptoCell PKA APIs.
15  */
16 
17 #ifndef _CC_PKA_HW_PLAT_DEFS_H
18 #define _CC_PKA_HW_PLAT_DEFS_H
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #include "cc_pal_types.h"
26 
27 /*! The size of the PKA engine word. */
28 #define CC_PKA_WORD_SIZE_IN_BITS            64
29 /*! The maximal supported size of modulus in bits. */
30 #define CC_SRP_MAX_MODULUS_SIZE_IN_BITS       3072
31 /*! The maximal supported size of modulus in RSA in bits. */
32 #define CC_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS         4096
33 /*! The maximal supported size of key-generation in RSA in bits. */
34 #define CC_RSA_MAX_KEY_GENERATION_HW_SIZE_BITS         3072
35 /*! The maximal supported size of modulus in RSA in words. */
36 #define CC_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_WORDS        CC_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS / CC_BITS_IN_32BIT_WORD
37 
38 /*! The size of the RSA public modulus key of the Secure Boot or Secure Debug
39 certificate in bits. */
40 #define SB_CERT_RSA_KEY_SIZE_IN_BITS     3072UL
41 /*! The size of the RSA public modulus key of the Secure Boot or Secure Debug
42 certificate in bytes. */
43 #define SB_CERT_RSA_KEY_SIZE_IN_BYTES    (SB_CERT_RSA_KEY_SIZE_IN_BITS/CC_BITS_IN_BYTE)
44 /*! The size of the RSA public modulus key of the Secure Boot or Secure Debug
45 certificate in words. */
46 #define SB_CERT_RSA_KEY_SIZE_IN_WORDS    (SB_CERT_RSA_KEY_SIZE_IN_BITS/CC_BITS_IN_32BIT_WORD)
47 
48 /*! The maximal count of extra bits in PKA operations. */
49 #define PKA_EXTRA_BITS  8
50 /*! The number of memory registers in PKA operations. */
51 #define PKA_MAX_COUNT_OF_PHYS_MEM_REGS  32
52 
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 /*!
59  @}
60  */
61 #endif //_CC_PKA_HW_PLAT_DEFS_H
62