Crypto++  5.6.3
Free C++ class library of cryptographic schemes
regtest.cpp
1 // regtest.cpp - written and placed in the public domain by Wei Dai
2 
3 #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
4 
5 #include "cryptlib.h"
6 #include "factory.h"
7 #include "modes.h"
8 #include "dh.h"
9 #include "esign.h"
10 #include "md2.h"
11 #include "rw.h"
12 #include "md5.h"
13 #include "rsa.h"
14 #include "ripemd.h"
15 #include "dsa.h"
16 #include "seal.h"
17 #include "whrlpool.h"
18 #include "ttmac.h"
19 #include "camellia.h"
20 #include "shacal2.h"
21 #include "tea.h"
22 #include "panama.h"
23 #include "pssr.h"
24 #include "aes.h"
25 #include "salsa.h"
26 #include "vmac.h"
27 #include "tiger.h"
28 #include "md5.h"
29 #include "sosemanuk.h"
30 #include "arc4.h"
31 #include "ccm.h"
32 #include "gcm.h"
33 #include "eax.h"
34 #include "twofish.h"
35 #include "serpent.h"
36 #include "cast.h"
37 #include "rc6.h"
38 #include "mars.h"
39 #include "des.h"
40 #include "idea.h"
41 #include "rc5.h"
42 #include "tea.h"
43 #include "skipjack.h"
44 #include "cmac.h"
45 #include "dmac.h"
46 #include "blowfish.h"
47 #include "seed.h"
48 #include "wake.h"
49 #include "seal.h"
50 #include "crc.h"
51 #include "adler32.h"
52 #include "sha3.h"
53 #include "hkdf.h"
54 
55 // Aggressive stack checking with VS2005 SP1 and above.
56 #if (CRYPTOPP_MSC_VERSION >= 1410)
57 # pragma strict_gs_check (on)
58 #endif
59 
60 USING_NAMESPACE(CryptoPP)
61 
62 void RegisterFactories()
63 {
64  static bool s_registered = false;
65  if (s_registered)
66  return;
67 
104  RegisterAsymmetricCipherDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
105  RegisterAsymmetricCipherDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
106  RegisterSignatureSchemeDefaultFactories<DSA>();
107  RegisterSignatureSchemeDefaultFactories<DSA2<SHA224> >();
108  RegisterSignatureSchemeDefaultFactories<DSA2<SHA256> >();
109  RegisterSignatureSchemeDefaultFactories<DSA2<SHA384> >();
110  RegisterSignatureSchemeDefaultFactories<DSA2<SHA512> >();
111  RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
112  RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
113  RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, Weak::MD2> >("RSA/PKCS1-1.5(MD2)");
114  RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
115  RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
116  RegisterSignatureSchemeDefaultFactories<RWSS<P1363_EMSA2, SHA1> >("RW/EMSA2(SHA-1)");
117  RegisterSignatureSchemeDefaultFactories<RSASS<PSS, SHA1> >("RSA/PSS-MGF1(SHA-1)");
118  RegisterSymmetricCipherDefaultFactories<SEAL<> >();
119  RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
120  RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
121  RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
122  RegisterSymmetricCipherDefaultFactories<ECB_Mode<XTEA> >();
123  RegisterSymmetricCipherDefaultFactories<PanamaCipher<LittleEndian> >();
124  RegisterSymmetricCipherDefaultFactories<PanamaCipher<BigEndian> >();
125  RegisterSymmetricCipherDefaultFactories<ECB_Mode<AES> >();
126  RegisterSymmetricCipherDefaultFactories<CBC_Mode<AES> >();
127  RegisterSymmetricCipherDefaultFactories<CFB_Mode<AES> >();
128  RegisterSymmetricCipherDefaultFactories<OFB_Mode<AES> >();
129  RegisterSymmetricCipherDefaultFactories<CTR_Mode<AES> >();
130  RegisterSymmetricCipherDefaultFactories<Salsa20>();
131  RegisterSymmetricCipherDefaultFactories<XSalsa20>();
132  RegisterSymmetricCipherDefaultFactories<Sosemanuk>();
133  RegisterSymmetricCipherDefaultFactories<Weak::MARC4>();
134  RegisterSymmetricCipherDefaultFactories<WAKE_OFB<LittleEndian> >();
135  RegisterSymmetricCipherDefaultFactories<WAKE_OFB<BigEndian> >();
136  RegisterSymmetricCipherDefaultFactories<SEAL<LittleEndian> >();
137  RegisterAuthenticatedSymmetricCipherDefaultFactories<CCM<AES> >();
138  RegisterAuthenticatedSymmetricCipherDefaultFactories<GCM<AES> >();
139  RegisterAuthenticatedSymmetricCipherDefaultFactories<EAX<AES> >();
140  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Camellia> >();
141  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Twofish> >();
142  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Serpent> >();
143  RegisterSymmetricCipherDefaultFactories<CTR_Mode<CAST256> >();
144  RegisterSymmetricCipherDefaultFactories<CTR_Mode<RC6> >();
145  RegisterSymmetricCipherDefaultFactories<ECB_Mode<MARS> >();
146  RegisterSymmetricCipherDefaultFactories<CTR_Mode<MARS> >();
147  RegisterSymmetricCipherDefaultFactories<CTR_Mode<SHACAL2> >();
148  RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES> >();
149  RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES_XEX3> >();
150  RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES_EDE3> >();
151  RegisterSymmetricCipherDefaultFactories<CTR_Mode<IDEA> >();
152  RegisterSymmetricCipherDefaultFactories<CTR_Mode<RC5> >();
153  RegisterSymmetricCipherDefaultFactories<CTR_Mode<TEA> >();
154  RegisterSymmetricCipherDefaultFactories<CTR_Mode<XTEA> >();
155  RegisterSymmetricCipherDefaultFactories<CTR_Mode<CAST128> >();
156  RegisterSymmetricCipherDefaultFactories<CTR_Mode<SKIPJACK> >();
157  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Blowfish> >();
158  RegisterSymmetricCipherDefaultFactories<ECB_Mode<SEED> >();
159  RegisterSymmetricCipherDefaultFactories<CTR_Mode<SEED> >();
164 
165  s_registered = true;
166 }
Classes for RIPEMD message digest.
Class file for modes of operation.
Classes for the RC5 block cipher.
Abstract base classes that provide a uniform interface to this library.
Classes for the SEED block cipher.
Classes for the Cameliia block cipher.
Classes for Sosemanuk stream cipher.
Classes for CRC-32 checksum algorithm.
Classes for the RC6 block cipher.
This file contains classes that implement the ESIGN signature schemes as defined in IEEE P1363a...
Classes for CMAC message authentication code.
Classes for the Twofish block cipher.
Classes for the Blowfish block cipher.
Classes for the VMAC message authentication code.
Classes for the MARS block cipher (IBM AES submission)
Classes for Rabin-Williams signature schemes.
Classes for the SKIPJACK block cipher.
Classes for Panama stream cipher.
Classes for Diffie-Hellman key exchange.
Classes for SHA-3 message digests.
Class file for the AES cipher (Rijndael)
Classes for the CAST-128 and CAST-256 block ciphers.
Classes for the TEA, BTEA and XTEA block ciphers.
Classes for DMAC message authentication code.
Classes for the DSA signature algorithm.
Class file for ADLER-32 checksum calculations.
Classes for SEAL stream cipher.
Classes for WAKE stream cipher.
Classes for DES, 2-key Triple-DES, 3-key Triple-DES and DESX.
Classes for Salsa and Salsa20 stream ciphers.
Classes for the RSA cryptosystem.
EAX block cipher mode of operation.
GCM block cipher mode of operation.
Classes for the Serpent block cipher.
Crypto++ library namespace.
Classes for probablistic signature schemes.
Classes for ARC4 cipher.
Classes for the IDEA block cipher.
CCM block cipher mode of operation.
Classes for the SHACAL-2 block cipher.