1 /***************************************************************************//** 2 * \file cy_crypto_core_aes_v1.h 3 * \version 2.120 4 * 5 * \brief 6 * This file provides constant and parameters for the API for the AES method 7 * in the Crypto driver. 8 * 9 ******************************************************************************** 10 * \copyright 11 * Copyright (c) (2020-2022), Cypress Semiconductor Corporation (an Infineon company) or 12 * an affiliate of Cypress Semiconductor Corporation. 13 * SPDX-License-Identifier: Apache-2.0 14 * 15 * Licensed under the Apache License, Version 2.0 (the "License"); 16 * you may not use this file except in compliance with the License. 17 * You may obtain a copy of the License at 18 * 19 * http://www.apache.org/licenses/LICENSE-2.0 20 * 21 * Unless required by applicable law or agreed to in writing, software 22 * distributed under the License is distributed on an "AS IS" BASIS, 23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 * See the License for the specific language governing permissions and 25 * limitations under the License. 26 *******************************************************************************/ 27 28 29 #if !defined (CY_CRYPTO_CORE_AES_V1_H) 30 #define CY_CRYPTO_CORE_AES_V1_H 31 32 #include "cy_crypto_common.h" 33 34 #if defined(CY_IP_MXCRYPTO) && defined(CY_CRYPTO_CFG_HW_V1_ENABLE) 35 36 #if defined(__cplusplus) 37 extern "C" { 38 #endif 39 40 #if (CPUSS_CRYPTO_AES == 1) && defined(CY_CRYPTO_CFG_AES_C) 41 42 void Cy_Crypto_Core_V1_Aes_ProcessBlock(CRYPTO_Type *base, 43 cy_stc_crypto_aes_state_t const *aesState, 44 cy_en_crypto_dir_mode_t dirMode, 45 uint32_t *dstBlock, 46 uint32_t const *srcBlock); 47 48 void Cy_Crypto_Core_V1_Aes_Xor(CRYPTO_Type *base, 49 cy_stc_crypto_aes_state_t const *aesState, 50 uint32_t *dstBlock, 51 uint32_t const *src0Block, 52 uint32_t const *src1Block); 53 54 cy_en_crypto_status_t Cy_Crypto_Core_V1_Aes_Free(CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState); 55 56 cy_en_crypto_status_t Cy_Crypto_Core_V1_Aes_Init(CRYPTO_Type *base, 57 uint8_t const *key, 58 cy_en_crypto_aes_key_length_t keyLength, 59 cy_stc_crypto_aes_state_t *aesState, 60 cy_stc_crypto_aes_buffers_t *aesBuffers); 61 62 cy_en_crypto_status_t Cy_Crypto_Core_V1_Aes_Ecb(CRYPTO_Type *base, 63 cy_en_crypto_dir_mode_t dirMode, 64 uint8_t *dst, 65 uint8_t const *src, 66 cy_stc_crypto_aes_state_t *aesState); 67 68 #if defined(CY_CRYPTO_CFG_CIPHER_MODE_CBC) 69 cy_en_crypto_status_t Cy_Crypto_Core_V1_Aes_Cbc(CRYPTO_Type *base, 70 cy_en_crypto_dir_mode_t dirMode, 71 uint32_t srcSize, 72 uint8_t *ivPtr, 73 uint8_t *dst, 74 uint8_t const *src, 75 cy_stc_crypto_aes_state_t *aesState); 76 #endif /* defined(CY_CRYPTO_CFG_CIPHER_MODE_CBC) */ 77 78 #if defined(CY_CRYPTO_CFG_CIPHER_MODE_CFB) 79 cy_en_crypto_status_t Cy_Crypto_Core_V1_Aes_Cfb(CRYPTO_Type *base, 80 cy_en_crypto_dir_mode_t dirMode, 81 uint32_t srcSize, 82 uint8_t *ivPtr, 83 uint8_t *dst, 84 uint8_t const *src, 85 cy_stc_crypto_aes_state_t *aesState); 86 #endif /* defined(CY_CRYPTO_CFG_CIPHER_MODE_CFB) */ 87 88 #if defined(CY_CRYPTO_CFG_CIPHER_MODE_CTR) 89 cy_en_crypto_status_t Cy_Crypto_Core_V1_Aes_Ctr(CRYPTO_Type *base, 90 uint32_t srcSize, 91 uint32_t *srcOffset, 92 uint8_t *ivPtr, 93 uint8_t *streamBlock, 94 uint8_t *dst, 95 uint8_t const *src, 96 cy_stc_crypto_aes_state_t *aesState); 97 #endif /* defined(CY_CRYPTO_CFG_CIPHER_MODE_CTR) */ 98 99 100 #endif /* (CPUSS_CRYPTO_AES == 1) && defined(CY_CRYPTO_CFG_AES_C) */ 101 102 #if defined(__cplusplus) 103 } 104 #endif 105 106 #endif /* defined(CY_IP_MXCRYPTO) && defined(CY_CRYPTO_CFG_HW_V1_ENABLE) */ 107 108 #endif /* #if !defined (CY_CRYPTO_CORE_AES_V1_H) */ 109 110 111 /* [] END OF FILE */ 112