Browse Source

more old stuff to remove

Boyoung- 6 years ago
parent
commit
668fe576d0

+ 1 - 1
scripts/aws_charlie.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol rtv -eddie_ip 35.161.54.54 -debbie_ip 35.162.185.55 charlie
+java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv -eddie_ip 54.70.122.155 -debbie_ip 34.210.191.225 charlie

+ 1 - 1
scripts/aws_debbie.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol rtv -eddie_ip 35.161.54.54 debbie
+java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv -eddie_ip 54.70.122.155 debbie

+ 1 - 1
scripts/aws_eddie.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol rtv eddie
+java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv eddie

+ 0 - 3
scripts/aws_pir_charlie.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv -eddie_ip 54.70.122.155 -debbie_ip 34.210.191.225 charlie

+ 0 - 3
scripts/aws_pir_debbie.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv -eddie_ip 54.70.122.155 debbie

+ 0 - 3
scripts/aws_pir_eddie.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv eddie

+ 1 - 1
scripts/charlie.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol rtv charlie
+java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv charlie

+ 1 - 1
scripts/debbie.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol rtv debbie
+java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv debbie

+ 1 - 1
scripts/eddie.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol rtv eddie
+java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv eddie

+ 0 - 3
scripts/pir_charlie.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv charlie

+ 0 - 3
scripts/pir_debbie.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv debbie

+ 0 - 3
scripts/pir_eddie.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-java -cp "${DIR}/../bin:${DIR}/../lib/*" ui.CLI -protocol pirrtv eddie

+ 0 - 16
src/exceptions/AccessException.java

@@ -1,16 +0,0 @@
-package exceptions;
-
-public class AccessException extends RuntimeException {
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	public AccessException() {
-		super();
-	}
-
-	public AccessException(String message) {
-		super(message);
-	}
-}

+ 16 - 0
src/exceptions/PIRCOTException.java

@@ -0,0 +1,16 @@
+package exceptions;
+
+public class PIRCOTException extends RuntimeException {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public PIRCOTException() {
+		super();
+	}
+
+	public PIRCOTException(String message) {
+		super(message);
+	}
+}

+ 0 - 16
src/exceptions/SSCOTException.java

@@ -1,16 +0,0 @@
-package exceptions;
-
-public class SSCOTException extends RuntimeException {
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	public SSCOTException() {
-		super();
-	}
-
-	public SSCOTException(String message) {
-		super(message);
-	}
-}

+ 0 - 16
src/exceptions/SSIOTException.java

@@ -1,16 +0,0 @@
-package exceptions;
-
-public class SSIOTException extends RuntimeException {
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	public SSIOTException() {
-		super();
-	}
-
-	public SSIOTException(String message) {
-		super(message);
-	}
-}

+ 2 - 2
src/pir/PIRCOT.java

@@ -4,7 +4,7 @@ import communication.Communication;
 import crypto.Crypto;
 import crypto.PRF;
 import exceptions.NoSuchPartyException;
-import exceptions.SSCOTException;
+import exceptions.PIRCOTException;
 import oram.Forest;
 import oram.Metadata;
 import protocols.Protocol;
@@ -147,7 +147,7 @@ public class PIRCOT extends Protocol {
 		}
 
 		if (count != 1) {
-			throw new SSCOTException("Invariant error: " + count);
+			throw new PIRCOTException("Invariant error: " + count);
 		}
 
 		int delta_D = (t_C - s_CE + l) % l;

+ 9 - 13
src/pir/PIRRetrieve.java

@@ -18,12 +18,10 @@ import protocols.struct.OutFF;
 import protocols.struct.OutPIRAccess;
 import protocols.struct.OutULiT;
 import protocols.struct.Party;
-import protocols.struct.PreData;
 import protocols.struct.TwoThreeXorByte;
 import protocols.struct.TwoThreeXorInt;
 import util.M;
 import util.StopWatch;
-import util.Timer;
 import util.Util;
 
 // TODO: really FlipFlag on path, and update path in Eviction
@@ -43,8 +41,8 @@ public class PIRRetrieve extends Protocol {
 		cons2 = b;
 	}
 
-	public OutPIRAccess runE(Metadata md, PreData predata, Tree tree_DE, Tree tree_CE, byte[] Li, TwoThreeXorByte L,
-			TwoThreeXorByte N, TwoThreeXorInt dN) {
+	public OutPIRAccess runE(Metadata md, Tree tree_DE, Tree tree_CE, byte[] Li, TwoThreeXorByte L, TwoThreeXorByte N,
+			TwoThreeXorInt dN) {
 		timer.start(M.online_comp);
 
 		int treeIndex = tree_DE.getTreeIndex();
@@ -130,8 +128,8 @@ public class PIRRetrieve extends Protocol {
 		return outpiracc;
 	}
 
-	public OutPIRAccess runD(Metadata md, PreData predata, Tree tree_DE, Tree tree_CD, byte[] Li, TwoThreeXorByte L,
-			TwoThreeXorByte N, TwoThreeXorInt dN) {
+	public OutPIRAccess runD(Metadata md, Tree tree_DE, Tree tree_CD, byte[] Li, TwoThreeXorByte L, TwoThreeXorByte N,
+			TwoThreeXorInt dN) {
 		timer.start(M.online_comp);
 
 		int treeIndex = tree_DE.getTreeIndex();
@@ -188,8 +186,8 @@ public class PIRRetrieve extends Protocol {
 		return outpiracc;
 	}
 
-	public OutPIRAccess runC(Metadata md, PreData predata, Tree tree_CD, Tree tree_CE, byte[] Li, TwoThreeXorByte L,
-			TwoThreeXorByte N, TwoThreeXorInt dN) {
+	public OutPIRAccess runC(Metadata md, Tree tree_CD, Tree tree_CE, byte[] Li, TwoThreeXorByte L, TwoThreeXorByte N,
+			TwoThreeXorInt dN) {
 		timer.start(M.online_comp);
 
 		int treeIndex = tree_CE.getTreeIndex();
@@ -275,8 +273,6 @@ public class PIRRetrieve extends Protocol {
 	public void run(Party party, Metadata md, Forest[] forest) {
 
 		StopWatch ete = new StopWatch("ETE");
-		Timer timer = new Timer();
-		PreData predata = new PreData();
 
 		Tree tree_CD = null;
 		Tree tree_DE = null;
@@ -326,7 +322,7 @@ public class PIRRetrieve extends Protocol {
 
 				if (party == Party.Eddie) {
 					ete.start();
-					OutPIRAccess out = this.runE(md, predata, tree_DE, tree_CE, Li, L, N, dN);
+					OutPIRAccess out = this.runE(md, tree_DE, tree_CE, Li, L, N, dN);
 					ete.stop();
 
 					out.j.t_D = con1.readInt();
@@ -354,7 +350,7 @@ public class PIRRetrieve extends Protocol {
 
 				} else if (party == Party.Debbie) {
 					ete.start();
-					OutPIRAccess out = this.runD(md, predata, tree_DE, tree_CD, Li, L, N, dN);
+					OutPIRAccess out = this.runD(md, tree_DE, tree_CD, Li, L, N, dN);
 					ete.stop();
 
 					con1.write(out.j.t_D);
@@ -362,7 +358,7 @@ public class PIRRetrieve extends Protocol {
 
 				} else if (party == Party.Charlie) {
 					ete.start();
-					OutPIRAccess out = this.runC(md, predata, tree_CD, tree_CE, Li, L, N, dN);
+					OutPIRAccess out = this.runC(md, tree_CD, tree_CE, Li, L, N, dN);
 					ete.stop();
 
 					con1.write(out.j.t_C);

+ 0 - 23
src/protocols/struct/OutAccess.java

@@ -1,23 +0,0 @@
-package protocols.struct;
-
-import oram.Tuple;
-
-public class OutAccess {
-	public byte[] Li;
-	public byte[] C_Lip1;
-	public Tuple E_Ti;
-	public Tuple C_Ti;
-	public Tuple[] E_P;
-	public Tuple[] C_P;
-	public Integer C_j2;
-
-	public OutAccess(byte[] Li, byte[] C_Lip1, Tuple C_Ti, Tuple[] C_P, Integer C_j2, Tuple E_Ti, Tuple[] E_P) {
-		this.Li = Li;
-		this.C_Lip1 = C_Lip1;
-		this.E_Ti = E_Ti;
-		this.C_Ti = C_Ti;
-		this.E_P = E_P;
-		this.C_P = C_P;
-		this.C_j2 = C_j2;
-	}
-}

+ 0 - 13
src/protocols/struct/OutRetrieve.java

@@ -1,13 +0,0 @@
-package protocols.struct;
-
-import protocols.Pipeline;
-
-public class OutRetrieve {
-	public OutAccess outaccess;
-	public Pipeline pipeline;
-
-	public OutRetrieve(OutAccess outaccess, Pipeline pipeline) {
-		this.outaccess = outaccess;
-		this.pipeline = pipeline;
-	}
-}

+ 0 - 11
src/protocols/struct/OutSSCOT.java

@@ -1,11 +0,0 @@
-package protocols.struct;
-
-public class OutSSCOT {
-	public int t;
-	public byte[] m_t;
-
-	public OutSSCOT(int t, byte[] m_t) {
-		this.t = t;
-		this.m_t = m_t;
-	}
-}

+ 0 - 11
src/protocols/struct/OutSSIOT.java

@@ -1,11 +0,0 @@
-package protocols.struct;
-
-public class OutSSIOT {
-	public int t;
-	public byte[] m_t;
-
-	public OutSSIOT(int t, byte[] m_t) {
-		this.t = t;
-		this.m_t = m_t;
-	}
-}

+ 0 - 89
src/protocols/struct/PreData.java

@@ -1,89 +0,0 @@
-package protocols.struct;
-
-import com.oblivm.backend.gc.GCSignal;
-
-import crypto.PRF;
-import gc.GCRoute;
-import gc.GCUpdateRoot;
-import oram.Tuple;
-
-public class PreData {
-	public byte[] sscot_k;
-	public byte[] sscot_kprime;
-	public byte[][] sscot_r;
-	public int sscot_s_DE;
-	public int sscot_s_CE;
-	public int sscot_s_CD;
-	public PRF sscot_F_k;
-	public PRF sscot_F_kprime;
-
-	public byte[] ssiot_k;
-	public byte[] ssiot_kprime;
-	public byte[] ssiot_r;
-	public PRF ssiot_F_k;
-	public PRF ssiot_F_kprime;
-
-	public int[] access_sigma;
-	public Tuple[] access_p;
-
-	public Tuple[][] ssxot_delta = new Tuple[2][];
-	public int[][] ssxot_E_pi = new int[2][];
-	public int[][] ssxot_C_pi = new int[2][];
-	public int[][] ssxot_E_pi_ivs = new int[2][];
-	public int[][] ssxot_C_pi_ivs = new int[2][];
-	public Tuple[][] ssxot_E_r = new Tuple[2][];
-	public Tuple[][] ssxot_C_r = new Tuple[2][];
-
-	public byte[] ppt_Li;
-	public byte[] ppt_Lip1;
-	public int ppt_alpha;
-	public byte[][] ppt_r;
-	public byte[][] ppt_s;
-
-	public int[] reshuffle_pi;
-	public Tuple[] reshuffle_p;
-	public Tuple[] reshuffle_r;
-	public Tuple[] reshuffle_a_prime;
-	// pir
-	public byte[][] pir_reshuffle_p;
-	public byte[][] pir_reshuffle_r;
-	public byte[][] pir_reshuffle_a_prime;
-
-	public GCSignal[][] ur_j1KeyPairs;
-	public GCSignal[][] ur_LiKeyPairs;
-	public GCSignal[][] ur_E_feKeyPairs;
-	public GCSignal[][] ur_C_feKeyPairs;
-	public GCSignal[][][] ur_E_labelKeyPairs;
-	public GCSignal[][][] ur_C_labelKeyPairs;
-	public byte[][][] ur_outKeyHashes;
-	public GCUpdateRoot<GCSignal> ur_gcur;
-
-	public GCSignal[][] evict_LiKeyPairs;
-	public GCSignal[][][] evict_E_feKeyPairs;
-	public GCSignal[][][] evict_C_feKeyPairs;
-	public GCSignal[][][][] evict_E_labelKeyPairs;
-	public GCSignal[][][][] evict_C_labelKeyPairs;
-	public GCSignal[][][] evict_deltaKeyPairs;
-	public byte[][][] evict_tiOutKeyHashes;
-	public GCSignal[][][] evict_targetOutKeyPairs;
-	public GCRoute<GCSignal> evict_gcroute;
-	public int[] evict_pi;
-	public byte[][] evict_delta;
-	public byte[][] evict_rho;
-	public int[][] evict_delta_p;
-	public int[][] evict_rho_p;
-
-	// PermuteTargetI
-	public byte[][][] pt_maskT;
-	public byte[][][] pt_keyT;
-	public byte[][][] pt_targetT;
-	// PermuteTargetII
-	public byte[][] pt_p;
-	public byte[][] pt_r;
-	public byte[][] pt_a;
-
-	// PermuteIndex
-	public byte[][] pi_p;
-	public byte[][] pi_r;
-	public byte[][] pi_a;
-}

+ 0 - 30
src/util/P.java

@@ -1,30 +0,0 @@
-package util;
-
-public class P {
-
-	public static final int ACC = 0;
-	public static final int COT = 1;
-	public static final int IOT = 2;
-	public static final int PPT = 3;
-	public static final int RSF = 4;
-	public static final int UR = 5;
-	public static final int URXOT = 6;
-	public static final int EVI = 7;
-	public static final int PT = 8;
-	public static final int PI = 9;
-	public static final int XOT = 10;
-	public static final int SSPIR = 11;
-	public static final int SftPIR = 12;
-	public static final int TSPIR = 13;
-	public static final int SftXorPIR = 14;
-	public static final int TSXPIR = 15;
-	public static final int Shift = 16;
-	public static final int FF = 17;
-	public static final int InsLbl = 18;
-	public static final int ULiT = 19;
-	public static final int PIRRtv = 20;
-
-	public static final String[] names = { "ACC", "COT", "IOT", "PPT", "RSF", "UR", "URXOT", "EVI", "PT", "PI", "XOT",
-			"SSPIR", "SftPIR", "TSPIR", "SftXorPIR", "TSXPIR", "Shift", "FF", "InsLbl", "ULiT", "PIRRtv" };
-	public static final int size = names.length;
-}