Fabcoin Core  0.16.2
P2P Digital Currency
regtest.cpp
Go to the documentation of this file.
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 "chacha.h"
27 #include "vmac.h"
28 #include "tiger.h"
29 #include "md5.h"
30 #include "sosemanuk.h"
31 #include "arc4.h"
32 #include "ccm.h"
33 #include "gcm.h"
34 #include "eax.h"
35 #include "twofish.h"
36 #include "serpent.h"
37 #include "cast.h"
38 #include "rc6.h"
39 #include "mars.h"
40 #include "des.h"
41 #include "idea.h"
42 #include "rc5.h"
43 #include "tea.h"
44 #include "skipjack.h"
45 #include "cmac.h"
46 #include "dmac.h"
47 #include "blowfish.h"
48 #include "seed.h"
49 #include "wake.h"
50 #include "seal.h"
51 #include "crc.h"
52 #include "adler32.h"
53 #include "keccak.h"
54 #include "sha3.h"
55 #include "blake2.h"
56 #include "poly1305.h"
57 #include "hkdf.h"
58 #include "siphash.h"
59 
60 // Aggressive stack checking with VS2005 SP1 and above.
61 #if (CRYPTOPP_MSC_VERSION >= 1410)
62 # pragma strict_gs_check (on)
63 #endif
64 
65 #if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
66 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
67 #endif
68 
70 
72 {
73  static bool s_registered = false;
74  if (s_registered)
75  return;
76 
125  RegisterAsymmetricCipherDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
126  RegisterAsymmetricCipherDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
127  RegisterSignatureSchemeDefaultFactories<DSA>();
128  RegisterSignatureSchemeDefaultFactories<DSA2<SHA224> >();
129  RegisterSignatureSchemeDefaultFactories<DSA2<SHA256> >();
130  RegisterSignatureSchemeDefaultFactories<DSA2<SHA384> >();
131  RegisterSignatureSchemeDefaultFactories<DSA2<SHA512> >();
132  RegisterSignatureSchemeDefaultFactories<DSA_RFC6979<SHA1> >();
133  RegisterSignatureSchemeDefaultFactories<DSA_RFC6979<SHA224> >();
134  RegisterSignatureSchemeDefaultFactories<DSA_RFC6979<SHA256> >();
135  RegisterSignatureSchemeDefaultFactories<DSA_RFC6979<SHA384> >();
136  RegisterSignatureSchemeDefaultFactories<DSA_RFC6979<SHA512> >();
137  RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
138  RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
139  RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, Weak::MD2> >("RSA/PKCS1-1.5(MD2)");
140  RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
141  RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
142  RegisterSignatureSchemeDefaultFactories<RWSS<P1363_EMSA2, SHA1> >("RW/EMSA2(SHA-1)");
143  RegisterSignatureSchemeDefaultFactories<RSASS<PSS, SHA1> >("RSA/PSS-MGF1(SHA-1)");
144  RegisterSymmetricCipherDefaultFactories<SEAL<> >();
145  RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
146  RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
147  RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
148  RegisterSymmetricCipherDefaultFactories<ECB_Mode<XTEA> >();
149  RegisterSymmetricCipherDefaultFactories<PanamaCipher<LittleEndian> >();
150  RegisterSymmetricCipherDefaultFactories<PanamaCipher<BigEndian> >();
151  RegisterSymmetricCipherDefaultFactories<ECB_Mode<AES> >();
152  RegisterSymmetricCipherDefaultFactories<CBC_Mode<AES> >();
153  RegisterSymmetricCipherDefaultFactories<CFB_Mode<AES> >();
154  RegisterSymmetricCipherDefaultFactories<OFB_Mode<AES> >();
155  RegisterSymmetricCipherDefaultFactories<CTR_Mode<AES> >();
156  RegisterSymmetricCipherDefaultFactories<Salsa20>();
157  RegisterSymmetricCipherDefaultFactories<XSalsa20>();
158  RegisterSymmetricCipherDefaultFactories<ChaCha8>();
159  RegisterSymmetricCipherDefaultFactories<ChaCha12>();
160  RegisterSymmetricCipherDefaultFactories<ChaCha20>();
161  RegisterSymmetricCipherDefaultFactories<Sosemanuk>();
162  RegisterSymmetricCipherDefaultFactories<Weak::MARC4>();
163  RegisterSymmetricCipherDefaultFactories<WAKE_OFB<LittleEndian> >();
164  RegisterSymmetricCipherDefaultFactories<WAKE_OFB<BigEndian> >();
165  RegisterSymmetricCipherDefaultFactories<SEAL<LittleEndian> >();
166  RegisterAuthenticatedSymmetricCipherDefaultFactories<CCM<AES> >();
167  RegisterAuthenticatedSymmetricCipherDefaultFactories<GCM<AES> >();
168  RegisterAuthenticatedSymmetricCipherDefaultFactories<EAX<AES> >();
169  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Camellia> >();
170  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Twofish> >();
171  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Serpent> >();
172  RegisterSymmetricCipherDefaultFactories<CTR_Mode<CAST256> >();
173  RegisterSymmetricCipherDefaultFactories<CTR_Mode<RC6> >();
174  RegisterSymmetricCipherDefaultFactories<ECB_Mode<MARS> >();
175  RegisterSymmetricCipherDefaultFactories<CTR_Mode<MARS> >();
176  RegisterSymmetricCipherDefaultFactories<CTR_Mode<SHACAL2> >();
177  RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES> >();
178  RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES_XEX3> >();
179  RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES_EDE3> >();
180  RegisterSymmetricCipherDefaultFactories<CTR_Mode<IDEA> >();
181  RegisterSymmetricCipherDefaultFactories<CTR_Mode<RC5> >();
182  RegisterSymmetricCipherDefaultFactories<CTR_Mode<TEA> >();
183  RegisterSymmetricCipherDefaultFactories<CTR_Mode<XTEA> >();
184  RegisterSymmetricCipherDefaultFactories<CTR_Mode<CAST128> >();
185  RegisterSymmetricCipherDefaultFactories<CTR_Mode<SKIPJACK> >();
186  RegisterSymmetricCipherDefaultFactories<CTR_Mode<Blowfish> >();
187  RegisterSymmetricCipherDefaultFactories<ECB_Mode<SEED> >();
188  RegisterSymmetricCipherDefaultFactories<CTR_Mode<SEED> >();
193 
194  s_registered = true;
195 }
Classes for RIPEMD message digest.
Class file for modes of operation.
Classes for SipHash message authentication code.
Classes for HKDF from RFC 5869.
Classes for the RC5 block cipher.
Classes for Keccak message digests.
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 and CRC-32C checksum algorithm.
Classes for the RC6 block cipher.
Classes providing ESIGN signature schemes as defined in IEEE P1363a.
Classes for CMAC message authentication code.
Classes for the Twofish block cipher.
void RegisterFactories()
Definition: regtest.cpp:71
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 scheme.
Classes for the SKIPJACK block cipher.
Classes for Panama hash and stream cipher.
Classes for Diffie-Hellman key exchange.
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.
Classes and functions for registering and locating library objects.
Class file for ADLER-32 checksum calculations.
Object factory registry helper.
Definition: factory.h:114
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.
#define USING_NAMESPACE(x)
Definition: config.h:206
Classes for the RSA cryptosystem.
EAX block cipher mode of operation.
GCM block cipher mode of operation.
Classes for the Serpent block cipher.
Classes for Poly1305 message authentication code.
Classes for the TTMAC message authentication code.
Classes for probablistic signature schemes.
Classes for ARC4 cipher.
Classes for ChaCha8, ChaCha12 and ChaCha20 stream ciphers.
Classes for the IDEA block cipher.
CCM block cipher mode of operation.
Classes for the SHACAL-2 block cipher.