Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjoon-lee committed Jul 15, 2024
1 parent f7f931f commit 38bd5b5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
28 changes: 25 additions & 3 deletions mixnet/sim/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# NomMix Simulation

* [Features](#features)
* [Future Plans](#future-plans)
* [Installation](#installation)
* [Getting Started](#getting-started)

## Features

- Simulate the NomMix protocol with the given parameters.
- Measure the performance of the NomMix protocol.
- Bandwidth usages
- Analyze the privacy properties that the NomMix protocol provides.
- Message sizes
- Node states and hamming distances

## Future Plans

- Simulate more features of the NomMix protocol.
- Temporal mixing
- Level-1 noise
- Simulate possible adversarial attacks and measure the robustness of the NomMix protocol.

## Installation

Clone the repository and install the dependencies:
Expand All @@ -11,7 +32,7 @@ source .venv/bin/activate
pip install -r requirements.txt
```

## Getting started
## Getting Started

Copy the [`mixnet/sim/config.ci.yaml`](./config.ci.yaml) file and adjust the parameters to your needs.
Each parameter is explained in the config file.
Expand All @@ -26,13 +47,14 @@ All results are printed in the console as below.
And, all plots are shown once all analysis is done.
```
==========================================
Message Size Distribution
Message Size Distribution
==========================================
msg_size count
0 1405 99990
==========================================
Node States of All Nodes over Time
Node States of All Nodes over Time
SENDING:-1, IDLE:0, RECEIVING:1
==========================================
Node-0 Node-1 Node-2 Node-3 Node-4
0 0 0 0 0 0
Expand Down
3 changes: 2 additions & 1 deletion mixnet/sim/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def analyze(self):
# Convert NodeState enum to their integer values
df = df.map(lambda state: state.value)
print("==========================================")
print(" Node States of All Nodes over Time")
print("Node States of All Nodes over Time")
print(", ".join(f"{state.name}:{state.value}" for state in NodeState))
print("==========================================")
print(f"{df}\n")

Expand Down
2 changes: 1 addition & 1 deletion mixnet/sim/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __message_sizes(self):
df = pandas.DataFrame.from_dict(sizes, orient="index").reset_index()
df.columns = ["msg_size", "count"]
print("==========================================")
print(" Message Size Distribution")
print("Message Size Distribution")
print("==========================================")
print(f"{df}\n")

Expand Down

0 comments on commit 38bd5b5

Please sign in to comment.