Skip to content

Commit

Permalink
Type 6 should only use one comparison. One comparison per level will …
Browse files Browse the repository at this point in the history
…preserve timing attack proteciton
  • Loading branch information
AndrewQuijano committed Jan 3, 2024
1 parent 77ea64f commit 50fcba6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Run this command and all future commands from `Level-Site-PPDT` folder, run the
bash setup.sh
```

Before you run the PPDT, make sure to create your keystore, this is necessary as the level-sites use TLS sockets.
Run the `create_keystore.sh` script, make sure the password is consistent with the Kubernetes secret.

## Running PPDT locally

1. Check the `config.properties` file is set to your needs. Currently:
Expand Down Expand Up @@ -162,15 +165,15 @@ You would point values to something like `/data/hypothyroid.values`

### Re-running with different experiments
If you are just re-running the client with the same or different values file, just re-run the above command again.
Howver, if you want to test with another data set, best to just rebuild the environment by deleting everything first.
However, if you want to test with another data set, best to just rebuild the environment by deleting everything first.

```bash
kubectl delete -f k8/client
kubectl delete -f k8/server
kubectl delete -f k8/level_sites
```

Then just repeat the instructions on the previous section.
Then repeat the instructions on the previous section.

### Clean up
Destroy the EKS cluster using the following:
Expand All @@ -192,5 +195,4 @@ Code Authors: Andrew Quijano, Spyros T. Halkidis, Kevin Gallagher
[MIT](https://choosealicense.com/licenses/mit/)

## Project status
Fully tested and completed. Future work currently includes:
* See if I can run this on AWS EKS too
Fully tested and completed. Although I believe I need a label encoder to compare two strings.
16 changes: 4 additions & 12 deletions src/main/java/weka/finito/utils/shared.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static NodeInfo traverse_level(level_order_site level_site_data,
List<NodeInfo> node_level_data = level_site_data.get_node_data();
boolean terminalLeafFound = false;
boolean equalsFound = false;
boolean inequalityHolds = false;
boolean inequalityHolds;
int node_level_index = 0;
int n = 0;
int next_index = 0;
Expand All @@ -95,19 +95,11 @@ public static NodeInfo traverse_level(level_order_site level_site_data,
else {
if ((n == 2 * level_site_data.get_current_index()
|| n == 2 * level_site_data.get_current_index() + 1)) {

if (ls.comparisonType == 6) {
boolean firstInequalityHolds = compare(ls, 3,
inequalityHolds = compare(ls, 1,
encrypted_features, toClient, niu);
if (firstInequalityHolds) {
inequalityHolds = true;
}
else {
boolean secondInequalityHolds = compare(ls, 5,
encrypted_features, toClient, niu);
if (secondInequalityHolds) {
inequalityHolds = true;
}
}
inequalityHolds = !inequalityHolds;
}
else {
inequalityHolds = compare(ls, ls.comparisonType,
Expand Down

0 comments on commit 50fcba6

Please sign in to comment.