Cryptography Reference
In-Depth Information
Input:
1. S[0...255]: a permutation over Z 256 .
2. j: an integer in Z 256 .
Output:
1. The scrambled permutation S[0...255].
2. Updated j.
for i = 0 to 511 do
j = (j + S[i mod 256]) mod 256 ;
Swap(S[i],S[j]);
end
Temp2 = S;
S = Temp1◦Temp2◦Temp1;
Return(S,j);
Algorithm 9.3.2: RC4-Hash: The function OWT((S,j))
Input:
1. S[0...255]: a permutation over Z 256 .
2. j: an integer in Z 256 .
Output: An l-byte hash value.
for i = 1 to l do
j = (j + S[i]) mod 256 ;
Swap(S[i],S[j]);
Output = S[(S[i] + S[j]) mod 256] ;
end
Algorithm 9.3.3: RC4-Hash: The function HBG l ((S,j))
Search WWH ::




Custom Search