Electroneum
test_ringct_mlsag< inputs, ring_size, ver > Class Template Reference

#include <rct_mlsag.h>

Inheritance diagram for test_ringct_mlsag< inputs, ring_size, ver >:
Collaboration diagram for test_ringct_mlsag< inputs, ring_size, ver >:

Public Member Functions

bool init ()
 
bool test ()
 
- Public Member Functions inherited from single_tx_test_base
bool init ()
 

Static Public Attributes

static const size_t cols = ring_size
 
static const size_t rows = inputs
 
static const size_t loop_count = 100
 

Additional Inherited Members

- Protected Attributes inherited from single_tx_test_base
cryptonote::account_base m_bob
 
cryptonote::transaction m_tx
 
crypto::public_key m_tx_pub_key
 
std::vector< crypto::public_keym_additional_tx_pub_keys
 

Detailed Description

template<size_t inputs, size_t ring_size, bool ver>
class test_ringct_mlsag< inputs, ring_size, ver >

Definition at line 39 of file rct_mlsag.h.

Member Function Documentation

◆ init()

template<size_t inputs, size_t ring_size, bool ver>
bool test_ringct_mlsag< inputs, ring_size, ver >::init ( )
inline

Definition at line 46 of file rct_mlsag.h.

47  {
49  return false;
50 
51  rct::keyV xtmp = rct::skvGen(rows);
52  rct::keyM xm = rct::keyMInit(rows, cols);// = [[None]*N] #just used to generate test public keys
53  sk = rct::skvGen(rows);
54  P = rct::keyMInit(rows, cols);// = keyM[[None]*N] #stores the public keys;
55  ind = 2;
56  for (size_t j = 0 ; j < rows ; j++)
57  {
58  for (size_t i = 0 ; i < cols ; i++)
59  {
60  xm[i][j] = rct::skGen();
61  P[i][j] = rct::scalarmultBase(xm[i][j]);
62  }
63  }
64  for (size_t j = 0 ; j < rows ; j++)
65  {
66  sk[j] = xm[ind][j];
67  }
68  IIccss = MLSAG_Gen(rct::identity(), P, sk, NULL, NULL, ind, rows, hw::get_device("default"));
69 
70  return true;
71  }
keyV skvGen(size_t rows)
Definition: rctOps.cpp:266
static const size_t rows
Definition: rct_mlsag.h:43
keyM keyMInit(size_t rows, size_t cols)
Definition: rctOps.cpp:227
std::vector< key > keyV
Definition: rctTypes.h:88
device & get_device(const std::string &device_descriptor)
Definition: device.cpp:95
void skGen(key &sk)
Definition: rctOps.cpp:253
void scalarmultBase(key &aG, const key &a)
Definition: rctOps.cpp:350
std::vector< keyV > keyM
Definition: rctTypes.h:89
key identity()
Definition: rctOps.h:73
static const size_t cols
Definition: rct_mlsag.h:42
mgSig MLSAG_Gen(const key &message, const keyM &pk, const keyV &xx, const multisig_kLRki *kLRki, key *mscout, const unsigned int index, size_t dsRows, hw::device &hwdev)
Definition: rctSigs.cpp:174
Here is the call graph for this function:

◆ test()

template<size_t inputs, size_t ring_size, bool ver>
bool test_ringct_mlsag< inputs, ring_size, ver >::test ( )
inline

Definition at line 73 of file rct_mlsag.h.

74  {
75  if (ver)
76  MLSAG_Ver(rct::identity(), P, IIccss, rows);
77  else
78  MLSAG_Gen(rct::identity(), P, sk, NULL, NULL, ind, rows, hw::get_device("default"));
79  return true;
80  }
static const size_t rows
Definition: rct_mlsag.h:43
device & get_device(const std::string &device_descriptor)
Definition: device.cpp:95
bool MLSAG_Ver(const key &message, const keyM &pk, const mgSig &rv, size_t dsRows)
Definition: rctSigs.cpp:271
key identity()
Definition: rctOps.h:73
mgSig MLSAG_Gen(const key &message, const keyM &pk, const keyV &xx, const multisig_kLRki *kLRki, key *mscout, const unsigned int index, size_t dsRows, hw::device &hwdev)
Definition: rctSigs.cpp:174
Here is the call graph for this function:

Member Data Documentation

◆ cols

template<size_t inputs, size_t ring_size, bool ver>
const size_t test_ringct_mlsag< inputs, ring_size, ver >::cols = ring_size
static

Definition at line 42 of file rct_mlsag.h.

◆ loop_count

template<size_t inputs, size_t ring_size, bool ver>
const size_t test_ringct_mlsag< inputs, ring_size, ver >::loop_count = 100
static

Definition at line 44 of file rct_mlsag.h.

◆ rows

template<size_t inputs, size_t ring_size, bool ver>
const size_t test_ringct_mlsag< inputs, ring_size, ver >::rows = inputs
static

Definition at line 43 of file rct_mlsag.h.


The documentation for this class was generated from the following file: