blob: fcd226f52028aab1fdeca2bc87e8b2f1db18ac0f [file] [log] [blame]
Paul Bakker8123e9d2011-01-06 15:37:30 +00001/**
2 * \file cipher_wrap.h
3 *
4 * \brief Cipher wrappers.
5 *
6 * \author Adriaan de Jong <dejong@fox-it.com>
7 *
Paul Bakker68884e32013-01-07 18:20:04 +01008 * Copyright (C) 2006-2013, Brainspark B.V.
Paul Bakker8123e9d2011-01-06 15:37:30 +00009 *
10 * This file is part of PolarSSL (http://www.polarssl.org)
11 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
12 *
13 * All rights reserved.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 */
Paul Bakkercce9d772011-11-18 14:26:47 +000029#ifndef POLARSSL_CIPHER_WRAP_H
30#define POLARSSL_CIPHER_WRAP_H
Paul Bakker8123e9d2011-01-06 15:37:30 +000031
Paul Bakker314052f2011-08-15 09:07:52 +000032#include "config.h"
33#include "cipher.h"
Paul Bakker8123e9d2011-01-06 15:37:30 +000034
Paul Bakker8123e9d2011-01-06 15:37:30 +000035#ifdef __cplusplus
36extern "C" {
37#endif
38
39#if defined(POLARSSL_AES_C)
40
Paul Bakker5e0efa72013-09-08 23:04:04 +020041extern const cipher_info_t aes_128_ecb_info;
42extern const cipher_info_t aes_192_ecb_info;
43extern const cipher_info_t aes_256_ecb_info;
44
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +020045#if defined(POLARSSL_CIPHER_MODE_CBC)
Paul Bakker8123e9d2011-01-06 15:37:30 +000046extern const cipher_info_t aes_128_cbc_info;
47extern const cipher_info_t aes_192_cbc_info;
48extern const cipher_info_t aes_256_cbc_info;
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +020049#endif /* POLARSSL_CIPHER_MODE_CBC */
Paul Bakker8123e9d2011-01-06 15:37:30 +000050
Paul Bakker343a8702011-06-09 14:27:58 +000051#if defined(POLARSSL_CIPHER_MODE_CFB)
52extern const cipher_info_t aes_128_cfb128_info;
53extern const cipher_info_t aes_192_cfb128_info;
54extern const cipher_info_t aes_256_cfb128_info;
55#endif /* POLARSSL_CIPHER_MODE_CFB */
56
57#if defined(POLARSSL_CIPHER_MODE_CTR)
58extern const cipher_info_t aes_128_ctr_info;
59extern const cipher_info_t aes_192_ctr_info;
60extern const cipher_info_t aes_256_ctr_info;
61#endif /* POLARSSL_CIPHER_MODE_CTR */
62
Paul Bakker68884e32013-01-07 18:20:04 +010063#if defined(POLARSSL_GCM_C)
64extern const cipher_info_t aes_128_gcm_info;
Manuel Pégourié-Gonnard83f3fc02013-09-04 12:07:24 +020065extern const cipher_info_t aes_192_gcm_info;
Paul Bakker68884e32013-01-07 18:20:04 +010066extern const cipher_info_t aes_256_gcm_info;
67#endif /* POLARSSL_GCM_C */
68
Paul Bakker8123e9d2011-01-06 15:37:30 +000069#endif /* defined(POLARSSL_AES_C) */
70
71#if defined(POLARSSL_CAMELLIA_C)
72
Paul Bakker5e0efa72013-09-08 23:04:04 +020073extern const cipher_info_t camellia_128_ecb_info;
74extern const cipher_info_t camellia_192_ecb_info;
75extern const cipher_info_t camellia_256_ecb_info;
76
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +020077#if defined(POLARSSL_CIPHER_MODE_CBC)
Paul Bakker8123e9d2011-01-06 15:37:30 +000078extern const cipher_info_t camellia_128_cbc_info;
79extern const cipher_info_t camellia_192_cbc_info;
80extern const cipher_info_t camellia_256_cbc_info;
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +020081#endif /* POLARSSL_CIPHER_MODE_CBC */
Paul Bakker8123e9d2011-01-06 15:37:30 +000082
Paul Bakker343a8702011-06-09 14:27:58 +000083#if defined(POLARSSL_CIPHER_MODE_CFB)
84extern const cipher_info_t camellia_128_cfb128_info;
85extern const cipher_info_t camellia_192_cfb128_info;
86extern const cipher_info_t camellia_256_cfb128_info;
87#endif /* POLARSSL_CIPHER_MODE_CFB */
88
89#if defined(POLARSSL_CIPHER_MODE_CTR)
90extern const cipher_info_t camellia_128_ctr_info;
91extern const cipher_info_t camellia_192_ctr_info;
92extern const cipher_info_t camellia_256_ctr_info;
93#endif /* POLARSSL_CIPHER_MODE_CTR */
94
Paul Bakker8123e9d2011-01-06 15:37:30 +000095#endif /* defined(POLARSSL_CAMELLIA_C) */
96
97#if defined(POLARSSL_DES_C)
98
Paul Bakker5e0efa72013-09-08 23:04:04 +020099extern const cipher_info_t des_ecb_info;
100extern const cipher_info_t des_ede_ecb_info;
101extern const cipher_info_t des_ede3_ecb_info;
102
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +0200103#if defined(POLARSSL_CIPHER_MODE_CBC)
Paul Bakker8123e9d2011-01-06 15:37:30 +0000104extern const cipher_info_t des_cbc_info;
105extern const cipher_info_t des_ede_cbc_info;
106extern const cipher_info_t des_ede3_cbc_info;
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +0200107#endif /* POLARSSL_CIPHER_MODE_CBC */
Paul Bakker8123e9d2011-01-06 15:37:30 +0000108
109#endif /* defined(POLARSSL_DES_C) */
110
Paul Bakker6132d0a2012-07-04 17:10:40 +0000111#if defined(POLARSSL_BLOWFISH_C)
Paul Bakker5e0efa72013-09-08 23:04:04 +0200112extern const cipher_info_t blowfish_ecb_info;
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +0200113#if defined(POLARSSL_CIPHER_MODE_CBC)
Paul Bakker6132d0a2012-07-04 17:10:40 +0000114extern const cipher_info_t blowfish_cbc_info;
Manuel Pégourié-Gonnard989ed382013-09-13 14:41:45 +0200115#endif /* POLARSSL_CIPHER_MODE_CBC */
Paul Bakker6132d0a2012-07-04 17:10:40 +0000116
117#if defined(POLARSSL_CIPHER_MODE_CFB)
118extern const cipher_info_t blowfish_cfb64_info;
119#endif /* POLARSSL_CIPHER_MODE_CFB */
120
121#if defined(POLARSSL_CIPHER_MODE_CTR)
122extern const cipher_info_t blowfish_ctr_info;
123#endif /* POLARSSL_CIPHER_MODE_CTR */
124#endif /* defined(POLARSSL_BLOWFISH_C) */
125
Paul Bakker68884e32013-01-07 18:20:04 +0100126#if defined(POLARSSL_ARC4_C)
127extern const cipher_info_t arc4_128_info;
128#endif /* defined(POLARSSL_ARC4_C) */
129
Paul Bakkerfab5c822012-02-06 16:45:10 +0000130#if defined(POLARSSL_CIPHER_NULL_CIPHER)
131extern const cipher_info_t null_cipher_info;
132#endif /* defined(POLARSSL_CIPHER_NULL_CIPHER) */
133
Paul Bakker8123e9d2011-01-06 15:37:30 +0000134#ifdef __cplusplus
135}
136#endif
137
138#endif /* POLARSSL_CIPHER_WRAP_H */