Merge pull request from knaccc/master

Renamed RuffCT to StringCT
This commit is contained in:
Brandon Goodell 2017-09-29 11:37:13 -06:00 committed by GitHub
commit 73745c09ea
56 changed files with 9 additions and 9 deletions

View file

@ -4,10 +4,10 @@ import how.monero.hodl.crypto.Curve25519Point;
import how.monero.hodl.crypto.Curve25519PointPair; import how.monero.hodl.crypto.Curve25519PointPair;
import how.monero.hodl.crypto.Scalar; import how.monero.hodl.crypto.Scalar;
public class BootleRuffingCursor extends Cursor { public class StringCTCursor extends Cursor {
public byte[] data; public byte[] data;
public BootleRuffingCursor(byte[] data) { public StringCTCursor(byte[] data) {
super(data); super(data);
} }

View file

@ -3,7 +3,7 @@ package how.monero.hodl.ringSignature;
import how.monero.hodl.crypto.Curve25519Point; import how.monero.hodl.crypto.Curve25519Point;
import how.monero.hodl.crypto.Curve25519PointPair; import how.monero.hodl.crypto.Curve25519PointPair;
import how.monero.hodl.crypto.Scalar; import how.monero.hodl.crypto.Scalar;
import how.monero.hodl.cursor.BootleRuffingCursor; import how.monero.hodl.cursor.StringCTCursor;
import how.monero.hodl.util.VarInt; import how.monero.hodl.util.VarInt;
import java.math.BigInteger; import java.math.BigInteger;
@ -111,7 +111,7 @@ public class StringCT {
return result; return result;
} }
public static SpendSignature fromBytes(byte[] a) { public static SpendSignature fromBytes(byte[] a) {
BootleRuffingCursor cursor = new BootleRuffingCursor(a); StringCTCursor cursor = new StringCTCursor(a);
int decompositionBase = (int) cursor.readVarInt(); int decompositionBase = (int) cursor.readVarInt();
int decompositionExponent = (int) cursor.readVarInt(); int decompositionExponent = (int) cursor.readVarInt();
return new SpendSignature(decompositionBase, decompositionExponent, return new SpendSignature(decompositionBase, decompositionExponent,

View file

@ -11,9 +11,9 @@ import java.util.Date;
import java.util.List; import java.util.List;
import static how.monero.hodl.ringSignature.StringCT.*; import static how.monero.hodl.ringSignature.StringCT.*;
import static test.how.monero.hodl.BootleRuffingSpendTest.createTestSpendParams; import static test.how.monero.hodl.StringCTSpendTest.createTestSpendParams;
public class BootleRuffingBenchmarks { public class StringCTBenchmarks {
public static void spendTest() throws IOException { public static void spendTest() throws IOException {
@ -112,7 +112,7 @@ public class BootleRuffingBenchmarks {
} }
} }
System.out.println(csv); System.out.println(csv);
Files.write(new File(System.getProperty("user.home"), "bootleruffing-benchmarks.csv").toPath(), csv.getBytes()); Files.write(new File(System.getProperty("user.home"), "stringCT-benchmarks.csv").toPath(), csv.getBytes());
} }

View file

@ -12,7 +12,7 @@ import java.util.Date;
import static how.monero.hodl.crypto.CryptoUtil.*; import static how.monero.hodl.crypto.CryptoUtil.*;
import static how.monero.hodl.ringSignature.StringCT.*; import static how.monero.hodl.ringSignature.StringCT.*;
public class BootleRuffingSpendTest { public class StringCTSpendTest {
public static SpendParams createTestSpendParams(int decompositionBase, int decompositionExponent, int inputs) { public static SpendParams createTestSpendParams(int decompositionBase, int decompositionExponent, int inputs) {
@ -138,7 +138,7 @@ public class BootleRuffingSpendTest {
Curve25519Point.scalarBaseMults = 0; Curve25519Point.scalarBaseMults = 0;
//Ed25519GroupElement.enableLineRecording = true; //Ed25519GroupElement.enableLineRecording = true;
Curve25519Point.lineRecordingSourceFile = "BootleRuffing.java"; Curve25519Point.lineRecordingSourceFile = "StringCT.java";
// verify the spend transaction // verify the spend transaction
for (int i=0; i<testIterations; i++) { for (int i=0; i<testIterations; i++) {