summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/aes/aes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/aes/aes.h')
-rw-r--r--src/lib/libcrypto/aes/aes.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/lib/libcrypto/aes/aes.h b/src/lib/libcrypto/aes/aes.h
index baf0222d49..8a3ea0b883 100644
--- a/src/lib/libcrypto/aes/aes.h
+++ b/src/lib/libcrypto/aes/aes.h
@@ -52,7 +52,7 @@
52#ifndef HEADER_AES_H 52#ifndef HEADER_AES_H
53#define HEADER_AES_H 53#define HEADER_AES_H
54 54
55#include <openssl/opensslconf.h> 55#include <openssl/e_os2.h>
56 56
57#ifdef OPENSSL_NO_AES 57#ifdef OPENSSL_NO_AES
58#error AES is disabled. 58#error AES is disabled.
@@ -66,17 +66,17 @@
66#define AES_MAXNR 14 66#define AES_MAXNR 14
67#define AES_BLOCK_SIZE 16 67#define AES_BLOCK_SIZE 16
68 68
69#if defined(OPENSSL_FIPS)
70#define FIPS_AES_SIZE_T int
71#endif
72
69#ifdef __cplusplus 73#ifdef __cplusplus
70extern "C" { 74extern "C" {
71#endif 75#endif
72 76
73/* This should be a hidden type, but EVP requires that the size be known */ 77/* This should be a hidden type, but EVP requires that the size be known */
74struct aes_key_st { 78struct aes_key_st {
75#ifdef AES_LONG
76 unsigned long rd_key[4 *(AES_MAXNR + 1)]; 79 unsigned long rd_key[4 *(AES_MAXNR + 1)];
77#else
78 unsigned int rd_key[4 *(AES_MAXNR + 1)];
79#endif
80 int rounds; 80 int rounds;
81}; 81};
82typedef struct aes_key_st AES_KEY; 82typedef struct aes_key_st AES_KEY;
@@ -119,23 +119,6 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
119 unsigned char ecount_buf[AES_BLOCK_SIZE], 119 unsigned char ecount_buf[AES_BLOCK_SIZE],
120 unsigned int *num); 120 unsigned int *num);
121 121
122/* For IGE, see also http://www.links.org/files/openssl-ige.pdf */
123/* NB: the IV is _two_ blocks long */
124void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
125 const unsigned long length, const AES_KEY *key,
126 unsigned char *ivec, const int enc);
127/* NB: the IV is _four_ blocks long */
128void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
129 const unsigned long length, const AES_KEY *key,
130 const AES_KEY *key2, const unsigned char *ivec,
131 const int enc);
132
133int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
134 unsigned char *out,
135 const unsigned char *in, unsigned int inlen);
136int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
137 unsigned char *out,
138 const unsigned char *in, unsigned int inlen);
139 122
140#ifdef __cplusplus 123#ifdef __cplusplus
141} 124}