key_data.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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[
  38. R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
  39. /* wrapped client RSA2048bit private key */
  40. uint8_t encrypted_user_rsa2048_private_key[
  41. R_TSIP_RSA2048_ND_KEY_BYTE_SIZE + 16];
  42. /* wrapped client ECC P256 public key */
  43. uint8_t encrypted_user_ecc256_public_key[
  44. R_TSIP_ECC_PUBLIC_KEY_BYTE_SIZE + 16];
  45. /* wrapped client ECC P256 private key */
  46. uint8_t encrypted_user_ecc256_private_key[
  47. R_TSIP_ECC_PRIVATE_KEY_BYTE_SIZE + 16];
  48. } st_key_block_data_t;
  49. extern const uint32_t encrypted_user_key_type;
  50. extern const st_key_block_data_t g_key_block_data;
  51. extern const unsigned char ca_cert_der_sig[];
  52. extern const unsigned char ca_ecc_cert_der_sig[];
  53. extern const unsigned char client_cert_der_sign[];
  54. extern const int sizeof_ca_cert_der;
  55. #endif /* WOLFSSL_RENESAS_TSIP */
  56. #endif /* KEY_DATA_H_ */