Skip to content

Commit

Permalink
Merge pull request #195 from skalenetwork/bug/SKALE-3009-response-data
Browse files Browse the repository at this point in the history
SKALE-3009 extend tests
  • Loading branch information
olehnikolaiev authored Oct 27, 2020
2 parents 6d2d0c9 + 8f8d07b commit 4f38241
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions testw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,21 @@ TEST_CASE_METHOD(TestFixture, "AES_DKG test", "[aes-dkg]") {

REQUIRE( convertG2ToString(decrypted_share_G2) == shareG2 );

Json::Value verificationVectorMult = complaintResponse["verificationVectorMult"];

libff::alt_bn128_G2 verificationValue = libff::alt_bn128_G2::zero();
for (int i = 0; i < t; ++i) {
libff::alt_bn128_G2 value;
value.Z = libff::alt_bn128_Fq2::one();
value.X.c0 = libff::alt_bn128_Fq(verificationVectorMult[i][0].asCString());
value.X.c1 = libff::alt_bn128_Fq(verificationVectorMult[i][1].asCString());
value.Y.c0 = libff::alt_bn128_Fq(verificationVectorMult[i][2].asCString());
value.Y.c1 = libff::alt_bn128_Fq(verificationVectorMult[i][3].asCString());
verificationValue = verificationValue + value;
}
verificationValue.to_affine_coordinates();
REQUIRE( verificationValue == decrypted_share_G2 );

BLSSigShareSet sigShareSet(t, n);

string hash = SAMPLE_HASH;
Expand Down

0 comments on commit 4f38241

Please sign in to comment.