Parameters
The parameters for CSNDPKD.
For the definitions of the return_code, reason_code, exit_data_length, and exit_data parameters, see Parameters common to all verbs.
- rule_array_count
-
A pointer to an integer variable containing the number of elements in the rule_array variable. This value must be 1, 2, or 3.
Direction: Input Type: Integer - rule_array
-
The keyword that provides control information to the verb. The keyword is left-aligned in an 8-byte field and padded on the right with blanks. The rule_array keywords are described in Table 1.
Direction: Input Type: String array Table 1. Keywords for PKA Decrypt control information Keyword Description Recovery method (one required). Specifies the method to use to recover the key value. PKCS-1.2 Specifies that the key is formatted as defined in the RSA PKCS #1 v2.0 standard for the RSAES-PKCS1-v1_5 encryption/decryption scheme. Formerly known as the block-type 02 method. See PKCS #1 hash formats. This method is deprecated and should not be used for any new development. PKCSOAEP Specifies that the key is formatted as defined in the RSA PKCS #1 v2.0 standard for the RSAES-OAEP encryption/decryption scheme. See PKCS #1 hash formats. PKOAEP2 Specifies that the key is formatted as defined in the RSA PKCS #1 v2.1 standard for the RSAES-OAEP encryption/decryption scheme. See PKCS #1 hash formats. ZERO-PAD The input PKA_enciphered_keyvalue is decrypted using the private key. The entire result (including leading zeros) is returned in the target_keyvalue parameter. For PKA keys, the PKA_key_identifier must be an RSA or CRYSTALS-Kyber token, or the label of such a token. Required when the PKA_key_identifier is a CRYSTALS-Kyber private key. This method is deprecated and should not be used for any new development.
Hash method (one required for PKCSOAEP and PKOAEP2. Not allowed for any other recovery method). SHA-1 Specifies to use the SHA-1 hash method to calculate the OAEP message hash. SHA-224 Specifies to use the SHA-224 hash method to calculate the OAEP message hash. Only valid with keyword PKOAEP2. SHA-256 Specifies to use the SHA-256 hash method to calculate the OAEP message hash. SHA-384 Specifies to use the SHA-384 hash method to calculate the OAEP message hash. Only valid with keyword PKOAEP2. SHA-512 Specifies to use the SHA-512 hash method to calculate the OAEP message hash. Only valid with keyword PKOAEP2. Mask Generation Function Method (one, optional). Available for PKOAEP2 Formatting method only. Requires CCA releases 7.5 or 8.2. Default is to match the Hash method). MSHA-1 Specifies to use the SHA-1 MGF method to calculate the OAEP mask. MSHA-224 Specifies to use the SHA-224 MGF method to calculate the OAEP mask. MSHA-256 Specifies to use the SHA-256 MGF method to calculate the OAEP mask. MSHA-384 Specifies to use the SHA-384 MGF method to calculate the OAEP mask. MSHA-512 Specifies to use the SHA-512 MGF method to calculate the OAEP mask. Constant time behavior (one optional for PKCS-1.2, PKCSOAEP, PKOAEP2. Not allowed for any other recovery method) CONSTTME Specifies that there should be no runtime differences between requests with formatting errors and those without errors. This is the default. NCNSTTME Specifies that runtime differences are allowed between requests with formatting errors and those without errors. - PKA_enciphered_keyvalue_length
-
The length of the PKA_enciphered_keyvalue parameter in bytes. The maximum size that can be generated when the PKA_key_identifier is an RSA key is 512 bytes. The length should be the same as the modulus length of the key_identifier. When the PKA_key_identifier is a CRYSTALS-Kyber private key, the maximum size is 1568 bytes.
Direction: Input Type: Integer - PKA_enciphered_keyvalue
-
This field contains the key value protected under a public key. This byte-length string is left-aligned within the PKA_enciphered_keyvalue parameter.
Direction: Input Type: String - data_structure_length
-
This value must be 0.
Direction: Input Type: Integer - data_structure
-
This parameter is ignored.
Direction: Input Type: String - PKA_key_identifier_length
-
The length of the PKA_key_identifier parameter. When the PKA_key_identifier is a key label, this field specifies the length of the label. The maximum size that you can specify is 3500 bytes.
Direction: Input Type: Integer - PKA_key_identifier
-
Direction: Input Type: String For PKA keys, an internal private key token, the label of an internal private key token, or an external private key token containing a clear private key.
For RSA keys, the key may be in modulus-exponent or Chinese Remainder Theorem format. For secure PKCS #11 keys, this is the 44-byte handle of the private key, prefixed with an EBCDIC equal sign character (‘=’ or x’7E’), and padded on the right with spaces for a total length of 64 bytes. The corresponding public key was used to wrap the key value.
Also, a CRYSTALS-Kyber private key may be specified. The CRYSTALS-Kyber private key usage attributes must allow data encipherment (using the U-DATENC keyword with the CSNDPKB service).
- target_keyvalue_length
-
The length of the target_keyvalue parameter. The maximum size that can be generated is 512 bytes. On return, this field is updated with the actual length of target_keyvalue.
Direction: Input/Output Type: Integer If keyword ZERO-PAD is specified, this length is the same as the PKA_enciphered_keyvalue_length which is equal to the RSA modulus byte length.
When the PKA_key_identifier contains a CRYSTALS-Kyber private key, the returned length is 32 bytes.
- target_keyvalue
-
This field will contain the decrypted, parsed key value. If ZERO-PAD is specified, the decrypted key value, including leading zeros, will be returned.
Direction: Output Type: String