Sie sind auf Seite 1von 23

Introduction to Galois Field

for AES
Overview

AES
Finite Field Prime Field
Overview

Application Extension
in AES Field
AES Overview

Plaintext,𝑥
128 bit
AES 128 bit
Ciphertext,𝑦

128/192/256 bit

Key, 𝑘
AES Overview
• Symmetric key
• At least 10 rounds of encryption/decryption
• Four layers operation
• SubByte
• ShiftRow
• MixColumn
• AddRoundKey
• All internal operation of AES are based on finite field
Introduction to Finite Field/Galois
Field
Some Algebraic Concept
• Three basic algebraic concept
• Group
Group, 𝑮
• Ring
• Field
Ring, 𝑹

Field, 𝑭
Group, (𝐺,∘)
A group is a set of elements 𝐺 together with an operation ∘ which
combines two elements of 𝐺. A group has the following properties,

1. The group operation ∘ is closed. For all 𝑎, 𝑏 ∈ 𝐺 it hold that 𝑎 ∘ 𝑏 = 𝑐 ∈ 𝐺


2. The group operation ∘ is associative. That is , 𝑎 ∘ 𝑏 ∘ 𝑐 = 𝑎 ∘ 𝑏 ∘ 𝑐 for all
𝑎, 𝑏, 𝑐 ∈ 𝐺
3. There is an identity element 𝑒 ∈ 𝐺 such that for all 𝑎 ∈ 𝐺, 𝑎 ∘ 𝑒 = 𝑒 ∘ 𝑎
4. For each 𝑎 ∈ 𝐺, there exist an inverse element 𝑎−1 such that 𝑎 ∘ 𝑎−1 = 𝑒
Field , (𝐹, +,×)
A field 𝐹 is a set of elements with the following properties:

1. All element of 𝐹 form an additive group with the group operation " + “ and
identity 0.
2. All element of 𝐹 except 0 form a multiplicative group with the group operation
" × “ and identity 1.
3. When the two operation are mixed, the distributive law holds, i.e.
𝑎 𝑏 + 𝑐 = 𝑎𝑏 + 𝑎𝑐 , for all 𝑎, 𝑏, 𝑐 ∈ 𝐹
Finite Field in Cryptography
• Cryptography always work with finite field.
• Finite field is a field with finite elements.
• Also called as Galois Field.
• The size of field (the number of elements in such field) is called
cardinality or order.
Some example
1. FF with 5 elements denoted as 𝐺𝐹 5
2. FF with 11 elements denoted as 𝐺𝐹(11)
3. FF with 81 elements denoted as 𝐺𝐹 81 = 𝐺𝐹 34
4. FF with 256 elements denoted as 𝐺𝐹 256 = 𝐺𝐹 28

In general, finite field only exist with prime cardinality or prime power
cardinality.
𝐺𝐹(𝑝𝑚 )
Where 𝑝 is prime and 𝑚 ≥ 1
Prime Field
Prime Field
• Denoted as 𝐺𝐹(𝑝), where 𝑝 is prime.
𝐺𝐹 𝑝 = {0,1, . . , 𝑝 − 1}
• Prime number of element, 2,3,5,7…
• Arithmetic are done in modulo 𝑝 (modular arithmetic)
Another example
Consider a finite field with 5 elements
𝐺𝐹 5 = 0,1,2,3,4
• It can form a group under addition
• Also form a group under multiplication
• Distributive law hold.
Smallest Prime Field
• A very important prime field in symmetric cryptography is 𝐺𝐹 2 =
{0,1}
• Addition operation similar to XOR gate
• Multiplication operation similar to AND gate.
• Very important field in AES
Extension Field
𝑮𝑭(𝒑𝒎 )

𝑮𝑭 𝒑 , 𝑮𝑭(𝒑𝒎 ),
𝒎=𝟏 𝒎>𝟏

Prime Field Extension Field

In AES, we are interested with 𝑮𝑭(𝟐𝒎 )


Extension Field Arithmetic
The arithmetic is still modular, however, the method of computing are
very different.
1. Element representation
• Element in 𝐺𝐹(2𝑛 ) are represented as polynomial.
𝐴 𝑥 = 𝑎𝑛−1 𝑥 𝑛−1 + 𝑎𝑛−2 𝑥 𝑛−2 + ⋯ + 𝑎𝑛 + 𝑎0
where 𝐴 𝑥 ∈ 𝐺𝐹(2𝑛 ) and 𝑎𝑖 ∈ 𝐺𝐹 2 = {0,1}
2. Addition and Subtraction
• Use regular polynomial addition/subtraction where the coefficient are
computed in 𝐺𝐹 2 .
Extension Field Arithmetic
3. Multiplication in 𝐺𝐹(2𝑛 )
• Regular polynomial multiplication
• Coefficient in 𝐺𝐹 2𝑛
• Reduction using long division
4. Inversion in 𝐺𝐹 2𝑛
• The inverse must fulfilled 𝐴 𝑥 ∗ 𝐴 𝑥 −1 ≡ 1 𝑚𝑜𝑑 𝑃(𝑥)
Application in AES
Construction of S-Box
Process of construction

Affine
𝐺𝐹(28 ) inversion
transformation
Process of Construction
• Find the inverse
𝐴 𝑥 ∗ 𝐴 𝑥 −1 ≡ 1 𝑚𝑜𝑑 𝑃(𝑥)
for all 256 elements in 𝐺𝐹 28 using the arithmetic introduce in
finite field extension with respect to the following irreducible
polynomial
𝑝 𝑥 = 𝑥8 + 𝑥4 + 𝑥3 + 𝑥 + 1

Das könnte Ihnen auch gefallen