aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2016-11-17 23:27:00 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-04 21:54:16 +0000
commit46a0dcc1d2a31b41f5c75009d70476010f7fbacf (patch)
treeff11519c93267383ae6e879105852031379e81c1 /tests/unit_tests
parentringct: switch to Borromean signatures (diff)
downloadmonero-46a0dcc1d2a31b41f5c75009d70476010f7fbacf.tar.xz
ringct: luigi1111's changes to fix and speedup Borromean sigs
Diffstat (limited to '')
-rw-r--r--tests/unit_tests/ringct.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp
index 5ab77d4aa..f6409d1ae 100644
--- a/tests/unit_tests/ringct.cpp
+++ b/tests/unit_tests/ringct.cpp
@@ -57,19 +57,15 @@ TEST(ringct, Borromean)
xv[j] = skGen();
if ( (int)indi[j] == 0 ) {
- P1v[j] = scalarmultBase(xv[j]);
- P2v[j] = pkGen();
-
+ scalarmultBase(P1v[j], xv[j]);
} else {
-
- P2v[j] = scalarmultBase(xv[j]);
- P1v[j] = pkGen();
-
+ addKeys1(P1v[j], xv[j], H2[j]);
}
+ subKeys(P2v[j], P1v[j], H2[j]);
}
//#true one
- boro bb = genBorromean(xv, P1v, P2v, indi);
+ boroSig bb = genBorromean(xv, P1v, P2v, indi);
ASSERT_TRUE(verifyBorromean(bb, P1v, P2v));
//#false one