se_key.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. ******************************************************************************
  3. * @file se_key.h
  4. * @author MCD Application Team
  5. * @brief This file contains definitions for Secure Engine KEY module
  6. * functionalities.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2017 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file in
  14. * the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef SE_KEY_H
  21. #define SE_KEY_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include <stdint.h>
  27. /** @addtogroup SE Secure Engine
  28. * @{
  29. */
  30. /** @addtogroup SE_KEY SE Key
  31. * @{
  32. */
  33. /** @addtogroup SE_KEY_Exported_Functions
  34. * @brief Functions SE_CoreBin can use to retrieve the keys.
  35. * These functions are implemented in se_key.s
  36. * @note Depending on the crypto scheme, @ref SE_ReadKey or @ref SE_ReadKey_Pub can be useless.
  37. * Nevertheless, we do not use compiler switches as the linker will remove the unused function(s).
  38. * @{
  39. */
  40. /**
  41. * @brief Function to retrieve the symmetric key.
  42. * One specific key per FW image.
  43. * @param pKey: pointer to an array of uint8_t with the appropriate size
  44. * @retval void
  45. */
  46. void SE_ReadKey_1(uint8_t *pKey);
  47. void SE_ReadKey_2(uint8_t *pKey);
  48. void SE_ReadKey_3(uint8_t *pKey);
  49. /**
  50. * @brief Function to retrieve the public asymmetric key.
  51. * @param pPubKey: pointer to an array of uint8_t with the appropriate size
  52. * @retval void
  53. */
  54. void SE_ReadKey_1_Pub(uint8_t *pPubKey);
  55. void SE_ReadKey_2_Pub(uint8_t *pPubKey);
  56. void SE_ReadKey_3_Pub(uint8_t *pPubKey);
  57. /**
  58. * @brief Function to retrieve the external token pairing keys.
  59. * @param pPairingKey: pointer to an array of uint8_t with the appropriate size (32 bytes)
  60. * @retval void
  61. */
  62. void SE_ReadKey_Pairing(uint8_t *pPairingKey);
  63. /**
  64. * @}
  65. */
  66. /**
  67. * @}
  68. */
  69. /**
  70. * @}
  71. */
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* SE_KEY_H */