密码学代写 | CSCI 6331 – Cryptography – Spring 2020

这个作业是计算用于线性密码分析的偏差表
CSCI 6331 – Cryptography – Spring 2020
Final Project
due 7 May ON BLACKBOARD, 6 pm
All examinations, papers, and other graded work products and assignments are to be completed in conformance with The George Washington University Code of Academic Integrity. You may not discuss HWs
among yourselves. Each student is expected to work independently on his or her own HW; you may not
collaborate with others, you may not copy one another’s assignments, even in part.
All code must run on your shell account. The TA will make no attempt to debug your code, or determine
why it does not run. You will be graded on the correctness of your output, and the quality of your code:
efficiency and documentation. There will be no exceptions.
Under no circumstances may code be copied from anywhere: classmates, the web, any other source
Any violations will be treated as violations of the Code of Academic Integrity.
Submit all projects in Blackboard by 6 pm on due date. Name your files:
CS6331 Project PartA LASTNAME FIRSTNAME.rar or .zip and/or
CS6331 Project PartB LASTNAME FIRSTNAME.rar or .zip
Archive the code with the report and name the compressed file similarly, with extensions .tar or .rar
or .zip
CSCI 6331-4331/Spring 2020/Vora/GW/Final Project/assigned: 17 April 2020/due: 7 May 2
Using the code written in HW 1 FOR ONLY FOUR ROUNDS (not 8 as assigned for HW 2), and the S-box
and permutation described below, do the following:
PART A: Compute the bias table for linear cryptanalysis. Using it, compute a linear trail that you will use
to find multiple key bits. For this part, you need to submit the code that can be run to produce your bias
table. You also need to submit a report describing what you did. The report should include the bias table,
the linear trail you chose and why, and the bias you computed for the linear trail.
PART B: Carry out the attack described in PART A. For this part, you need to submit code that carries out
the attack, and a report that describe what you did and the results you obtained. You will need to guess how
many P/C pairs you will need for the attack, generate them, and then use them. Explain how you calculated
how many P/C pairs you used, and what results you obtained.
The two parts must be submitted separately. You may submit Part A without submitting Part B. For each
part, you must submit code, which should be accompanied by a report, which describes what you did, why,
what the results were, and whether they were expected, that is, whether they make sense. The code must, of
course, be well-documented. It goes without saying that there should be a READNE file so we may run the
code and obtain the results you did.
For both parts A and B,
S-Box x → (3x+1 mod 257) − 1
For example,
0 → 2
1 → 8
5 → 214
255 → 0
47 → 1
Permutation: a cyclic permutation; 3 bits to the right. That is:
11001110 10101100 11010001 10010001 becomes: 001 11001110 10101100 11010001 10010