37 #undef ELECTRONEUM_DEFAULT_LOG_CATEGORY 38 #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "ringct" 49 for (j = 0; j < 32; j++) {
50 printf(
"%02x", (
unsigned char)
a.bytes[j]);
57 printf(
" ... %s ... ",
a ?
"true" :
"false");
61 void dp(
const char *
a,
int l) {
64 for (j = 0; j < l; j++) {
65 printf(
"%02x", (
unsigned char)
a[j]);
73 for (j = 0; j <
a.size(); j++) {
75 if (j <
a.size() - 1) {
85 for (j = 0; j <
a.size(); j++) {
87 if (j <
a.size() - 1) {
101 printf(
"x: %d\n", vali);
105 for (
int i = 0; i < 64; i++) {
106 printf(
"%d", amountb[i]);
112 void dp(
const char * st) {
124 amounth[i] = (
unsigned char)(val & 0xFF);
137 amounth[i] = (
unsigned char)(val & 0xFF);
148 amountb[i] = val & 1;
164 for (j = 7; j >= 0; j--) {
172 int val = 0, i = 0, j = 0;
173 for (j = 0; j < 8; j++) {
174 val = (
unsigned char)test.
bytes[j];
177 amountb2[i] = val & 1;
181 while (i < 8 * (j + 1)) {
191 for (j = 0; j < 8; j++) {
194 for (i = 7; i > -1; i--) {
195 byte = byte * 2 + amountb2[8 * j + i];
197 amountdh[j] = (
unsigned char)byte;
199 for (j = 8; j < 32; j++) {
200 amountdh[j] = (
unsigned char)(0x00);
208 for (j = 63; j >= 0; j--) {
255 static const size_t extra_bits = 4;
261 return proof.
V.size();
270 CHECK_AND_ASSERT_MES(n2 < std::numeric_limits<uint32_t>::max() - n, 0,
"Invalid number of bulletproofs");
282 static const size_t extra_bits = 4;
285 return 1 << (proof.
L.size() - 6);
294 CHECK_AND_ASSERT_MES(n2 < std::numeric_limits<uint32_t>::max() - n, 0,
"Invalid number of bulletproofs");
bool is_rct_borromean(int type)
etn_amount h2d(const key &test)
#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)
void sc_0(unsigned char *)
bool is_rct_simple(int type)
size_t n_bulletproof_max_amounts(const std::vector< Bulletproof > &proofs)
#define BULLETPROOF_MAX_OUTPUTS
void d2b(bits amountb, etn_amount val)
size_t n_bulletproof_amounts(const std::vector< Bulletproof > &proofs)
bool is_rct_bulletproof(int type)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
key d2h(const etn_amount in)
etn_amount b2d(bits amountb)
void b2h(key &amountdh, const bits amountb2)
void h2b(bits amountb2, const key &test)