1
$\begingroup$

This is the image of matrix multiplication. It is the affine mapping step in the s box layer of AES. My value is not what it should be, therefore I just wanted it to be confirmed by someone else.

enter image description here

I'm getting $(11001000)$ as answer while it should be $(10000011)$; the value of my input is $(11111110)$.

$\endgroup$
  • $\begingroup$ Welcome to Cryptography. So what are your values? $\endgroup$ – kelalaka Mar 11 at 20:42
  • $\begingroup$ Should be, according to what references? Where did these matrices come from? Where did the expected answer come from? Your matrix arithmetic as presented is correct, so it seems if you're having trouble it must be elsewhere. $\endgroup$ – Squeamish Ossifrage Mar 11 at 21:19
1
$\begingroup$

After a small coding with the SageMath, these are the steps;

R = IntegerModRing(2)
A = Matrix(R,[
    [1,0,0,0,1,1,1,1],
    [1,1,0,0,0,1,1,1],
    [1,1,1,0,0,0,1,1],
    [1,1,1,1,0,0,0,1],
    [1,1,1,1,1,0,0,0],
    [0,1,1,1,1,1,0,0],
    [0,0,1,1,1,1,1,0],
    [0,0,0,1,1,1,1,1]])
B = Matrix(R,8,1,[1,1,1,1,1,1,1,0])
C = Matrix(R,8,1,[1,1,0,0,0,1,1,0])
D = A*B+C

The answer is

[1,1,0,0,1,0,0,0]

A is the 8x8 matrix, B is the column vector multiplied with A, C is the added vector and D is the result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.