1 /* 2 * Copyright (c) 2021-2023, The TrustedFirmware-M Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef CC3XX_ENGINE_STATE_H 9 #define CC3XX_ENGINE_STATE_H 10 11 #include "cc3xx_error.h" 12 13 #include <stdbool.h> 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 enum cc3xx_engine_t { 20 CC3XX_ENGINE_NONE = 0b00000u, 21 CC3XX_ENGINE_AES = 0b00001U, 22 CC3XX_ENGINE_AES_TO_HASH = 0b00010U, 23 CC3XX_ENGINE_AES_AND_HASH = 0b00011U, 24 CC3XX_ENGINE_HASH = 0b00111U, 25 CC3XX_ENGINE_AES_MAC_AND_BYPASS = 0b01001U, 26 CC3XX_ENGINE_AES_TO_HASH_AND_DOUT = 0b01010U, 27 CC3XX_ENGINE_CHACHA = 0b10000U, 28 }; 29 30 extern enum cc3xx_engine_t cc3xx_engine_in_use; 31 32 /** 33 * @brief Sets the engine being currently used 34 * 35 * @param engine Value of type \ref enum cc3xx_engine_t to be set 36 */ 37 void cc3xx_lowlevel_set_engine(enum cc3xx_engine_t engine); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* CC3XX_ENGINE_STATE_H */ 44