<< NL_S_AESShiftRows NL_S: Security NL_S_AESSubBytes >>

NARVAL >> NL_S: Security > NL_S_AESShiftRowsR

NL_S_AESShiftRowsR

Shift each row of a 4x4 matrix to the right.

Calling Sequence

[R] = NL_S_AESShiftRowsR(S)

Arguments

S :

4x4 state matrix.

R :

Matrix.

Description

NL_S_AESShiftRowsR runs on each row of the 4x4 matrix S. Each row element is shifted to the right. The offset depends on the row index. | 1 2 3 4 | | 1 2 3 4 | | 1 2 3 4 | | 4 1 2 3 | | 1 2 3 4 | | 3 4 1 2 | | 1 2 3 4 | | 2 3 4 1 |

Examples

v=1:4;
S=[v;v;v;v]
[R]=NL_S_AESShiftRowsR(S)//application of NL_S_AESShiftRowsR

Report an issue
<< NL_S_AESShiftRows NL_S: Security NL_S_AESSubBytes >>