• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * \file aes.h
3  *
4  * \brief   This file contains AES definitions and functions.
5  *
6  *          The Advanced Encryption Standard (AES) specifies a FIPS-approved
7  *          cryptographic algorithm that can be used to protect electronic
8  *          data.
9  *
10  *          The AES algorithm is a symmetric block cipher that can
11  *          encrypt and decrypt information. For more information, see
12  *          <em>FIPS Publication 197: Advanced Encryption Standard</em> and
13  *          <em>ISO/IEC 18033-2:2006: Information technology -- Security
14  *          techniques -- Encryption algorithms -- Part 2: Asymmetric
15  *          ciphers</em>.
16  *
17  *          The AES-XTS block mode is standardized by NIST SP 800-38E
18  *          <https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38e.pdf>
19  *          and described in detail by IEEE P1619
20  *          <https://ieeexplore.ieee.org/servlet/opac?punumber=4375278>.
21  */
22 
23 /*  Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
24  *  SPDX-License-Identifier: Apache-2.0
25  *
26  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
27  *  not use this file except in compliance with the License.
28  *  You may obtain a copy of the License at
29  *
30  *  http://www.apache.org/licenses/LICENSE-2.0
31  *
32  *  Unless required by applicable law or agreed to in writing, software
33  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
34  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35  *  See the License for the specific language governing permissions and
36  *  limitations under the License.
37  *
38  *  This file is part of Mbed TLS (https://tls.mbed.org)
39  */
40 
41 #ifndef MBEDTLS_AES_ALT_H
42 #define MBEDTLS_AES_ALT_H
43 #include "hi_cipher.h"
44 #include "securec.h"
45 /**
46  * \brief The AES context-type definition.
47  */
48 #define mbedtls_aes_context hi_cipher_aes_ctrl
49 
50 #if defined(MBEDTLS_CIPHER_MODE_XTS)
51 typedef struct mbedtls_aes_xts_context
52 {
53     mbedtls_aes_context crypt; /*!< The AES context to use for AES block
54                                         encryption or decryption. */
55     mbedtls_aes_context tweak; /*!< The AES context used for tweak
56                                         computation. */
57 } mbedtls_aes_xts_context;
58 
59 #endif /* MBEDTLS_CIPHER_MODE_XTS */
60 
61 #endif /* aes_alt.h */
62