Skip to content

Commit d752fd8

Browse files
committed
rename to i_UV
1 parent 103969c commit d752fd8

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

72 Bytes
Binary file not shown.

src/java/p4p/user/UserVector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ public UserVector(long[] data_UV_P, long F, int log_2_m_UV_P) {
9898
long singaporeModF;
9999
// Convert the numbers into the finite field:
100100
if (data_UV_P != null) {
101-
for (int i_UV = 0; i_UV < dimension; i_UV++) {
102-
singaporeModF = Util.mod(data_UV_P[i_UV], F);
103-
this.data_UV[i_UV] = singaporeModF;
101+
for (int i_dim_UV = 0; i_dim_UV < dimension; i_dim_UV++) {
102+
singaporeModF = Util.mod(data_UV_P[i_dim_UV], F);
103+
this.data_UV[i_dim_UV] = singaporeModF;
104104
}
105105
// The range should be [-F/2, F/2)
106106
}

src/java/p4p/user/UserVector2.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ public class UserVector2 extends UserVector {
9090
* Constructs a (share of) user vector.
9191
*
9292
* @param data the user vector
93-
* @param F the size of the field where all user computations are
93+
* @param F_UV the size of the field where all user computations are
9494
* performed
9595
* @param l the max allowed number of bits of the L2 norm of user
9696
* vector
9797
* @param g the first generator used in commitment
9898
* @param h the sceond generator used in commitment
9999
*
100100
*/
101-
public UserVector2(long[] data, long F, int l, NativeBigInteger g,
101+
public UserVector2(long[] data, long F_UV, int l, NativeBigInteger g,
102102
NativeBigInteger h) {
103-
super(data, F, l);
103+
super(data, F_UV, l);
104104
this.g_UV2 = g;
105105
this.h_UV2 = h;
106106
//sc = new SquareCommitment(g, h);
@@ -690,11 +690,11 @@ public boolean serverVerify(L2NormBoundProof2 l2Proof, BigInteger[] Y) {
690690

691691
// Check the checksums and their commitments:
692692
Commitment cm = new Commitment(g_UV2, h_UV2);
693-
ThreeWayCommitment tc = new ThreeWayCommitment(g_UV2, h_UV2, F);
693+
ThreeWayCommitment tc = new ThreeWayCommitment(g_UV2, h_UV2, F_UV);
694694
for(int i = 0; i < x.length; i++) {
695695
// First make sure the checksums are computed correctly:
696696
//if(s[i] != Math.abs(Util.innerProduct(c[i], data))) {
697-
if(x[i] != Util.mod(Util.innerProduct(checkCoVector[i], serverUserVector_UV2), F)) {
697+
if(x[i] != Util.mod(Util.innerProduct(checkCoVector[i], serverUserVector_UV2), F_UV)) {
698698
// We are doing server
699699
System.out.println("Checksum " + i
700700
+ " not computed correctly!");
@@ -904,7 +904,7 @@ else if(arg.equals("-bench")) {
904904
F = BigInteger.probablePrime(62, rand).longValue();
905905

906906
System.out.println("l = " + l + ", L = " + L);
907-
System.out.println("F = " + F);
907+
System.out.println("F = " + F_UV);
908908
System.out.println("zkpIterations = " + zkpIterations);
909909

910910
// Generate the data and the checksum coefficient vector:
@@ -942,7 +942,7 @@ else if(arg.equals("-bench")) {
942942
double l2 = (double)L*delta;
943943
double sqrt_l2 = 0.;
944944
// Generate data in randVector //
945-
data = Util.randVector(m, F, l2);
945+
data = Util.randVector(m, F_UV, l2);
946946
// Generate Data in randVector //
947947

948948

@@ -982,7 +982,7 @@ else if(arg.equals("-bench")) {
982982
Util.innerProduct(c[0], data);
983983
innerProductTime += (System.currentTimeMillis()-t0);
984984

985-
UserVector2 uv = new UserVector2(data, F, l, two_generators_for_g_h[0], two_generators_for_g_h[1]);
985+
UserVector2 uv = new UserVector2(data, F_UV, l, two_generators_for_g_h[0], two_generators_for_g_h[1]);
986986
data = uv.getUserData();
987987
uv.generateShares();
988988
uv.setChecksumCoefficientVectors(c);

0 commit comments

Comments
 (0)