Professional Documents
Culture Documents
AES 128/192/256 last rand function is always different from all the other function
Rest of all are same
f1=f2=f3....=f9 != f10
first 9 consist of
1.sub bits
2.shift row
3.shift coloums
(0, 1)128 ⇒(0,1)128
f10
1.Sub bites 2.shift rows
4)b7b6b5b4b3b2b1
S:(0, 1)5 ⇒(0,1)8
S(x)=X a∈ 0, 1
x=a7a6a5a4a3a2a1a0 p(x)=a0+a1x+a2x2 ....a7x7
deg(p(x))¡8 find multiplicative inverse of p(x) under mod x5 +x4 +x3 +x+1 p(x).q(x)=1 (mod(x5 +x4 +x3 +x+1))
G(a,b)=ax!=bt
so GCD (p(x),(x5 +x4 +x3 +x+1))=1
let key[1]=128bit
1)ROTWORD (B0,B1,B2,B3)
′
Bi =subbyte(Bi)
1)SUBWORD (B0’,B1’,B2’,B3’)
1
′
Bi =subbyte(Bi)
⇒ ECBencryptioncodeblockInputkeyknbitplaintextx1.....x10
1)Encryption
ENC(xi,k)=C1 1¡=i¡=t c=c1...c3
2)Decryption
DEC(c,k)=xi 1¡=i¡=t
⇒ CBCencryptioncodeblock
inputs key k , n-bit plaintext blocks x1,x2...........xt
1)Encryption c0=IV cj : Enc(cj-1 + xj,k) 1¡=j¡=t
1)Decryption c0=IV cj : Dec(cj + x) + cj-1’ 1¡=j¡=t
Stream Cipher
1.) M= m0——m1——,...,mt
Stream cipher encrypt
M= m0.....,l , mi belongs to 0,1
C(M,K)= e(m0,Z0) e(mi,Zi) e(hi,Zi)
Encryption:
Ci=mi+Ki
Decryption:
M=C+K
If the cipher test does not leak any info about the message, then it is called perfectly secure
algorithm.
[M,C,K]
m0,1 , K0,1
G [M=0]=p , G[K=0]=1/2
G[M-1]=1-P
C=Enc(m,K)=m+K
Pr[C=0]=G[Am=0,K=0 U m=1,K=1]
Length of key should be greater than or equal to the length of the message
1.) You cannot use the same key to encrypt and decrypt messages.
2.) length (key) is greater then or equal to length (M)