Professional Documents
Culture Documents
• Characteristic polynomial CK CK CK CK
– defined by XOR positions
– P(x) = x4 + x3 + x + 1 in both examples
D Q D Q D Q
1 2 3
CK CK CK
DQ DQ DQ
DQ DQ DQ
CK CK CK
CK CK CK
0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 0 1
0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1
0 1 1 0 1 0 0 1 0 1 1 0
0 0 1 0 0 1
1 0 0 1 1 1
Debdeep Mukhopadhyay
Assistant Professor
Department of Computer Science and
Engineering
Indian Institute of Technology Kharagpur
INDIA -721302
Objectives
• Linear Complexity
L
s j = ∑ ci s j −i , j = L, L + 1,...
i =1
Generation of a sequence
• If L≥N, the LFSR always generates
the sequence.
• If L<N, it follows that the LFSR
generates the sequence if and only
if:
L
s j = ∑ ci s j −i , j = L, L + 1,..., N − 1
i =1
Proof
Case 1: L ≥ N, the theorem is trivially true.
Case 2: L<N, let c1 , c2 ,..., cL and c '1 , c '2 ,..., c 'L '
denote the connection coefficients of the two
LFSRs in question and assume that L' ≤ N-L.
L
∴ ∑c s
i =1
i j −i = s j , j = L, L + 1,..., N − 1
≠ sN , j = N
L'
∴ ∑c'
i =1
k s j − k = s j , j = L ', L '+ 1,..., N − 1, N
Linear Complexity
• Define LN(s) as the minimum length of all
LFSRs that generate s0, s1, …, sN-1
• Clearly, LN(s)≤N
• Moreover, LN(s) must be monotonically
decreasing with increasing N.
• Convention:
– all 0 sequence is generated by the LFSR with
L=0
– When s0, s1, …, sN-1 are all 0’s but sN=1, then
L=N+1
Discrepancy
Lemma 1 is actually an equality. We have seen this
for the base case.
Assume an induction hypothesis for L N ( s).
The corresponding polynomial is C N ( D).
Ln ( s )
⎧ 0, j = Ln ( s ) ,..., n − 1
∴sj ⊕ ∑c =⎨
(n)
sj −i
⎩d n , j = n
i
i =1
By induction hypothesis,
L m +1 ( s ) = L n ( s ) = max[L m ( s ), m + 1 − L m ( s )]
∵ L m ( s ) < Ln ( s ), L n ( s ) = m + 1 − L m ( s )
Claim :
C ( D ) = C n (D) ⊕ D n − m C m (D) is a valid next choice for C n +1 ( D).
Note : degree of C(D)=max[L n ( s ), n − m + Lm ( s )]
=max[L n ( s ), n + 1 − Ln ( s )]
∴ C ( D ) is an allowable connection polynomial
for an LFSR of length L=max[L n ( s), n + 1 − Ln ( s )]
⎧ 0, j = L, L + 1,..., n − 1
=⎨
⎩1 ⊕ 1 = 0, j = n
Example
1 0 1+D3 1+D+D3 3 2 1 5
0 0 1+D3 1+D+D3 3 2 1 6
1 0 1+D3 1+D+D3 3 2 1 7
1 1 1+D+D3 1+D+D3 5 7 1+D+D3 8
+ D5
ElGamal has the disadvantage that the ciphertext is twice as When Alice receives the encrypted message (r, t), she
−d
long as the plaintext. decrypts (using her private key dA) by computing t r A.
It has the advantage the same plaintext gives a different Note tr
−dA k
≡ βA M (αA )
k −dA
(mod pA)
ciphertext (with near certainty) each time it is encrypted. dA k k −dA
≡ (αA ) M (αA ) (mod pA)
≡ M (mod pA)
Alice chooses
i) A large prime pA (say 200 to 300 digits), Even if Eve intercepts the ciphertext (r, t), she cannot
ii) A primitive element αA modulo pA, perform the calculation above because she doesn’t know dA.
iii) A (possibly random) integer dA with 2 ≤ dA ≤ pA –2. dA
βA ≡ αA (mod pA), so dA ≡ LαA (βA)
Alice computes
dA Eve can find dA if she can compute a discrete log in the large
iv) βA ≡ αA (mod pA).
prime modulus pA, presumably a computation that is too
difficult to be practical.
Alice’s public key is ( pA, αA, βA ). Her private key is dA.
Alice receives the message (r, t) = (28, 9), and using her
private key dA = 67 she decrypts to
−dA
tr = 9 ⋅28−67 ≡ 9 ⋅28106−67 ≡ 9 ⋅43 ≡ 66 (mod 107).