or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Cryptography and computer security - Tutorial 27.10.2020
Linear feedback shift registers (LFSR)
Example:
Exercise 1
Check that the polynomial \(C(x) = 1 + x + x^4\) is irreducible over \(\mathbb{Z}_2\). Is it also primitive over \(\mathbb{F}_{2^4}\)?
\(C(x) = A(x) B(x)\)
Hence, \(C(x)\) is irreducible over \(\mathbb{Z}_2\).
\(C(x)\) is primitive over \(\mathbb{F}_{2^4}\).
Exercise 2
Generate output sequences for an LFSR of degree \(4\) with connection polynomial \(C(x)\) and all possible initial states. What are their periods?
Exercise 3
Determine all possible periods of LFSRs defined by the equations
\(C_1(x) \equiv 1 + x + x^2 + x^3 \equiv (1 + x) (1 + x^2) \equiv (1 + x)^3 \pmod{2}\)
\(C_2(x) \equiv 1 + x + x^2 + x^3 + x^4 \pmod{2}\)
\(C_2(x)\) is not primitive over \(\mathbb{F}_{2^4}\).
Exercise 4
Determine whether an LFSR of degree \(4\) can generate sequences
Exercise 5
Find an LFSR of degree \(4\) that generates the sequence \(10101100\).
Shannon theory
Exercise 6
Prove that a cryptosystem has perfect secrecy if and only if
\[ P(Y = y \mid X = x_1) \ = \ P(Y = y \mid X = x_2) \]
for all \(x_1, x_2 \in \mathcal{P}\) and \(y \in \mathcal{C}\).
Exercise 7
Consider a cryptosystem in which \(\mathcal{P} = \lbrace a, b \rbrace\), \(\mathcal{K} = \lbrace k_1, k_2, k_3 \rbrace\) and \(\mathcal{C} = \lbrace 1, 2, 3 \rbrace\). Suppose that keys are chosen with probabilities \(P(K = k_1) = 1/2\), \(P(K = k_2) = P(K = k_3) = 1/4\), and plaintexts are chosen with probabilities \(P(X = a) = 1/4\), \(P(X = b) = 3/4\). The encryption matrix is as follows:
Exercise 8
Prove that the affine cipher over \(\mathbb{Z}_{26}\) achieves perfect secrecy if every key is used with equal probability \(1/312\).