Home

Awesome

UNTANGLE -- Unlocking Routing and Logic Obfuscation Using Graph Neural Networks-based Link Prediction

Lilas Alrahis, Satwik Patnaik, Muhammad Abdullah Hanif, Muhammad Shafique, and Ozgur Sinanoglu


Contact

Lilas Alrahis (lma387@nyu.edu)

About

UNTANGLE is a link prediction-based attack on logic locking. This repository contains the python implementation of UNTANGLE attack in addition to the implementation of random MUX locking and InterLock.

UNTANGLE Concept

Setup

Step 1: Install the default GNN model (i.e., DGCNN)

$ git clone https://github.com/muhanzhang/pytorch_DGCNN
$ cd pytorch_DGCNN/lib
$ make -j4
$ cd ../..

Step 2: Install Required Packages

  1. Install PyTorch
  2. Install numpy, scipy, networkx, tqdm, sklearn, gensim

Usage

Attacking Random Mux Locking

1) Lock a design

$ cd ./prepare_datasets/perl_scripts/
$ perl MUX_random_lock.pl -k 256 -i ../test_c7552/ > log.txt

2) Train UNTANGLE

$ cd ../../
$ python Main.py --file-name c7552_MUX_K256 --train-name links_train.txt  --test-name links_test.txt --testneg-name link_test_n.txt --hop 2  --save-model > Log_train_c7552_MUX_K256.txt

3) Get the predictions

$ python Main.py  --file-name c7552_MUX_K256 --train-name links_train.txt  --test-name links_test.txt --hop 2  --only-predict > Log_pos_predict_c7552_MUX_K256.txt
$ python Main.py  --file-name c7552_MUX_K256 --train-name links_train.txt  --test-name  link_test_n.txt --hop 2  --only-predict > Log_neg_predict_c7552_MUX_K256.txt

4) Parse the predictions

$perl break_MUX.pl c7552_MUX_K256

Citation & Acknowledgement

If you find the code useful, please cite our paper:

@INPROCEEDINGS{untangle,
  author={Alrahis, Lilas and Patnaik, Satwik and Hanif, Muhammad Abdullah and Shafique, Muhammad and Sinanoglu, Ozgur},
  booktitle={2021 IEEE/ACM International Conference On Computer Aided Design (ICCAD)}, 
  title={UNTANGLE: Unlocking Routing and Logic Obfuscation Using Graph Neural Networks-based Link Prediction}, 
  year={2021},
  volume={},
  number={},
  pages={1-9},
  doi={10.1109/ICCAD51958.2021.9643476}}

We owe many thanks to Muhan Zhang for making his SEAL code available.