Example:
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)$
(x^4 + x + 1) / (x^2 + x + 1) = x^2 + x
- (x^4 + x^3 + x^2)
x^3 + x^2 + x + 1
- (x^3 + x^2 + x)
1
Hence, $C(x)$ is irreducible over $\mathbb{Z}_2$.
(x^5 + 1) / (x^4 + x + 1) = x
- (x^5 + x^2 + x)
x^2 + x + 1
(x^15 + 1) / (x^4 + x + 1) = ...
$C(x)$ is primitive over $\mathbb{F}_{2^4}$.
Generate output sequences for an LFSR of degree $4$ with connection polynomial $C(x)$ and all possible initial states. What are their periods?
0|0|0|0|0|0|0|0|0|... period 1
000111101011001|0001 period 15
Determine all possible periods of LFSRs defined by the equations
0|000 period 1
0011|001 period 4
01|010 period 2
1|111 period 1
$C_1(x) \equiv 1 + x + x^2 + x^3 \equiv (1 + x) (1 + x^2) \equiv (1 + x)^3 \pmod{2}$
0|0000 period 1
00011|0001 period 5
00101|0010 period 5
01111|0111 period 5
$C_2(x) \equiv 1 + x + x^2 + x^3 + x^4 \pmod{2}$
(x^5 + 1) / (x^4 + x^3 + x^2 + x + 1) = x + 1
- (x^5 + x^4 + x^3 + x^2 + x)
x^4 + x^3 + x^2 + x + 1
- (x^4 + x^3 + x^2 + x + 1)
0
$C_2(x)$ is not primitive over $\mathbb{F}_{2^4}$.
Determine whether an LFSR of degree $4$ can generate sequences
Find an LFSR of degree $4$ that generates the sequence $10101100$.
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}$.
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:
$E_k$ | $a$ | $b$ |
---|---|---|
$k_1$ | 1 | 2 |
$k_2$ | 2 | 3 |
$k_3$ | 3 | 1 |
Prove that the affine cipher over $\mathbb{Z}_{26}$ achieves perfect secrecy if every key is used with equal probability $1/312$.