Cryptography Reference
In-Depth Information
AESCrypt_l (rstate->XAES, &rstate->RandAESWorksp,
&rstate->RandAESSched, rstate->XAES, 24);
Generation of a random value via application of the function
ψ ( k, x, i ):= x/ 2 8 · (23 ( i mod 16)) mod 2 8
ψ : S
S,
rbyte = rstate->XAES[(rstate->RoundAES)++ & 15];
Key update if the parameter is set and the prescribed number of rounds is reached
if (rstate->UpdateKeyAES)
{
if (0 == (rstate->RoundAES % rstate->UpdateKeyAES))
{
for (i = 0; i < 32; i++)
{
rstate->RandAESKey[i] ˆ = rstate->XAES[i];
}
AESInit_l (&rstate->RandAESWorksp, AES_ECB, 192, NULL,
&rstate->RandAESSched, rstate->RandAESKey, 256, AES_ENC);
}
}
return rbyte;
}
Random values r_l in the interval 2 l 1
r_l 2 l
1 are specified with the
function RandAES_l() , whose function header is given here:
generation of a random number of type CLINT
Function:
int
RandAES_1 (CLINT r_l, STATEAES *rstate, int l);
Syntax:
rstate (internal state of the pseudorandom number generator)
l (number of binary digits of the number to be generated)
Input:
r_l (random number in the interval 2 l 1
r_l 2 l
1 )
Ouput:
E_CLINT_OK if all O.K.
E_CLING_RIN if the generator is not initialized
Return:
 
Search WWH ::




Custom Search