Re-encrypts ciphertext using DUKPT, symmetric, or asymmetric data encryption keys¶
Description¶
Re-encrypts ciphertext using DUKPT, symmetric, or asymmetric data encryption keys.
You can either generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey or import your own encryption key by calling ImportKey. The KeyArn for use with this operation must be in a compatible key state with KeyModesOfUse set to Encrypt.
This operation also supports dynamic keys, allowing you to pass a dynamic encryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To re-encrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped encryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide.
Amazon Web Services Payment Cryptography supports the following encryption key schemes:
- DUKPT:
TDESandAESalgorithms. To encrypt using DUKPT, a DUKPT key must already exist within your account withKeyModesOfUseset toDeriveKeyor a new DUKPT can be generated by calling CreateKey. - Symmetric:
TDESandAESalgorithms. - Asymmetric:
RSA. You can use anRSAkey on either the incoming or the outgoing side, paired with a symmetric key on the other side.
For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.
Cross-account use: This operation supports cross-account use when the key has a resource-based policy that grants access. For more information, see Resource-based policies.
Related operations:
Usage¶
paymentcryptographydataplane_re_encrypt_data(IncomingKeyIdentifier,
OutgoingKeyIdentifier, CipherText, IncomingEncryptionAttributes,
OutgoingEncryptionAttributes, IncomingWrappedKey, OutgoingWrappedKey)
Arguments¶
-
IncomingKeyIdentifier[required] The
keyARNof the encryption key of incoming ciphertext data.When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.
-
OutgoingKeyIdentifier[required] The
keyARNof the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography. -
CipherText[required] Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.
-
IncomingEncryptionAttributes[required] The attributes and values for incoming ciphertext.
-
OutgoingEncryptionAttributes[required] The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.
-
IncomingWrappedKeyThe WrappedKeyBlock containing the encryption key of incoming ciphertext data.
-
OutgoingWrappedKeyThe WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.
Value¶
A list with the following syntax:
Request syntax¶
svc$re_encrypt_data(
IncomingKeyIdentifier = "string",
OutgoingKeyIdentifier = "string",
CipherText = "string",
IncomingEncryptionAttributes = list(
Symmetric = list(
Mode = "ECB"|"CBC"|"CFB"|"CFB1"|"CFB8"|"CFB64"|"CFB128"|"OFB",
InitializationVector = "string",
PaddingType = "PKCS1"|"OAEP_SHA1"|"OAEP_SHA256"|"OAEP_SHA512"
),
Asymmetric = list(
PaddingType = "PKCS1"|"OAEP_SHA1"|"OAEP_SHA256"|"OAEP_SHA512"
),
Dukpt = list(
KeySerialNumber = "string",
Mode = "ECB"|"CBC",
DukptKeyDerivationType = "TDES_2KEY"|"TDES_3KEY"|"AES_128"|"AES_192"|"AES_256",
DukptKeyVariant = "BIDIRECTIONAL"|"REQUEST"|"RESPONSE",
InitializationVector = "string"
)
),
OutgoingEncryptionAttributes = list(
Symmetric = list(
Mode = "ECB"|"CBC"|"CFB"|"CFB1"|"CFB8"|"CFB64"|"CFB128"|"OFB",
InitializationVector = "string",
PaddingType = "PKCS1"|"OAEP_SHA1"|"OAEP_SHA256"|"OAEP_SHA512"
),
Asymmetric = list(
PaddingType = "PKCS1"|"OAEP_SHA1"|"OAEP_SHA256"|"OAEP_SHA512"
),
Dukpt = list(
KeySerialNumber = "string",
Mode = "ECB"|"CBC",
DukptKeyDerivationType = "TDES_2KEY"|"TDES_3KEY"|"AES_128"|"AES_192"|"AES_256",
DukptKeyVariant = "BIDIRECTIONAL"|"REQUEST"|"RESPONSE",
InitializationVector = "string"
)
),
IncomingWrappedKey = list(
WrappedKeyMaterial = list(
Tr31KeyBlock = "string",
DiffieHellmanSymmetricKey = list(
CertificateAuthorityPublicKeyIdentifier = "string",
PublicKeyCertificate = "string",
KeyAlgorithm = "TDES_2KEY"|"TDES_3KEY"|"AES_128"|"AES_192"|"AES_256"|"HMAC_SHA256"|"HMAC_SHA384"|"HMAC_SHA512"|"HMAC_SHA224",
KeyDerivationFunction = "NIST_SP800"|"ANSI_X963",
KeyDerivationHashAlgorithm = "SHA_256"|"SHA_384"|"SHA_512",
SharedInformation = "string"
)
),
KeyCheckValueAlgorithm = "CMAC"|"ANSI_X9_24"|"HMAC"|"SHA_1"
),
OutgoingWrappedKey = list(
WrappedKeyMaterial = list(
Tr31KeyBlock = "string",
DiffieHellmanSymmetricKey = list(
CertificateAuthorityPublicKeyIdentifier = "string",
PublicKeyCertificate = "string",
KeyAlgorithm = "TDES_2KEY"|"TDES_3KEY"|"AES_128"|"AES_192"|"AES_256"|"HMAC_SHA256"|"HMAC_SHA384"|"HMAC_SHA512"|"HMAC_SHA224",
KeyDerivationFunction = "NIST_SP800"|"ANSI_X963",
KeyDerivationHashAlgorithm = "SHA_256"|"SHA_384"|"SHA_512",
SharedInformation = "string"
)
),
KeyCheckValueAlgorithm = "CMAC"|"ANSI_X9_24"|"HMAC"|"SHA_1"
)
)