mbed TLS v2.7.16
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
mbedtls
padlock.h
Go to the documentation of this file.
1
7
/*
8
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
9
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10
*
11
* This file is provided under the Apache License 2.0, or the
12
* GNU General Public License v2.0 or later.
13
*
14
* **********
15
* Apache License 2.0:
16
*
17
* Licensed under the Apache License, Version 2.0 (the "License"); you may
18
* not use this file except in compliance with the License.
19
* You may obtain a copy of the License at
20
*
21
* http://www.apache.org/licenses/LICENSE-2.0
22
*
23
* Unless required by applicable law or agreed to in writing, software
24
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
25
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26
* See the License for the specific language governing permissions and
27
* limitations under the License.
28
*
29
* **********
30
*
31
* **********
32
* GNU General Public License v2.0 or later:
33
*
34
* This program is free software; you can redistribute it and/or modify
35
* it under the terms of the GNU General Public License as published by
36
* the Free Software Foundation; either version 2 of the License, or
37
* (at your option) any later version.
38
*
39
* This program is distributed in the hope that it will be useful,
40
* but WITHOUT ANY WARRANTY; without even the implied warranty of
41
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42
* GNU General Public License for more details.
43
*
44
* You should have received a copy of the GNU General Public License along
45
* with this program; if not, write to the Free Software Foundation, Inc.,
46
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
47
*
48
* **********
49
*
50
* This file is part of mbed TLS (https://tls.mbed.org)
51
*/
52
#ifndef MBEDTLS_PADLOCK_H
53
#define MBEDTLS_PADLOCK_H
54
55
#if !defined(MBEDTLS_CONFIG_FILE)
56
#include "
config.h
"
57
#else
58
#include MBEDTLS_CONFIG_FILE
59
#endif
60
61
#include "
aes.h
"
62
63
#define MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED -0x0030
65
#if defined(__has_feature)
66
#if __has_feature(address_sanitizer)
67
#define MBEDTLS_HAVE_ASAN
68
#endif
69
#endif
70
71
/* Some versions of ASan result in errors about not enough registers */
72
#if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && defined(__i386__) && \
73
!defined(MBEDTLS_HAVE_ASAN)
74
75
#ifndef MBEDTLS_HAVE_X86
76
#define MBEDTLS_HAVE_X86
77
#endif
78
79
#include <stdint.h>
80
81
#define MBEDTLS_PADLOCK_RNG 0x000C
82
#define MBEDTLS_PADLOCK_ACE 0x00C0
83
#define MBEDTLS_PADLOCK_PHE 0x0C00
84
#define MBEDTLS_PADLOCK_PMM 0x3000
85
86
#define MBEDTLS_PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
87
88
#ifdef __cplusplus
89
extern
"C"
{
90
#endif
91
99
int
mbedtls_padlock_has_support(
int
feature );
100
111
int
mbedtls_padlock_xcryptecb(
mbedtls_aes_context
*ctx,
112
int
mode,
113
const
unsigned
char
input[16],
114
unsigned
char
output[16] );
115
128
int
mbedtls_padlock_xcryptcbc(
mbedtls_aes_context
*ctx,
129
int
mode,
130
size_t
length,
131
unsigned
char
iv[16],
132
const
unsigned
char
*input,
133
unsigned
char
*output );
134
135
#ifdef __cplusplus
136
}
137
#endif
138
139
#endif
/* HAVE_X86 */
140
141
#endif
/* padlock.h */
config.h
Configuration options (set of defines)
aes.h
The Advanced Encryption Standard (AES) specifies a FIPS-approved cryptographic algorithm that can be ...
mbedtls_aes_context
The AES context-type definition.
Definition:
aes.h:101
Generated on Tue Jul 14 2020 09:41:28 for mbed TLS v2.7.16 by
1.8.5