4 /**************************************************************************
6 **************************************************************************/
7 #define RSA_KEY_LEN_2048 (0)
8 #define RSA_KEY_LEN_1024 (1)
10 /**************************************************************************
12 **************************************************************************/
15 #error "RSA_KEY_LEN_1024 should be disabled"
21 #error "RSA_KEY_LEN_2048 should be disabled"
25 /**************************************************************************
26 * RSA PKCS01 CONFIGURATION
27 **************************************************************************/
28 #define RSA_KEY_MAX_LEN (128) // bytes
29 #define RSA_E_KEY_LEN (5) // bytes
32 #define RSA_KEY_LEN (256) // bytes
33 #define HASH_LEN (32) // bytes
35 #elif RSA_KEY_LEN_1024
36 #define RSA_KEY_LEN (128) // bytes
37 #define HASH_LEN (20) // bytes
40 #error "RSA_KEY_LEN is not defined"
44 /**************************************************************************
46 **************************************************************************/
47 typedef struct _CUST_SEC_INTER
49 /* key to sign image patch */
50 unsigned char key_rsa_n
[RSA_KEY_MAX_LEN
*2]; // string. number base = 16
51 unsigned char key_rsa_d
[RSA_KEY_MAX_LEN
*2]; // string. number base = 16
52 unsigned char key_rsa_e
[RSA_E_KEY_LEN
]; // string. number base = 16
55 #endif /*_CUST_SEC_H*/