MDC Generate (CSNBMDG)
Use this verb to create a 128-bit hash value (Modification Detection Code) on a data string whose integrity you intend to confirm.
- Specify the two-encipherment or four-encipherment version of the algorithm.
- Segment your text into a series of verb calls.
- Use the default or a keyed-hash algorithm.
The user must enable the MDC Generate command (offset X'008A') with a Trusted Key Entry (TKE) workstation before using this verb.
For a description of the MDC calculations, see Modification Detection Code calculation.
Specifying two or four encipherments: Four encipherments per algorithm round improve security; two encipherments per algorithm round improve performance. To specify the number of encipherments, use the MDC-2, MDC-4, PADMDC-2, or PADMDC-4 keyword with the rule_array parameter. Two encipherments create results that differ from four encipherments; ensure that the same number of encipherments are used to verify the MDC.
Segmenting text: This verb lets you segment text into a series of verb calls. If you can present all of the data to be hashed in a single invocation of the verb (32 MB) of data, use the rule_array keyword ONLY. Alternatively, you can segment your text and present the segments with a series of verb calls. Use the rule_array keywords and LAST for the first and last segments. If more than two segments are used, specify the rule_array keyword MIDDLE for the additional segments.
Between verb calls, unprocessed text data and intermediate information from the partial MDC calculation is stored in the chaining_vector variable and the MDC key in the mdc variable. During segmented processing, the application program must not change the data in either of these variables.
- On the first call to the verb, place the non-null key into the mdc variable.
- Ensure that the chaining_vector variable is set to null (18 bytes of X'00').
- Decide if the text will be processed in a single segment or multiple
segments.
- For a single segment of text, use the LAST keyword.
- For multiple segments of text, begin with the MIDDLE keyword and continue using the MIDDLE keyword up to the final segment of text. For the final segment, use the LAST keyword.
As with the default key, you must not alter the value of the mdc or chaining_vector variables between calls.
This verb does not need to document any Usage notes.