Cryptography Reference
In-Depth Information
are swapped and the sum of these two elements (modulo M = 2 m ) is assigned
to S[i].
Input:
1. Secret key array K[0...N −1].
2. Precomputed random array a[0...N −1].
Output: Scrambled array S[0...N −1].
Initialization:
for i = 0,...,N −1 do
S[i] = a i ;
j = 0;
end
Scrambling:
for i = 0,...,N −1 do
j = (j + S[i] + K[i]) mod N;
Swap(S[i],S[j]);
S[i] = (S[i] + S[j]) mod M;
end
Algorithm 9.2.1: NGG KSA
In the PRGA phase, a pseudo-random element is sent to output and im-
mediately after that it is changed by an addition (modulo M) of two other
elements from the array S.
Input: Key-dependent scrambled array S[0...N −1].
Output: Pseudo-random keystream bytes z.
Initialization:
i = j = 0;
Output Keystream Generation Loop:
i = (i + 1) mod N;
j = (j + S[i]) mod N;
Swap(S[i], S[j]);
Output z = S [(S[i] + S[j]) mod M) mod N];
S [((S[i] + S[j]) mod M) mod N] = (S[i] + S[j]) mod M;
Algorithm 9.2.2: NGG PRGA
Another version of NGG was introduced in [63] and came to be known as
the GGHN cipher. In GGHN, in addition to i,j, a third variable k is used
to increase the security of the cipher. k is initialized in the KSA and is key
dependent. Number of KSA loop repetitions r depends on the parameters
n,m. For example, for n = 8 and m = 32, r is taken to be 20.
Search WWH ::




Custom Search