/RC4encryptionCryptanalysis

Assignment-1, CS6500, IIT Madras

Primary LanguageC++

Name : Harshit Kedia Roll NO: CS17B103

Files:

  1. Report: Assignment report
  2. cs17b103.cpp: c++ code implementing RC4 and randomness measurement
  3. graph_generator.py: python script that reads the output file and generated the plot.
  4. outputs folder: folder containing the output of the runs made by me.
  5. run1.txt - run25.txt : saved output of the 25 runs executed by me.
  6. Makefile and README
  7. graph_generator.py: python script to generate plot using output runs saved in run1.txt to run25.txt.

Instructions:

  1. on terminal execute makefile as shown: $ make

  2. create a folder (if not already present) named "outputs": $ mkdir outputs

  3. run the executable, it has loops to run for bit changes = 1...32, and outputs of length 2,4,8,32,128,1024 as specified in problem. Redirect the output of the program into the outputs folder as shown. Remember to name the output files as run1.txt or run2.txt ... $ ./cs17b103 > outputs/run1.txt $ ./cs17b103 > outputs/run2.txt . . $ ./cs17b103 > outputs/run25.txt

  4. each line in the run1.txt files has 3 numbers, {c, n, r}, where c=number of bits changed, n=bytes of generated key, r=randomness according to formula.

  5. run the python script (note: matplotib is needed) to read the files, take average and generate plot accordingly as: $ python3 graph_generation.py

Note: I have attached the outputs generated by me, in outputs folder in the zip submission file.