logo

Affine Cipher and LFSR

   

Added on  2022-11-16

6 Pages865 Words471 Views
Question 1:
a) Plaintext and cipher text pair is given as (1,7) and (0,2).
As the equation for affine cipher is c= ap +b (mod 26) where c is the ciphertext, p is
the plaintext, a and b are the keys which are unknown. With the help of given
information the two equation will be created as :
So for the given plaintext and cipher text the equation will becomes as-
Equation 1:
7= a*1+b ( mod 26)
7=a + b (mod 26)
Equation 2:
2= a*0+ b (mod 26)
2= b (mod 26)
Substiuting the value of b(mod 26) in equation 1:
7= a + 2, a=5
Hence the equation will be – c = 5p +2
b) :
The encryption of the given text into affine cipher by using key as a= 5 and b =7:
Plaintext:
Encrypted by Affine:
Decrypt same with key 5 and 7:

Question 2:
a) Given LFSR be xn+5 = xn + xn+3
x0=0, x1=1, x2=0, x3=0, x4=0
n=0 then
x0+5 = x0 + x0+3
x5 = x0 + x3
x5 = 0 + 0
x5 = 0
n=1 then
x1+5 = x1 + x1+3
x6 = x1 + x4
x6 = 1 + 0
x6 = 1
n=2 then
x2+5 = x2 + x2+3
x7 = x2 + x5
x7 = 0 + 0
x7 = 0
n=3 then
x3+5 = x3 + x3+3
x8 = x3 + x6
x8 = 0 + 1
x8 = 1
n=4 then

x4+5 = x4 + x4+3
x9 = x4 + x7
x9 = 0 + 0
x9 = 0
n=5 then
x10 = x5 + x8 = 0 + 1 =1
n=6 then
x11 = x6 + x9 = 1 + 0 =1
n=7 then
x12 = x7 + x10 = 0 + 1 =1
n=8 then
x13 = x8 + x11 = 1 + 1 =1
n=9 then
x14 = x9 + x12 = 0 + 1 =1
n=10 then
x15 = x10 + x13 = 1 + 1 =1
n=11 then
x16 = x11 + x14 = 1 + 1 =1
n=12 then
x17 = x12 + x15 = 1 + 1 =1
n=13 then

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Cox Proportional Hazards Model for Survival Analysis
|6
|876
|350

Linear Programming Model for Waste Disposal by B&R Oil and Gas Company
|6
|1200
|53

Linear Regression Model for Resistance per Unit Weight of Displacement
|106
|14401
|57

Linear Programming Problem | Desklib
|5
|530
|70

Linear Regression Analysis and Optimization
|128
|10906
|309

Solved Assignments and Solutions for Further Mathematics
|13
|1918
|63