Journal of Applied Mathematics / 2014 / Article / Alg 2

Research Article

A Matrix PRNG with S-Box Output Filtering

Algorithm 2

for c:= 0 to 3 {
j:= 0
for i:= 0 to 255 {
j  :=  (j  +  s[i] + key[i % 16]) % 256
t:= s[i]
s[i]:= s[j]
s[j]:= t
}
for i:= 0 to 255
S0[i]:= (S0[i]<<8) s[i]
}