Fix LLVM compilation issues
[novacoin.git] / src / zerocoin / Zerocoin.h
1 /**
2 * @file       Zerocoin.h
3 *
4 * @brief      Exceptions and constants for Zerocoin
5 *
6 * @author     Ian Miers, Christina Garman and Matthew Green
7 * @date       June 2013
8 *
9 * @copyright  Copyright 2013 Ian Miers, Christina Garman and Matthew Green
10 * @license    This project is released under the MIT license.
11 **/
12
13 #ifndef ZEROCOIN_H_
14 #define ZEROCOIN_H_
15
16 #include <stdexcept>
17
18 #define ZEROCOIN_DEFAULT_SECURITYLEVEL      80
19 #define ZEROCOIN_MIN_SECURITY_LEVEL         80
20 #define ZEROCOIN_MAX_SECURITY_LEVEL         80
21 #define ACCPROOF_KPRIME                     160
22 #define ACCPROOF_KDPRIME                    128
23 #define MAX_COINMINT_ATTEMPTS               10000
24 #define ZEROCOIN_MINT_PRIME_PARAM           20
25 #define ZEROCOIN_VERSION_STRING             "0.11"
26 #define ZEROCOIN_VERSION_INT                11
27 #define ZEROCOIN_PROTOCOL_VERSION           "1"
28 #define HASH_OUTPUT_BITS                    256
29 #define ZEROCOIN_COMMITMENT_EQUALITY_PROOF  "COMMITMENT_EQUALITY_PROOF"
30 #define ZEROCOIN_ACCUMULATOR_PROOF          "ACCUMULATOR_PROOF"
31 #define ZEROCOIN_SERIALNUMBER_PROOF         "SERIALNUMBER_PROOF"
32
33 // Activate multithreaded mode for proof verification
34
35 //#define ZEROCOIN_THREADING 1
36
37 // Uses a fast technique for coin generation. Could be more vulnerable
38 // to timing attacks. Turn off if an attacker can measure coin minting time.
39 #define ZEROCOIN_FAST_MINT 1
40
41 // Errors thrown by the Zerocoin library
42
43 class ZerocoinException : public std::runtime_error
44 {
45 public:
46    explicit ZerocoinException(const std::string& str) : std::runtime_error(str) {}
47 };
48
49 #include "../serialize.h"
50 #include "../bignum.h"
51 #include "../hash.h"
52 #include "Params.h"
53 #include "Coin.h"
54 #include "Commitment.h"
55 #include "Accumulator.h"
56 #include "AccumulatorProofOfKnowledge.h"
57 #include "CoinSpend.h"
58 #include "SerialNumberSignatureOfKnowledge.h"
59 #include "ParamGeneration.h"
60
61 #endif /* ZEROCOIN_H_ */