This code repository is useful to reproduce the results given in the paper titled "Decentralized Device Authentication Model using the Trust Score and Blockchain Technology for Dynamic Networks".
We used the QTM: P2P Trust Simulator tool for simulating the trust.The simulated trust algorithms in the paper are stored in tsys_lib folder.The file tsys_block.c represents our algorithm, tsys_zheyang.c for zheyang and tsys_none.c for no trust management.To compare other trust algorithms like eigen, tnasl in the results, add eigen and tnasl to the array alglist in the script run.sh.
Execute the following commands in the root folder
pip install matplotlib pandas numpy
cd trust-simulation-master
make all
chmod +x run.sh gen_trace sim_run
./run.sh -usr:purely 10 5 #./run.sh user_behaviour step_size pre_trust_users
./run.sh -usr:disguise 10 5
./run.sh -usr:sybil 10 5
Above commands will give the results. All the intermediate files and the results are automatically stored in the test folder. The results include
- a graph
- csv file for each trust algorithm given
- csv file consolidated for all the given trust algorithms
You can also try the following
./run.sh -usr:provider 20 5 # With pretrust users=5 and users of type -usr:provider=20,40,60,...,100
./run.sh -usr:feedback 30 10 # With pretrust users=10 and users of type -usr:provider=30,60,90,..,100
To know about the parameters used in the script see P2P-SIM README