Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
Math549 Coding Theory and Cryptography
Project: Avalanche Criterion
Due date: May 16th, 11:59pm
There are two components to this project.
2. You are now going to study avalanche criteria on something quite simple: namely, where we use a linear substitution cipher as a block cipher. How to do so is described below. Ultimately, your goal is to analyze the linear substitution cipher for AC and conclude whether, in your opinion, the linear substitution cipher offers good AC or not. Your report should give a reasoned answer as to why you end up with the conclusion you make. During your analysis, you may or may not observe some instances of a linear substitution cipher producing SAC (say, for a specific choice of key). If you do, you should absolutely report this. If you do not, you should also make a statement to that effect.
Within this question is a hidden problem: Namely, how do you measure AC and SAC? There are a number of sensible ways to do so. This is something you will have to determine as part of your study. To this end, within your project description you must include a section detailing what you decided to use for measuring AC, and why you think it is a reasonable way to measure it.
- Choose the bit length k. We will then be working with integers modulo N = 2k .
- Choose the key for the encryption function: this is a pair of integers (a, b), where 3 ≤ a ≤ N − 1 is odd and 0 ≤ b ≤ N − 1 is any number.This determines the encryption function: Ea,b(x) = ax + b mod N. Changing the choice of the pair (a, b) clearly changes the encryption function E.
- We also need to be able to convert integers to bit strings. This is literally the application of the division algorithm for finding the base expansion with base 2. This was covered in the lecture on the Division Algorithm and it’s Applications. You should re-watch that if you don’t recall – it is pretty much the first application described in that lecture – but basically, for binary, it involves repeated division by 2.
The encryption function for this example is therefore E(x) = 3x + 2 mod 4. I can now look at every result from this function: The message space involves just the four numbers 0 ≤ x ≤ N −1 = 3. We have
|
Inputs 1 bit away and their Output |
Inputs 1 bit away and their Output |
Number of output bits changed |
|
00 → 10 |
01 → 01 10 → 00 |
2 1 |
|
01 → 01 |
00 → 10 11 → 11 |
2 1 |
|
10 → 00 |
00 → 10 11 → 11 |
1 2 |
|
11 → 11 |
01 → 01 10 → 00 |
1 2 |
For your project, you must analyze at least the case k = 3, and preferably k = 4 as well. Writing some code in whatever is your preferred programming language will make this much simpler (and you’ll probably be able to analyze even larger bit lengths if you so desire). It is possible to do the k = 3 casecompletely by hand, but it does take a good amount of time (there are 24 possible encryption functions in that case, hence the reason it is a decent amount of work!). Of course, I would absolutely recommendyou do this with some programming, but ultimately it is up to you. I will say that without looking at k= 4 too (where there are 7 × 16 = 112 possible functions), you cannot really say a lot. Before setting this project the first time, I had no idea what to expect for the AC of a linear substitution cipher. I won’t say anything about what you should expect as I think it best to leave you to make your own conclusions. One obvious thing you really should consider is whether the AC performance of a linear substitution cipher decreases as you increase the bit length. To this end, you could do a partial analysis (say a couple of randomly chosen keys) for larger bit lengths to see if you can make any partial conclusions.
All submissions must be in a single PDF file through Canvas before the deadline.
Assessment Value: 50 points