# How to find the right additive polynomial in inverse affine transformation in AES

Addition polynomial affine transformation rijndael is (x^7 + x^6 + x^2 + x)

The affine transformation represented in A(x)

A(x) = (x^7 + x^6 + x^2 + x) + a(x)(x^7 + x^6 + x^5 + x^4 + 1)mod x^8 + 1

Inverse of the multiplication can be found easily is (01001010) (x^6 + x^3 + x^1), so how to get the addition polynomial inverse affine transformation ? it should be (01010000) (x^6 + x^4)

The inverse affine transformation represented in B(x)

B(x) = (x^6 + x^4) + a(x)(x^6 + x^3 + x^1)mod x^8 + 1

• the additive polynomial is being xored, since xored operation is self inverse, u just need to xor the same additive polynomial in inverse operation. Commented Dec 23, 2017 at 17:17
• What operations should be done to get the polynomial (x^6 + x^4) ? i don't understand xoring what with what ? Commented Dec 23, 2017 at 17:40
• I am writing the answer Commented Dec 23, 2017 at 17:52

The Affine Transformation for AES Sbox is given by

Let M b the 8x8 binary matrix and C be the affine additive constant then

B = M x A xor C --------------- (1)

The straight forward reverse to this transformation is

A = M-1 * ( B xor C ) --------------- (2)

Where as the inverse of Affine Transformation is given as

Let D be the additive constant used in above inverse affine transformation then

A = ( M-1 x B ) xor D --------------- (3)

Place value of B from (1) in (3)

A = ( ( M-1 x (M x A xor C ) ) xor D

A = ( ( M-1 x M x A) xor ( M-1 x C ) ) xor D

Multiplying M with M-1 will be Identity, thus

A = A xor (M-1 x C) xor D

this implies

D = M-1 x C

and thats how the additive constant in inverse affine transformation have been calculated.

in fact it is