IBM 2 Computer Hardware User Manual


 
CCA Release 2.54 Random_Number_Generate
Random_Number_Generate (CSNBRNG)
Platform/
Product
OS/2 AIX Win NT/
2000
OS/400
IBM 4758-2/23 X X X X
The Random_Number_Generate verb generates a random number for use as an
initialization vector, clear key, or clear key-part.
You specify whether the random number is 64 bits, or 56 bits with the low-order bit
in each of the eight bytes adjusted for even or odd parity. The verb returns the
random number in an eight-byte binary field.
Because the Random_Number_Generate verb uses cryptographic processes, the
quality of the output is better than that which higher-level language compilers
typically supply.
Restrictions
None
Format
CSNBRNG
return_code Output Integer
reason_code Output Integer
exit_data_length In/Output Integer
exit_data In/Output String exit_data_length bytes
form Input String 8 bytes
random_number Output String 8 bytes
Parameters
For the definitions of the return_code, reason_code, exit_data_length, and exit_data
parameters, see “Parameters Common to All Verbs” on page 1-11.
form
The form parameter is a pointer to a string variable containing a keyword to
select the characteristic of the random number. The keyword is eight bytes in
length, and must be left-justified and padded on the right with space characters.
The keywords are shown below:
Figure 5-18. Key_Token_Build Form Keywords
Keyword Meaning
Generation type (one required)
RANDOM Requests the generation of a 64-bit random number.
ODD Requests the generation of a 56-bit, odd parity, random
number.
EVEN Requests the generation of a 56-bit, even parity, random
number.
Chapter 5. DES Key-Management 5-91