Mistake on this page?
Report an issue in GitHub or email us
TARGET_Cypress/TARGET_MXCRYPTO/aes_alt.h
1 /*
2  * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
3  * Copyright (C) 2019 Cypress Semiconductor Corporation
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License"); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 /**
20  * \file aes_alt.h
21  * \ version 1.0
22  *
23  * \brief This file contains AES definitions and functions.
24  *
25  * The Advanced Encryption Standard (AES) specifies a FIPS-approved
26  * cryptographic algorithm that can be used to protect electronic
27  * data.
28  *
29  * The AES algorithm is a symmetric block cipher that can
30  * encrypt and decrypt information. For more information, see
31  * <em>FIPS Publication 197: Advanced Encryption Standard</em> and
32  * <em>ISO/IEC 18033-2:2006: Information technology -- Security
33  * techniques -- Encryption algorithms -- Part 2: Asymmetric
34  * ciphers</em>.
35  *
36  * The AES-XTS block mode is standardized by NIST SP 800-38E
37  * <https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38e.pdf>
38  * and described in detail by IEEE P1619
39  * <https://ieeexplore.ieee.org/servlet/opac?punumber=4375278>.
40  */
41 
42 #ifndef AES_ALT_H
43 #define AES_ALT_H
44 
45 #if defined(MBEDTLS_AES_ALT)
46 // Regular implementation
47 
48 #define CY_CIPHER_MODE_CBC_ALT
49 
50 #include <cy_crypto_common.h>
51 #include <cy_crypto_core_aes.h>
52 #include "cy_syslib.h"
53 
54 #include "crypto_common.h"
55 
56 /**
57  * \brief The AES context-type definition.
58  */
59 typedef struct mbedtls_aes_context
60 {
61  cy_hw_crypto_t obj;
62  cy_stc_crypto_aes_state_t aes_state;
63  cy_stc_crypto_aes_buffers_t aes_buffers;
64 }
65 mbedtls_aes_context;
66 
67 #if defined(MBEDTLS_CIPHER_MODE_XTS)
68 
69 /**
70  * \brief The AES XTS context-type definition.
71  */
72 typedef struct mbedtls_aes_xts_context
73 {
74  mbedtls_aes_context crypt; /*!< The AES context to use for AES block
75  encryption or decryption. */
76  mbedtls_aes_context tweak; /*!< The AES context used for tweak
77  computation. */
78 } mbedtls_aes_xts_context;
79 
80 #endif /* MBEDTLS_CIPHER_MODE_XTS */
81 
82 #endif /* MBEDTLS_AES_ALT */
83 
84 #endif /* aes_alt.h */
Header file for common mbedtls acceleration functions.
CRYPTO object.
Definition: crypto_common.h:43
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.