AnCH Framework  0.1
Another C++ Hack Framework
aes128.hpp
1 /*
2  ANCH Framework: ANother C++ Hack is a C++ framework based on C++11 standard
3  Copyright (C) 2012 Vincent Lachenal
4 
5  This file is part of ANCH Framework.
6 
7  ANCH Framework is free software: you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  ANCH Framework is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with ANCH Framework. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #include "crypto/cipher/aes.hpp"
21 
22 #include "crypto/cipher/ecb.hpp"
23 #include "crypto/cipher/cbc.hpp"
24 #include "crypto/cipher/pcbc.hpp"
25 #include "crypto/cipher/cfb.hpp"
26 #include "crypto/cipher/ofb.hpp"
27 #include "crypto/cipher/ctr.hpp"
28 
29 #include "crypto/padding/ansiX923.hpp"
30 #include "crypto/padding/iso7816_4Padding.hpp"
31 #include "crypto/padding/pkcs5Padding.hpp"
32 #include "crypto/padding/zeroPadding.hpp"
33 
34 namespace anch {
35  namespace crypto {
36 
37  extern template class BlockCipher<16>;
38  extern template class AES<4,10>;
42  using AES128 = AES<4,10>;
43 
48  extern template class ECB<AES128,ZeroPadding>;
49  extern template class BlockCipherModeOfOperation<ECB<AES128,ANSIX923>,AES128>;
50  extern template class ECB<AES128,ANSIX923>;
51  extern template class BlockCipherModeOfOperation<ECB<AES128,ISO7816_4Padding>,AES128>;
52  extern template class ECB<AES128,ISO7816_4Padding>;
53  extern template class BlockCipherModeOfOperation<ECB<AES128,PKCS5Padding>,AES128>;
54  extern template class ECB<AES128,PKCS5Padding>;
55 
56  extern template class BlockCipherModeOfOperation<CBC<AES128,ZeroPadding>,AES128>;
57  extern template class CBC<AES128,ZeroPadding>;
58  extern template class BlockCipherModeOfOperation<CBC<AES128,ANSIX923>,AES128>;
59  extern template class CBC<AES128,ANSIX923>;
60  extern template class BlockCipherModeOfOperation<CBC<AES128,ISO7816_4Padding>,AES128>;
61  extern template class CBC<AES128,ISO7816_4Padding>;
62  extern template class BlockCipherModeOfOperation<CBC<AES128,PKCS5Padding>,AES128>;
63  extern template class CBC<AES128,PKCS5Padding>;
64 
65  extern template class BlockCipherModeOfOperation<PCBC<AES128,ZeroPadding>,AES128>;
66  extern template class PCBC<AES128,ZeroPadding>;
67  extern template class BlockCipherModeOfOperation<PCBC<AES128,ANSIX923>,AES128>;
68  extern template class PCBC<AES128,ANSIX923>;
70  extern template class PCBC<AES128,ISO7816_4Padding>;
71  extern template class BlockCipherModeOfOperation<PCBC<AES128,PKCS5Padding>,AES128>;
72  extern template class PCBC<AES128,PKCS5Padding>;
73 
74  extern template class BlockCipherModeOfOperation<CFB<AES128>,AES128>;
75  extern template class CFB<AES128>;
76 
77  extern template class BlockCipherModeOfOperation<OFB<AES128>,AES128>;
78  extern template class OFB<AES128>;
79 
80  extern template class BlockCipherModeOfOperation<CTR<AES128>,AES128>;
81  extern template class CTR<AES128>;
82 
83  }
84 }
Cipher-block chaining implementation.
Definition: cbc.hpp:38
Cipher feedback implementation.
Definition: cfb.hpp:38
Propagating cipher-block chaining implementation.
Definition: pcbc.hpp:41
AnCH framework base namespace.
Definition: base64.hpp:28
Counter implementation.
Definition: ctr.hpp:38
Block cipher mode of operation interface.
Definition: bcModOp.hpp:49
AES block cipher algorithm implementation.
Definition: aes.hpp:52
Electronic codebook implementation.
Definition: ecb.hpp:39
Output feedback implementation.
Definition: ofb.hpp:38