This project deals with hardware Trojans in untrusted 3PIPs. Please refer our paper "Toward Building and Optimizing Trustworthy Systems Using Untrusted Components: A Graph-Theoretic Perspective" for more detail.
The complete contents of the directory are as follows:
├── data
│ ├── graphColor
│ │ ├── 0_0_cipr.txt
│ │ ├── 0_0_cip.txt
│ │ ├── 0_0_weight.txt
│ │ ├── ...
│ └── rawData
│ ├── 0.txt
│ ├── ...
│ ├── area.txt
│ └── weight.csv
├── graphAlg
│ ├── a.out
│ ├── graphColor.ipynb
│ ├── graph.h
│ ├── graph.cpp
│ └── util.h
├── output
│ ├── 1_0_res.txt
│ ├── ...
└── README.md
The above directories can be divided into:
-
Dataset directory
rawData
For the original data set catalog,
weight.csv
different types of IP core data sets are produced for different manufacturers, andarea.txt
the areas corresponding to different types of nodes.graphColor
For the
graphColor.ipynb
output path -
Code directory
-
graphColor.ipynb
Is a jupyter-notebook file, the main functions are as follows:
- Data preprocessing and graph coloring
- Relationship between color and node type
- The relationship between colors and nodes
- Weight matrix matching minimum weight in bipartite graph
-
graph.cpp
It is the C ++ main program. Its specific functions are implemented in
graph.h
andutil.h
. The main functions are as follows:- Read
data/graphColor
the data set in the directory - Output the following experimental results to the output directory
- Optimize match to complete the optimal match based on bipartite graph
- Minimize cycle and complete time-based IP core scheduling
- Optimize area and complete area-based IP core scheduling
- Read
-
-
Results directory
output
Output results for experiment
-
rawData
Description of the original data set, which contains some benchmark data sets.
-
graphColor
graphColor.ipynb
Loading each raw dataset will output 3 files:1_0_cip.txt
,0_0_cipr.txt
,0_0_weight.txt
1 represents the original dataset number, 0 represents the number of trusted IP cores, cip represents the color and node type dataset, cipr represents the color and node dataset, and weight represents the output weight dataset.
Among them, cip and cipr are understood by columns, which are the nodes or node types corresponding to each color.
-
output
1_0_res.txt
Represents the experimental results of the first data set with 0 trusted IP cores
- Python 3.x
- jupyter-notebook
- numpy
- networkx
- matplotlib
- pandas
- copy
- C ++
- Compiler supporting at least C ++ 11
Our development environment is:
- Ubuntu18.04 + Anaconda3 + GCC8.3
-
Please make sure the 3.1 environment is correct
-
Please run the
graphColor.ipynb
file and the experiment results will be stored under the graphColor folder. -
Please run
graph.cpp
- It works as follows:
g++ graph.cpp -std=c++11 ./a.out 1 0
1 represents the data set number, 0 represents the number of trusted IP cores.
-
View experimental results (enter the output directory)