Isomorphism and AES
Isomorphism and AES
Field Isomorphisms
Concepts Covered:
❑Recap of Groups, Rings, Fields
❑Primitive Elements
❑Bases
❑Construction of Isomorphisms
Groups, Rings, and Fields
The idea of isomorphism can be extended to rings and fields. In these extensions the only difference is
that the latter two are defined wrt. Two operators, say (+,.). Thus, we say f: R1→R2 is say a field
isomorphism iff: f(a+b)=f(a)+f(b), and f(a.b)=f(a).f(b) for every a and b in R1.
Example in 4
GF(2 )
There are 3 irreducible polynomials of degree 4, which can be used to construct the
above field elements: 𝑓1 𝑧 = 𝑧 4 + 𝑧 + 1, 𝑓2 𝑧 = 𝑧 4 + 𝑧 3 + 1, 𝑓3 𝑧 = 𝑧 4 + 𝑧 3 + 𝑧 2 +
𝑧 + 1.
The fields are denoted as F1, F2, and F3 respectively.
The resulting fields all have 16 elements, as shown above.
However, the operations are different.
Like the same operation, 𝑧. 𝑧 3 would result in 𝑧 4 = 𝑧 + 1, 𝑧 3 + 1, 𝑧 3 + 𝑧 2 + 𝑧 + 1 in the 3
fields.
Defining Isomorphism
• The fields are isomorphic and one can establish a mapping between say F1 and F2,
by computing 𝑐 ∈ 𝐹2 , 𝑠𝑡. 𝑓1 𝑐 ≡ 0 𝑚𝑜𝑑 𝑓2 .
• The mapping 𝑧 → 𝑐 is thus used to construct the isomorphism, say T: F1→F2
• An example for c could be 𝑐 = 𝑧 2 + 𝑧. To verify compute:
𝑓1 𝑧 2 + 𝑧 = 𝑧 2 + 𝑧 4 + 𝑧 2 + 𝑧 + 1 = 𝑧 8 + 𝑧 4 + 𝑧 2 + 𝑧 + 1 (𝑚𝑜𝑑 𝑓2 )
Now, note that for 𝑚𝑜𝑑 𝑓2 , we substitute 𝑧 4 = 𝑧 3 + 1.
z 4 = z 3 +1Þ z 5 = z 4 + z = z 3 + z +1Þ z 6 = z 4 + z 2 + z = z 3 + z 2 + z +1
Þ z 8 = z 6 +1 = z 3 + z 2 + z.
Thus, f1 (c) = z 8 + z 4 + z 2 + z +1 º 0(mod f 2 )
Check on Homomorphism
• Consider two elements 𝑒1 = 𝑧 2 + 𝑧, 𝑒2 = 𝑧 3 + 𝑧.
• Product in field F1: 𝑧 2 + 𝑧 𝑧 3 + 𝑧 = 𝑧 5 + 𝑧 4 + 𝑧 3 + 𝑧 2
• In field F1: 𝑧 4 = 𝑧 + 1 ⇒ 𝑧 5 = 𝑧 2 + 𝑧.
• Thus, the product is: 𝑧 2 + 𝑧 + 𝑧 3 + 𝑧 + 1 + 𝑧 2 = 𝑧 3 + 1.
• The same operation can also be performed in the field F2.
• Compute, 𝑇 𝑒1 = 𝑧 2 + 𝑧 2 + 𝑧 2 + 𝑧 𝑚𝑜𝑑 𝑧 4 + 𝑧 3 + 1 = 𝑧 4 + 𝑧 2 + 𝑧 2 +
𝑧 = 𝑧 3 + 𝑧 + 1.
• Likewise, 𝑇 𝑒2 = 𝑧 2 + 𝑧 3 + 𝑧 2 + 𝑧 𝑚𝑜𝑑 𝑧 4 + 𝑧 3 + 1
=𝑧+1
Check on Homomorphism
Input: n, m, Q(Y),P(X),R(Z)
Output: 𝐺𝐹 2𝑘 → 𝐺𝐹 2𝑛 𝑚 , 𝑘 = 𝑛 × 𝑚
1. Find primitive elements of 𝐺𝐹 2𝑘 : 𝛾
2. For(𝛼 = 1; 𝛼 < 2𝑛𝑚 − 1; ) 𝑑𝑜
if(isPrimitive(𝛼)& 𝑅 𝛼 𝑚𝑜𝑑 𝑄 𝑌 𝑃 𝑋 ≡ 0) break;
end
3. For(i=0;i<2𝑛𝑚 − 1;i++)
𝑎1 = 𝛼 𝑖 𝑚𝑜𝑑 𝑄 𝑌 𝑃 𝑋 , 𝑏1 = 𝛾 𝑖 𝑚𝑜𝑑 𝑅 𝑍
𝑏1 = 𝛾 𝑖 𝑚𝑜𝑑 𝑅 𝑍
Map: 𝑎1 → 𝑏1
4 2 2
Example: 𝐺𝐹 2 → 𝐺𝐹 2
• 𝑅 𝑍 = 𝑍 4 + 𝑍 + 1, 𝑄 𝑌 = 𝑌 2 + 𝑌 + 1, 𝑃 𝑋 = 𝑋 2 + 𝑋 + {2},
where 2 ∈ 𝐺𝐹 22 .
• Note, 𝑄 𝑌 is used to construct 𝐺𝐹(22 ), while P(X) is used to extend
to the field GF(22)2.
• First primitive element 𝛾 ∈ 𝐺𝐹(24 ) is 2. It can be checked that ‘2’ can
be used to generate all the non-zero elements of 𝐺𝐹(24 ).
• Likewise, the first primitive element of 𝐺𝐹 22 2 , st. 𝑅 𝑍 ≡
0[𝑚𝑜𝑑 𝑄 𝑌 𝑃 𝑋 ] is 4.
• Hence, the map is: 2 → 4 . Also, 0 is mapped to 0.
Example Isomorphic Mapping 𝐺𝐹 24 → 𝐺𝐹 22 2
Note, 4 = 0100 = 𝑋
𝑅 𝑋 = 𝑋 4 + 𝑋 + 1 𝑚𝑜𝑑 𝑄 𝑌 𝑃 𝑋 .
Note: 𝑋 2 = 𝑋 + 2 ⇒ 𝑋 3 = 3𝑋 + 2 ⇒ 𝑋 4 = 3𝑋 2 + 2𝑋 =
3 𝑋 + 2 + 2𝑋 = 𝑋 + 1 ⇒ 𝑅 4 = 0𝑚𝑜𝑑𝑃 𝑋 , 𝑄(𝑌)
𝑇 𝛾 𝑖 = 𝛼 𝑖𝑡 , 𝑖 = 0,1, ⋯ , 𝑘 − 1
Check for t
• Of course, the choice of t cannot be arbitrary, it has to be done such that the
homomorphism is established wrt. additions and multiplications.
• We check, 𝑅 𝛼 𝑡 = 0, 𝑚𝑜𝑑 𝑄 𝑌 𝑃(𝑋).
• There will be exactly k primitive elements which will satisfy the condition, namely
𝑗
𝛼 and 𝛼 , 𝑗 = 1,2, ⋯ , 𝑘 − 1. Here the exponents are computed modulo 2𝑘 −
𝑡 𝑡2
2 2𝑗
1.[This follows from the fact that if 𝑅 𝑋 ≡ 0 ⇒ 𝑅 𝑋 ≡ 𝑅 𝑋 ≡ 0, 𝑗 =
1,2, ⋯ , 𝑘 − 1.
Algorithm
Input: n,m,Q(Y),P(X),R(Z)
Output: T
𝛼 is the primitive element in 𝐺𝐹 2𝑛 𝑚 for which 𝑃 𝛼 ≡ 0.
t=1
Initialize the array S[1:2k-1] with 2k-1 addresses and 1 bit of information.
Initialize a kxk matrix T with each column indicated by 𝑇 𝑖 , 1 ≤ i ≤ 𝑘
Set 𝑇 𝑘 = 0 ⋯ 01 𝑇
while(𝑅 𝛼 𝑡 ! = 0){
for(j=0;j<k-1;j++) S[t2jmod (2k-1)]=0; t++;
while(S[t]==0 or gcd(t, 2k-1)>1) t++;
}
for(j=2;j<k;j++) T[j]=binary(𝛼 (𝑗−1)𝑡 )
Topic
Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)
16 bytes Plaintext
a b c d e f g h i j k l mn o p
a e i m A E I M
b f j n B F J N
c g k o AES C G K O
d h l p DH L P
16 bytes Cipher text
XOR key
AES-128
Encryption
Byte Substitution
Loop 10 times
Shift Rows
Secret Key
XOR RK10
RK9
Add Round Key RK8
Plaintext
Block RK1
Inverse Mix Columns key
(except for the last round) Key Expansion
Add Round Key