<< NL_S_RSAKeysE NL_S: Security NL_T: Topology >>

NARVAL >> NL_S: Security > NL_S_ShiftRows

NL_S_ShiftRows

Shift each row of a 4x4 matrix.

Calling Sequence

[R] = NL_S_ShiftRows(S,D)

Arguments

S :

4x4 state matrix.

D :

Direction.

R :

Matrix.

Description

NL_S_ShiftRows runs on each row of the 4x4 matrix S. Each row element is shifted to the left (D=0) or right (D=1). The offset depends on the row index.

Examples

v=1:4;
S=[v;v;v;v];
[L]=NL_S_ShiftRows(S,0)//application of NL_S_ShiftRows
[R]=NL_S_ShiftRows(S,1)//application of NL_S_ShiftRows

Report an issue
<< NL_S_RSAKeysE NL_S: Security NL_T: Topology >>