IBM 2 Computer Hardware User Manual


 
CCA Release 2.54 One_Way_Hash
One_Way_Hash (CSNBOWH)
Platform/
Product
OS/2 AIX Win NT/
2000
OS/400
IBM 4758-2/23 X X X X
The One_Way_Hash verb obtains a hash value from a text string using the MD5,
SHA-1, or RIPEMD-160 hashing methods, as you specify in the rule_array.
You can provide all of the data to be hashed in a single call to the verb, or you can
provide the data to be hashed using multiple calls. Keywords that you supply in the
rule_array inform the verb of your intention.
For the SHA-1 hash process, the verb hashes text strings of 8192 bytes or longer
using the Coprocessor hardware, with shorter text strings hashed by software in the
host computer. It is faster to process short text strings in the host computer, while
it is faster to process long strings in the Coprocessor.
The SHA-1 method is specified in FIPS 180-1, May 31, 1994. The MD5 method is
specified in RFC 1321, dated April 1992. The RIPEMD-160 method is an
outgrowth of the EU project RIPE (RACE Integrity Primitives Evaluation); further
information can be found on the Internet under “RIPEMD.”
Note: Hashing can also be performed using the MDC_Generate verb
(CSNCMDG) for the (MDC-2, MDC-4,) PADMDC-2, and PADMDC-4 methods.
Restrictions
If FIRST or MIDDLE calls are made, the text size must be a multiple of the
algorithm block size: 64 bytes.
This verb requires that text to be hashed be a multiple of eight bits aligned in bytes.
Only data that is a byte multiple can be hashed. (These are not requirements of
the standards.)
Format
CSNBOWH
return_code Output Integer
reason_code Output Integer
exit_data_length In/Output Integer
exit_data In/Output String exit_data_length bytes
rule_array_count Input Integer one or two
rule_array Input String
array
rule_array_count * 8 bytes
text_length Input Integer
text Input String text_length bytes
chaining_vector_length Input Integer 128 bytes
chaining_vector In/Output String chaining_vector_length bytes
hash_length Input Integer 16 or 20 bytes
hash In/Output String hash_length bytes
Chapter 4. Hashing and Digital Signatures
4-13