PKA Key Translate (CSNDPKT)

Use the PKA Key Translate verb to translate an RSA key in a PKA key-token using an output format specified by the input rule array. The RSA key to be translated is provided in a source PKA key-token that contains a private-key section, and the translated key is returned in the buffer identified by the target_key_token parameter. If the source key is in an external key-token, the source transport key must be in an operational CCA or TR-31 DES key-token.

This verb changes only Private Internal PKA Key Tokens.

The source CCA RSA key token must be wrapped with a transport key encrypting key (KEK). The XLATE bit must also be turned on in the key usage byte of the source token. The source token is unwrapped using the specified source transport KEK. The target key token is wrapped with the specified target transport KEK. Existing information in the target token is overwritten.

There are four types of output formatting available described in the subsequent sections. The first type is an external-to-external translation of an RSA key to one of three smart card formats. The second is an external-to-external or internal-to-internal translation of an RSA key to a target PKA key-token that is protected by a CCA or TR-31 AES transport key or an APKA master key. The third is an external-to-external translation of an RSA key to one of three EMV formats. The fourth is an external-to-external translation of an external RSA or ECC private key to an AES wrapped (PKCS #11) object.

Target smart card formats

To use this verb to translate an RSA key into a smart-card format, do the following:

  • Specify one of the following rule-array keywords for the smart-card format to apply to the target key:
    SCVISA
    Specifies translation of an RSA private-key to the Visa proprietary format. This format is defined in Visa Smart Debit/Credit Technical Guide to Visa Applets for GlobalPlatform Cards and Visa Smart Debit Credit Personalization Guide for GlobalPlatform Cards.
    SCCOMME
    Specifies translation of an RSA private-key to the common Modulus-Exponent (M-E) format. This format is defined in Visa Smart Debit/Credit Technical Guide to Visa Applets for GlobalPlatform Cards.
    SCCOMCRT
    Specifies translation of an RSA private-key to the common Chinese-Remainder Theorem (CRT) format. This format is defined in Visa Smart Debit/Credit Technical Guide to Visa Applets for GlobalPlatform Cards.
    Note:
    1. Translation from an M-E format to a CRT format is not supported.
    2. Translation from a CRT format to an M-E format is not supported.
    3. Export - Export an ECC, CRYSTALS-Dilithium, CRYSTALS-Kyber, ML-KEM or ML-DSA key from a CCA internal key token to the AESKW key-formatting external format, wrapped by a CCA or TR-31 AES key encrypting key (see also AESKW key format for external keys).
  • Specify the source key identifier of an external PKA key-token that has been protected by an operational CCA or TR-31 DES transport key to be translated. The RSA private key for smart card output formats SCVISA, SCCOMME, and SCCOMCRT must have translation control of XLATE-OK (offset 50 in the private-key section).
  • Specify the source transport key identifier of an operational CCA or TR-31 DES transport key (EXPORTER or IMPORTER) to be used to unwrap the source key.
  • Specify the target transport key identifier of an operational CCA or TR-31 DES transport key to be used to wrap the unwrapped source key. The control vector of the target transport key must have CV bit 22 = B'1' (XLATE).
    Note: Translation using an EXPORTER source transport key and an IMPORTER target transport key is not allowed.
  • Specify the buffer of the target key token, to receive the returned external TDES-wrapped PKA key-token.

The verb builds the target external key-token using the chosen smart card format as follows:

  1. The external RSA source key-token is unwrapped using the operational CCA or TR-31 DES source transport key..
  2. The unwrapped key material is formatted into the specified target smart-card format.
  3. The formatted key-material is TDES encrypted in ECB mode using the operational CCA or TR-31 DES target transport key.
  4. The formatted and encrypted key material is written to the buffer identified by the target_key_token parameter, and the target key token length is updated.

Target AES-protected formats

To use this verb to translate an RSA key into an AES-protected format, specify:

  • One of the following rule-array keywords for the AES-protected format to apply to the target key:
    EXTDWAKW
    specifies translation of an RSA key in an external TDES-wrapped (CCA or TR-31 DES transport key) RSA key-token into an external AESKW-wrapped RSA key-token
    INTDWAKW
    specifies translation of an RSA key in an internal TDES-wrapped (PKA master key) RSA key-token into an internal AESKW-wrapped (APKA master key) PKA key-token.
    Note: An AESKW-wrapped key is protected at a higher level than a TDES-wrapped key.
  • The source key identifier of a PKA key-token to be translated, either in an external key-token that has been protected by an operational CCA or TR-31 DES transport key to be translated, or an internal key-token that has been protected by a PKA master key.
  • Source key is in an external PKA key-token:

    The source transport key identifier of an operational CCA or TR-31 DES transport key (EXPORTER or IMPORTER) to be used to unwrap the source key. The control vector of the source transport key does not require the XLATE bit on.

    The target transport key identifier of an operational CCA or TR-31 AES transport key to be used to wrap the OPK data of the target key-token. In addition, the key usage fields must have the algorithm wrap control set so that the key can wrap or unwrap RSA keys (WR-RSA).

    The buffer of the target key-token, to receive the external RSA key-token with AES-wrapped OPK.

  • Source key is in an internal PKA key-token:

    Set the source transport key identifier length to 0 or identify a null key-token as the source transport key.

    Set the target transport key identifier length to 0 or identify a null key-token as the target transport key.

    The buffer of the target key-token, to receive the internal PKA key-token with APKA-wrapped OPK.

The verb builds the target external key-token using the chosen AES-protected format as follows:

  1. The source key-token is unwrapped using the source transport key or a PKA master-key, as appropriate.
  2. The unwrapped key material is wrapped using the AES OPK of the target key-token. The OPK in turn is wrapped by the AES key from the target transport key if the target key is external, or the APKA master key if the target key is internal.
  3. The completed external or internal key-token is written to the key token buffer identified by the target_key_token parameter, and the target key token length is updated.

Target EMV formats

To use this verb to translate an RSA key into an EMV format, specify one of the following rule_array keywords for the EMV format to apply to the target key:

EMVCRT
specifies the translation of an RSA CRT private-key to an EMV CRT format and wrapped using TDES-ECB
EMVDDA
specifies the translation of an RSA CRT private-key to an EMV DDA format and wrapped using TDES-CBC
EMVDDAE
specifies the translation of an RSA CRT private-key to an EMV DDA format and wrapped using TDES-ECB.

Notes:

  1. This verb supports PCI-HSM 2016 compliant-tagged key tokens.
  2. The PKA source key-token must have a private key section of X'08', and the bit length of the modulus must be 512 - 2040.

Target RSA-AES-protected (PKCS #11) format

To use this verb to translate an external RSA private key or an ECC private key into an AES wrapped PKCS #11 format, specify:

  • the rule array keyword: CKM-RAKW
  • the source_key: An external CCA key token containing an RSA or ECC private key .
  • source_transport_key: The KEK that currently wraps source key.
  • target_transport_key: The RSA public key used to wrap the AES ephemeral key that will wrap the target key.

The target transport key is an RSA public key corresponding to an RSA key pair that the customer generates in the key vault where the target key will be imported. This KEK must be an RSA public key with a modulus length of 4096-bits, 3072-bits, or 2048-bits. See the key exchange partner documentation for their requirements.

The CKM-RAKW keyword generates an ephemeral AES key, formats and wraps the external RSA or ECC private key with the ephemeral AES key, formats and wraps the ephemeral AES key with the source transport RSA public key, and returns the resulting structure in the target_key_token parameter. The output structure corresponds to the output from PKCS #11 mechanism called CKM_RSA_AES_KEY_WRAP.

This verb does not need to document any Usage notes.