Skip to content

Commit

Permalink
tests: new ringct test for checking H2 values
Browse files Browse the repository at this point in the history
Ported from Shen's RingCT repo
  • Loading branch information
Shen Noether authored and moneromooo-monero committed Aug 28, 2016
1 parent 56f6549 commit 53cdf4d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit_tests/ringct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,17 @@ TEST(ringct, range_proofs_accept_very_long)
EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}

TEST(ringct, HPow2)
{
key G = scalarmultBase(d2h(1));

key H = hashToPointSimple(G);
for (int j = 0 ; j < ATOMS ; j++) {
ASSERT_TRUE(equalKeys(H, H2[j]));
addKeys(H, H, H);
}
}

static const xmr_amount test_amounts[]={0, 1, 2, 3, 4, 5, 10000, 10000000000000000000ull, 10203040506070809000ull, 123456789123456789};

TEST(ringct, ecdh_roundtrip)
Expand Down

0 comments on commit 53cdf4d

Please sign in to comment.