]> Git Repo - VerusCoin.git/blame_incremental - src/snark/libsnark/algebra/scalar_multiplication/kc_multiexp.hpp
src/snark patches for windows build
[VerusCoin.git] / src / snark / libsnark / algebra / scalar_multiplication / kc_multiexp.hpp
... / ...
CommitLineData
1/** @file
2 *****************************************************************************
3 * @author This file is part of libsnark, developed by SCIPR Lab
4 * and contributors (see AUTHORS).
5 * @copyright MIT license (see LICENSE file)
6 *****************************************************************************/
7
8#ifndef KC_MULTIEXP_HPP_
9#define KC_MULTIEXP_HPP_
10
11/*
12 Split out from multiexp to prevent cyclical
13 dependencies. I.e. previously multiexp dependend on
14 knowledge_commitment, which dependend on sparse_vector, which
15 dependend on multiexp (to do accumulate).
16
17 Will probably go away in more general exp refactoring.
18*/
19
20#include "algebra/knowledge_commitment/knowledge_commitment.hpp"
21
22namespace libsnark {
23
24template<typename T1, typename T2, mp_size_t n>
25knowledge_commitment<T1,T2> opt_window_wnaf_exp(const knowledge_commitment<T1,T2> &base,
26 const bigint<n> &scalar, const size_t scalar_bits);
27
28template<typename T1, typename T2, typename FieldT>
29knowledge_commitment<T1, T2> kc_multi_exp_with_mixed_addition(const knowledge_commitment_vector<T1, T2> &vec,
30 const size_t min_idx,
31 const size_t max_idx,
32 typename std::vector<FieldT>::const_iterator scalar_start,
33 typename std::vector<FieldT>::const_iterator scalar_end,
34 const size_t chunks,
35 const bool use_multiexp=false);
36
37template<typename T1, typename T2>
38void kc_batch_to_special(std::vector<knowledge_commitment<T1, T2> > &vec);
39
40template<typename T1, typename T2, typename FieldT>
41knowledge_commitment_vector<T1, T2> kc_batch_exp(const size_t scalar_size,
42 const size_t T1_window,
43 const size_t T2_window,
44 const window_table<T1> &T1_table,
45 const window_table<T2> &T2_table,
46 const FieldT &T1_coeff,
47 const FieldT &T2_coeff,
48 const std::vector<FieldT> &v,
49 const size_t suggested_num_chunks);
50
51} // libsnark
52
53#include "algebra/scalar_multiplication/kc_multiexp.tcc"
54
55#endif // KC_MULTIEXP_HPP_
This page took 0.021166 seconds and 4 git commands to generate.