key_data.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* key_data.h
  2. *
  3. * Copyright (C) 2006-2024 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. #ifndef KEY_DATA_H_
  22. #define KEY_DATA_H_
  23. #include <wolfssl/wolfcrypt/settings.h>
  24. #if defined(WOLFSSL_RENESAS_TSIP)
  25. #include "r_tsip_rx_if.h"
  26. typedef struct st_key_block_data
  27. {
  28. /* encrypted provisioning key */
  29. uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2];
  30. /* iv */
  31. uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE];
  32. /* RSA2048 public key for RootCA sign verification */
  33. uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
  34. /* update key (not used) */
  35. uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16];
  36. /* wrapped client RSA2048bit public key */
  37. uint8_t encrypted_user_rsa2048_public_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
  38. /* wrapped client RSA2048bit private key */
  39. uint8_t encrypted_user_rsa2048_private_key[R_TSIP_RSA2048_ND_KEY_BYTE_SIZE + 16];
  40. /* wrapped client ECC P256 public key */
  41. uint8_t encrypted_user_ecc256_public_key[R_TSIP_ECC_PUBLIC_KEY_BYTE_SIZE + 16];
  42. /* wrapped client ECC P256 private key */
  43. uint8_t encrypted_user_ecc256_private_key[R_TSIP_ECC_PRIVATE_KEY_BYTE_SIZE + 16];
  44. } st_key_block_data_t;
  45. extern const uint32_t encrypted_user_key_type;
  46. extern const st_key_block_data_t g_key_block_data;
  47. extern const unsigned char ca_cert_der_sig[];
  48. extern const unsigned char ca_ecc_cert_der_sig[];
  49. extern const unsigned char client_cert_der_sign[];
  50. extern const int sizeof_ca_cert_der;
  51. #endif /* WOLFSSL_RENESAS_TSIP */
  52. #endif /* KEY_DATA_H_ */