paymentcryptographydata.d.ts 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. interface Blob {}
  8. declare class PaymentCryptographyData extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: PaymentCryptographyData.Types.ClientConfiguration)
  13. config: Config & PaymentCryptographyData.Types.ClientConfiguration;
  14. /**
  15. * Decrypts ciphertext data to plaintext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Decrypt data in the Amazon Web Services Payment Cryptography User Guide. You can use an encryption key generated within Amazon Web Services Payment Cryptography, or you can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Decrypt. In asymmetric decryption, Amazon Web Services Payment Cryptography decrypts the ciphertext using the private component of the asymmetric encryption key pair. For data encryption outside of Amazon Web Services Payment Cryptography, you can export the public component of the asymmetric key pair by calling GetPublicCertificate. For symmetric and DUKPT decryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV decryption, Amazon Web Services Payment Cryptography supports TDES algorithms. For asymmetric decryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the ciphertext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the ciphertext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. 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 can't be used across different Amazon Web Services accounts. Related operations: EncryptData GetPublicCertificate ImportKey
  16. */
  17. decryptData(params: PaymentCryptographyData.Types.DecryptDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.DecryptDataOutput) => void): Request<PaymentCryptographyData.Types.DecryptDataOutput, AWSError>;
  18. /**
  19. * Decrypts ciphertext data to plaintext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Decrypt data in the Amazon Web Services Payment Cryptography User Guide. You can use an encryption key generated within Amazon Web Services Payment Cryptography, or you can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Decrypt. In asymmetric decryption, Amazon Web Services Payment Cryptography decrypts the ciphertext using the private component of the asymmetric encryption key pair. For data encryption outside of Amazon Web Services Payment Cryptography, you can export the public component of the asymmetric key pair by calling GetPublicCertificate. For symmetric and DUKPT decryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV decryption, Amazon Web Services Payment Cryptography supports TDES algorithms. For asymmetric decryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the ciphertext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the ciphertext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. 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 can't be used across different Amazon Web Services accounts. Related operations: EncryptData GetPublicCertificate ImportKey
  20. */
  21. decryptData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.DecryptDataOutput) => void): Request<PaymentCryptographyData.Types.DecryptDataOutput, AWSError>;
  22. /**
  23. * Encrypts plaintext data to ciphertext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide. You can generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey. You can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Encrypt. In asymmetric encryption, plaintext is encrypted using public component. You can import the public component of an asymmetric key pair created outside Amazon Web Services Payment Cryptography by calling ImportKey. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV encryption, Amazon Web Services Payment Cryptography supports TDES algorithms.For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the plaintext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the plaintext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. To encrypt using DUKPT, you must already have a BDK (Base Derivation Key) key in your account with KeyModesOfUse set to DeriveKey, or you can generate a new DUKPT key by calling CreateKey. To encrypt using EMV, you must already have an IMK (Issuer Master Key) key in your account with KeyModesOfUse set to DeriveKey. 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 can't be used across different Amazon Web Services accounts. Related operations: DecryptData GetPublicCertificate ImportKey ReEncryptData
  24. */
  25. encryptData(params: PaymentCryptographyData.Types.EncryptDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.EncryptDataOutput) => void): Request<PaymentCryptographyData.Types.EncryptDataOutput, AWSError>;
  26. /**
  27. * Encrypts plaintext data to ciphertext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide. You can generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey. You can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Encrypt. In asymmetric encryption, plaintext is encrypted using public component. You can import the public component of an asymmetric key pair created outside Amazon Web Services Payment Cryptography by calling ImportKey. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV encryption, Amazon Web Services Payment Cryptography supports TDES algorithms.For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the plaintext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the plaintext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. To encrypt using DUKPT, you must already have a BDK (Base Derivation Key) key in your account with KeyModesOfUse set to DeriveKey, or you can generate a new DUKPT key by calling CreateKey. To encrypt using EMV, you must already have an IMK (Issuer Master Key) key in your account with KeyModesOfUse set to DeriveKey. 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 can't be used across different Amazon Web Services accounts. Related operations: DecryptData GetPublicCertificate ImportKey ReEncryptData
  28. */
  29. encryptData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.EncryptDataOutput) => void): Request<PaymentCryptographyData.Types.EncryptDataOutput, AWSError>;
  30. /**
  31. * Generates card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2), or Card Security Codes (CSC). For more information, see Generate card data in the Amazon Web Services Payment Cryptography User Guide. This operation generates a CVV or CSC value that is printed on a payment credit or debit card during card production. The CVV or CSC, PAN (Primary Account Number) and expiration date of the card are required to check its validity during transaction processing. To begin this operation, a CVK (Card Verification Key) encryption key is required. You can use CreateKey or ImportKey to establish a CVK within Amazon Web Services Payment Cryptography. The KeyModesOfUse should be set to Generate and Verify for a CVK encryption key. 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 can't be used across different Amazon Web Services accounts. Related operations: ImportKey VerifyCardValidationData
  32. */
  33. generateCardValidationData(params: PaymentCryptographyData.Types.GenerateCardValidationDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.GenerateCardValidationDataOutput) => void): Request<PaymentCryptographyData.Types.GenerateCardValidationDataOutput, AWSError>;
  34. /**
  35. * Generates card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2), or Card Security Codes (CSC). For more information, see Generate card data in the Amazon Web Services Payment Cryptography User Guide. This operation generates a CVV or CSC value that is printed on a payment credit or debit card during card production. The CVV or CSC, PAN (Primary Account Number) and expiration date of the card are required to check its validity during transaction processing. To begin this operation, a CVK (Card Verification Key) encryption key is required. You can use CreateKey or ImportKey to establish a CVK within Amazon Web Services Payment Cryptography. The KeyModesOfUse should be set to Generate and Verify for a CVK encryption key. 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 can't be used across different Amazon Web Services accounts. Related operations: ImportKey VerifyCardValidationData
  36. */
  37. generateCardValidationData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.GenerateCardValidationDataOutput) => void): Request<PaymentCryptographyData.Types.GenerateCardValidationDataOutput, AWSError>;
  38. /**
  39. * Generates a Message Authentication Code (MAC) cryptogram within Amazon Web Services Payment Cryptography. You can use this operation to authenticate card-related data by using known data values to generate MAC for data validation between the sending and receiving parties. This operation uses message data, a secret encryption key and MAC algorithm to generate a unique MAC value for transmission. The receiving party of the MAC must use the same message data, secret encryption key and MAC algorithm to reproduce another MAC value for comparision. You can use this operation to generate a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. The MAC generation encryption key must have valid values for KeyUsage such as TR31_M7_HMAC_KEY for HMAC generation, and they key must have KeyModesOfUse set to Generate and Verify. 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 can't be used across different Amazon Web Services accounts. Related operations: VerifyMac
  40. */
  41. generateMac(params: PaymentCryptographyData.Types.GenerateMacInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.GenerateMacOutput) => void): Request<PaymentCryptographyData.Types.GenerateMacOutput, AWSError>;
  42. /**
  43. * Generates a Message Authentication Code (MAC) cryptogram within Amazon Web Services Payment Cryptography. You can use this operation to authenticate card-related data by using known data values to generate MAC for data validation between the sending and receiving parties. This operation uses message data, a secret encryption key and MAC algorithm to generate a unique MAC value for transmission. The receiving party of the MAC must use the same message data, secret encryption key and MAC algorithm to reproduce another MAC value for comparision. You can use this operation to generate a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. The MAC generation encryption key must have valid values for KeyUsage such as TR31_M7_HMAC_KEY for HMAC generation, and they key must have KeyModesOfUse set to Generate and Verify. 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 can't be used across different Amazon Web Services accounts. Related operations: VerifyMac
  44. */
  45. generateMac(callback?: (err: AWSError, data: PaymentCryptographyData.Types.GenerateMacOutput) => void): Request<PaymentCryptographyData.Types.GenerateMacOutput, AWSError>;
  46. /**
  47. * Generates pin-related data such as PIN, PIN Verification Value (PVV), PIN Block, and PIN Offset during new card issuance or reissuance. For more information, see Generate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation generates PIN, PVV, or PIN Offset and then encrypts it using Pin Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. This operation uses a separate Pin Verification Key (PVK) for VISA PVV generation. 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 can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData TranslatePinData VerifyPinData
  48. */
  49. generatePinData(params: PaymentCryptographyData.Types.GeneratePinDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.GeneratePinDataOutput) => void): Request<PaymentCryptographyData.Types.GeneratePinDataOutput, AWSError>;
  50. /**
  51. * Generates pin-related data such as PIN, PIN Verification Value (PVV), PIN Block, and PIN Offset during new card issuance or reissuance. For more information, see Generate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation generates PIN, PVV, or PIN Offset and then encrypts it using Pin Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. This operation uses a separate Pin Verification Key (PVK) for VISA PVV generation. 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 can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData TranslatePinData VerifyPinData
  52. */
  53. generatePinData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.GeneratePinDataOutput) => void): Request<PaymentCryptographyData.Types.GeneratePinDataOutput, AWSError>;
  54. /**
  55. * Re-encrypt ciphertext using DUKPT, Symmetric and 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. In asymmetric encryption, ciphertext is encrypted using public component (imported by calling ImportKey) of the asymmetric key pair created outside of Amazon Web Services Payment Cryptography. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA. To encrypt using DUKPT, a DUKPT key must already exist within your account with KeyModesOfUse set to DeriveKey or a new DUKPT can be generated by calling CreateKey. 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 can't be used across different Amazon Web Services accounts. Related operations: DecryptData EncryptData GetPublicCertificate ImportKey
  56. */
  57. reEncryptData(params: PaymentCryptographyData.Types.ReEncryptDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.ReEncryptDataOutput) => void): Request<PaymentCryptographyData.Types.ReEncryptDataOutput, AWSError>;
  58. /**
  59. * Re-encrypt ciphertext using DUKPT, Symmetric and 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. In asymmetric encryption, ciphertext is encrypted using public component (imported by calling ImportKey) of the asymmetric key pair created outside of Amazon Web Services Payment Cryptography. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA. To encrypt using DUKPT, a DUKPT key must already exist within your account with KeyModesOfUse set to DeriveKey or a new DUKPT can be generated by calling CreateKey. 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 can't be used across different Amazon Web Services accounts. Related operations: DecryptData EncryptData GetPublicCertificate ImportKey
  60. */
  61. reEncryptData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.ReEncryptDataOutput) => void): Request<PaymentCryptographyData.Types.ReEncryptDataOutput, AWSError>;
  62. /**
  63. * Translates encrypted PIN block from and to ISO 9564 formats 0,1,3,4. For more information, see Translate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN block translation involves changing the encrytion of PIN block from one encryption key to another encryption key and changing PIN block format from one to another without PIN block data leaving Amazon Web Services Payment Cryptography. The encryption key transformation can be from PEK (Pin Encryption Key) to BDK (Base Derivation Key) for DUKPT or from BDK for DUKPT to PEK. Amazon Web Services Payment Cryptography supports TDES and AES key derivation type for DUKPT translations. The allowed combinations of PIN block format translations are guided by PCI. It is important to note that not all encrypted PIN block formats (example, format 1) require PAN (Primary Account Number) as input. And as such, PIN block format that requires PAN (example, formats 0,3,4) cannot be translated to a format (format 1) that does not require a PAN for generation. 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. Amazon Web Services Payment Cryptography currently supports ISO PIN block 4 translation for PIN block built using legacy PAN length. That is, PAN is the right most 12 digits excluding the check digits. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData VerifyPinData
  64. */
  65. translatePinData(params: PaymentCryptographyData.Types.TranslatePinDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.TranslatePinDataOutput) => void): Request<PaymentCryptographyData.Types.TranslatePinDataOutput, AWSError>;
  66. /**
  67. * Translates encrypted PIN block from and to ISO 9564 formats 0,1,3,4. For more information, see Translate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN block translation involves changing the encrytion of PIN block from one encryption key to another encryption key and changing PIN block format from one to another without PIN block data leaving Amazon Web Services Payment Cryptography. The encryption key transformation can be from PEK (Pin Encryption Key) to BDK (Base Derivation Key) for DUKPT or from BDK for DUKPT to PEK. Amazon Web Services Payment Cryptography supports TDES and AES key derivation type for DUKPT translations. The allowed combinations of PIN block format translations are guided by PCI. It is important to note that not all encrypted PIN block formats (example, format 1) require PAN (Primary Account Number) as input. And as such, PIN block format that requires PAN (example, formats 0,3,4) cannot be translated to a format (format 1) that does not require a PAN for generation. 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. Amazon Web Services Payment Cryptography currently supports ISO PIN block 4 translation for PIN block built using legacy PAN length. That is, PAN is the right most 12 digits excluding the check digits. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData VerifyPinData
  68. */
  69. translatePinData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.TranslatePinDataOutput) => void): Request<PaymentCryptographyData.Types.TranslatePinDataOutput, AWSError>;
  70. /**
  71. * Verifies Authorization Request Cryptogram (ARQC) for a EMV chip payment card authorization. For more information, see Verify auth request cryptogram in the Amazon Web Services Payment Cryptography User Guide. ARQC generation is done outside of Amazon Web Services Payment Cryptography and is typically generated on a point of sale terminal for an EMV chip card to obtain payment authorization during transaction time. For ARQC verification, you must first import the ARQC generated outside of Amazon Web Services Payment Cryptography by calling ImportKey. This operation uses the imported ARQC and an major encryption key (DUKPT) created by calling CreateKey to either provide a boolean ARQC verification result or provide an APRC (Authorization Response Cryptogram) response using Method 1 or Method 2. The ARPC_METHOD_1 uses AuthResponseCode to generate ARPC and ARPC_METHOD_2 uses CardStatusUpdate to generate ARPC. 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 can't be used across different Amazon Web Services accounts. Related operations: VerifyCardValidationData VerifyPinData
  72. */
  73. verifyAuthRequestCryptogram(params: PaymentCryptographyData.Types.VerifyAuthRequestCryptogramInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyAuthRequestCryptogramOutput) => void): Request<PaymentCryptographyData.Types.VerifyAuthRequestCryptogramOutput, AWSError>;
  74. /**
  75. * Verifies Authorization Request Cryptogram (ARQC) for a EMV chip payment card authorization. For more information, see Verify auth request cryptogram in the Amazon Web Services Payment Cryptography User Guide. ARQC generation is done outside of Amazon Web Services Payment Cryptography and is typically generated on a point of sale terminal for an EMV chip card to obtain payment authorization during transaction time. For ARQC verification, you must first import the ARQC generated outside of Amazon Web Services Payment Cryptography by calling ImportKey. This operation uses the imported ARQC and an major encryption key (DUKPT) created by calling CreateKey to either provide a boolean ARQC verification result or provide an APRC (Authorization Response Cryptogram) response using Method 1 or Method 2. The ARPC_METHOD_1 uses AuthResponseCode to generate ARPC and ARPC_METHOD_2 uses CardStatusUpdate to generate ARPC. 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 can't be used across different Amazon Web Services accounts. Related operations: VerifyCardValidationData VerifyPinData
  76. */
  77. verifyAuthRequestCryptogram(callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyAuthRequestCryptogramOutput) => void): Request<PaymentCryptographyData.Types.VerifyAuthRequestCryptogramOutput, AWSError>;
  78. /**
  79. * Verifies card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2) and Card Security Codes (CSC). For more information, see Verify card data in the Amazon Web Services Payment Cryptography User Guide. This operation validates the CVV or CSC codes that is printed on a payment credit or debit card during card payment transaction. The input values are typically provided as part of an inbound transaction to an issuer or supporting platform partner. Amazon Web Services Payment Cryptography uses CVV or CSC, PAN (Primary Account Number) and expiration date of the card to check its validity during transaction processing. In this operation, the CVK (Card Verification Key) encryption key for use with card data verification is same as the one in used for GenerateCardValidationData. 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 can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData VerifyAuthRequestCryptogram VerifyPinData
  80. */
  81. verifyCardValidationData(params: PaymentCryptographyData.Types.VerifyCardValidationDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyCardValidationDataOutput) => void): Request<PaymentCryptographyData.Types.VerifyCardValidationDataOutput, AWSError>;
  82. /**
  83. * Verifies card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2) and Card Security Codes (CSC). For more information, see Verify card data in the Amazon Web Services Payment Cryptography User Guide. This operation validates the CVV or CSC codes that is printed on a payment credit or debit card during card payment transaction. The input values are typically provided as part of an inbound transaction to an issuer or supporting platform partner. Amazon Web Services Payment Cryptography uses CVV or CSC, PAN (Primary Account Number) and expiration date of the card to check its validity during transaction processing. In this operation, the CVK (Card Verification Key) encryption key for use with card data verification is same as the one in used for GenerateCardValidationData. 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 can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData VerifyAuthRequestCryptogram VerifyPinData
  84. */
  85. verifyCardValidationData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyCardValidationDataOutput) => void): Request<PaymentCryptographyData.Types.VerifyCardValidationDataOutput, AWSError>;
  86. /**
  87. * Verifies a Message Authentication Code (MAC). You can use this operation to verify MAC for message data authentication such as . In this operation, you must use the same message data, secret encryption key and MAC algorithm that was used to generate MAC. You can use this operation to verify a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. 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 can't be used across different Amazon Web Services accounts. Related operations: GenerateMac
  88. */
  89. verifyMac(params: PaymentCryptographyData.Types.VerifyMacInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyMacOutput) => void): Request<PaymentCryptographyData.Types.VerifyMacOutput, AWSError>;
  90. /**
  91. * Verifies a Message Authentication Code (MAC). You can use this operation to verify MAC for message data authentication such as . In this operation, you must use the same message data, secret encryption key and MAC algorithm that was used to generate MAC. You can use this operation to verify a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. 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 can't be used across different Amazon Web Services accounts. Related operations: GenerateMac
  92. */
  93. verifyMac(callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyMacOutput) => void): Request<PaymentCryptographyData.Types.VerifyMacOutput, AWSError>;
  94. /**
  95. * Verifies pin-related data such as PIN and PIN Offset using algorithms including VISA PVV and IBM3624. For more information, see Verify PIN data in the Amazon Web Services Payment Cryptography User Guide. This operation verifies PIN data for user payment card. A card holder PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation uses PIN Verification Key (PVK) for PIN or PIN Offset generation and then encrypts it using PIN Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. 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 can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData TranslatePinData
  96. */
  97. verifyPinData(params: PaymentCryptographyData.Types.VerifyPinDataInput, callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyPinDataOutput) => void): Request<PaymentCryptographyData.Types.VerifyPinDataOutput, AWSError>;
  98. /**
  99. * Verifies pin-related data such as PIN and PIN Offset using algorithms including VISA PVV and IBM3624. For more information, see Verify PIN data in the Amazon Web Services Payment Cryptography User Guide. This operation verifies PIN data for user payment card. A card holder PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation uses PIN Verification Key (PVK) for PIN or PIN Offset generation and then encrypts it using PIN Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. 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 can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData TranslatePinData
  100. */
  101. verifyPinData(callback?: (err: AWSError, data: PaymentCryptographyData.Types.VerifyPinDataOutput) => void): Request<PaymentCryptographyData.Types.VerifyPinDataOutput, AWSError>;
  102. }
  103. declare namespace PaymentCryptographyData {
  104. export interface AmexCardSecurityCodeVersion1 {
  105. /**
  106. * The expiry date of a payment card.
  107. */
  108. CardExpiryDate: NumberLengthEquals4;
  109. }
  110. export interface AmexCardSecurityCodeVersion2 {
  111. /**
  112. * The expiry date of a payment card.
  113. */
  114. CardExpiryDate: NumberLengthEquals4;
  115. /**
  116. * The service code of the AMEX payment card. This is different from the Card Security Code (CSC).
  117. */
  118. ServiceCode: NumberLengthEquals3;
  119. }
  120. export interface AsymmetricEncryptionAttributes {
  121. /**
  122. * The padding to be included with the data.
  123. */
  124. PaddingType?: PaddingType;
  125. }
  126. export interface CardGenerationAttributes {
  127. AmexCardSecurityCodeVersion1?: AmexCardSecurityCodeVersion1;
  128. /**
  129. * Card data parameters that are required to generate a Card Security Code (CSC2) for an AMEX payment card.
  130. */
  131. AmexCardSecurityCodeVersion2?: AmexCardSecurityCodeVersion2;
  132. /**
  133. * Card data parameters that are required to generate a cardholder verification value for the payment card.
  134. */
  135. CardHolderVerificationValue?: CardHolderVerificationValue;
  136. /**
  137. * Card data parameters that are required to generate Card Verification Value (CVV) for the payment card.
  138. */
  139. CardVerificationValue1?: CardVerificationValue1;
  140. /**
  141. * Card data parameters that are required to generate Card Verification Value (CVV2) for the payment card.
  142. */
  143. CardVerificationValue2?: CardVerificationValue2;
  144. /**
  145. * Card data parameters that are required to generate CDynamic Card Verification Code (dCVC) for the payment card.
  146. */
  147. DynamicCardVerificationCode?: DynamicCardVerificationCode;
  148. /**
  149. * Card data parameters that are required to generate CDynamic Card Verification Value (dCVV) for the payment card.
  150. */
  151. DynamicCardVerificationValue?: DynamicCardVerificationValue;
  152. }
  153. export interface CardHolderVerificationValue {
  154. /**
  155. * The transaction counter value that comes from a point of sale terminal.
  156. */
  157. ApplicationTransactionCounter: HexLengthBetween2And4;
  158. /**
  159. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  160. */
  161. PanSequenceNumber: HexLengthEquals2;
  162. /**
  163. * A random number generated by the issuer.
  164. */
  165. UnpredictableNumber: HexLengthBetween2And8;
  166. }
  167. export interface CardVerificationAttributes {
  168. AmexCardSecurityCodeVersion1?: AmexCardSecurityCodeVersion1;
  169. /**
  170. * Card data parameters that are required to verify a Card Security Code (CSC2) for an AMEX payment card.
  171. */
  172. AmexCardSecurityCodeVersion2?: AmexCardSecurityCodeVersion2;
  173. /**
  174. * Card data parameters that are required to verify a cardholder verification value for the payment card.
  175. */
  176. CardHolderVerificationValue?: CardHolderVerificationValue;
  177. /**
  178. * Card data parameters that are required to verify Card Verification Value (CVV) for the payment card.
  179. */
  180. CardVerificationValue1?: CardVerificationValue1;
  181. /**
  182. * Card data parameters that are required to verify Card Verification Value (CVV2) for the payment card.
  183. */
  184. CardVerificationValue2?: CardVerificationValue2;
  185. /**
  186. * Card data parameters that are required to verify CDynamic Card Verification Code (dCVC) for the payment card.
  187. */
  188. DiscoverDynamicCardVerificationCode?: DiscoverDynamicCardVerificationCode;
  189. /**
  190. * Card data parameters that are required to verify CDynamic Card Verification Code (dCVC) for the payment card.
  191. */
  192. DynamicCardVerificationCode?: DynamicCardVerificationCode;
  193. /**
  194. * Card data parameters that are required to verify CDynamic Card Verification Value (dCVV) for the payment card.
  195. */
  196. DynamicCardVerificationValue?: DynamicCardVerificationValue;
  197. }
  198. export interface CardVerificationValue1 {
  199. /**
  200. * The expiry date of a payment card.
  201. */
  202. CardExpiryDate: NumberLengthEquals4;
  203. /**
  204. * The service code of the payment card. This is different from Card Security Code (CSC).
  205. */
  206. ServiceCode: NumberLengthEquals3;
  207. }
  208. export interface CardVerificationValue2 {
  209. /**
  210. * The expiry date of a payment card.
  211. */
  212. CardExpiryDate: NumberLengthEquals4;
  213. }
  214. export interface CryptogramAuthResponse {
  215. /**
  216. * Parameters that are required for ARPC response generation using method1 after ARQC verification is successful.
  217. */
  218. ArpcMethod1?: CryptogramVerificationArpcMethod1;
  219. /**
  220. * Parameters that are required for ARPC response generation using method2 after ARQC verification is successful.
  221. */
  222. ArpcMethod2?: CryptogramVerificationArpcMethod2;
  223. }
  224. export interface CryptogramVerificationArpcMethod1 {
  225. /**
  226. * The auth code used to calculate APRC after ARQC verification is successful. This is the same auth code used for ARQC generation outside of Amazon Web Services Payment Cryptography.
  227. */
  228. AuthResponseCode: HexLengthEquals4;
  229. }
  230. export interface CryptogramVerificationArpcMethod2 {
  231. /**
  232. * The data indicating whether the issuer approves or declines an online transaction using an EMV chip card.
  233. */
  234. CardStatusUpdate: HexLengthEquals8;
  235. /**
  236. * The proprietary authentication data used by issuer for communication during online transaction using an EMV chip card.
  237. */
  238. ProprietaryAuthenticationData?: HexLengthBetween1And16;
  239. }
  240. export interface DecryptDataInput {
  241. /**
  242. * The ciphertext to decrypt.
  243. */
  244. CipherText: HexEvenLengthBetween16And4096;
  245. /**
  246. * The encryption key type and attributes for ciphertext decryption.
  247. */
  248. DecryptionAttributes: EncryptionDecryptionAttributes;
  249. /**
  250. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for ciphertext decryption.
  251. */
  252. KeyIdentifier: KeyArnOrKeyAliasType;
  253. }
  254. export interface DecryptDataOutput {
  255. /**
  256. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for ciphertext decryption.
  257. */
  258. KeyArn: KeyArn;
  259. /**
  260. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  261. */
  262. KeyCheckValue: KeyCheckValue;
  263. /**
  264. * The decrypted plaintext data in hexBinary format.
  265. */
  266. PlainText: HexEvenLengthBetween16And4096;
  267. }
  268. export interface DiscoverDynamicCardVerificationCode {
  269. /**
  270. * The transaction counter value that comes from the terminal.
  271. */
  272. ApplicationTransactionCounter: HexLengthBetween2And4;
  273. /**
  274. * The expiry date of a payment card.
  275. */
  276. CardExpiryDate: NumberLengthEquals4;
  277. /**
  278. * A random number that is generated by the issuer.
  279. */
  280. UnpredictableNumber: HexLengthBetween2And8;
  281. }
  282. export interface DukptAttributes {
  283. /**
  284. * The key type derived using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY.
  285. */
  286. DukptDerivationType: DukptDerivationType;
  287. /**
  288. * The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter.
  289. */
  290. KeySerialNumber: HexLengthBetween10And24;
  291. }
  292. export interface DukptDerivationAttributes {
  293. /**
  294. * The key type derived using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY
  295. */
  296. DukptKeyDerivationType?: DukptDerivationType;
  297. /**
  298. * The type of use of DUKPT, which can be for incoming data decryption, outgoing data encryption, or both.
  299. */
  300. DukptKeyVariant?: DukptKeyVariant;
  301. /**
  302. * The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter.
  303. */
  304. KeySerialNumber: HexLengthBetween10And24;
  305. }
  306. export type DukptDerivationType = "TDES_2KEY"|"TDES_3KEY"|"AES_128"|"AES_192"|"AES_256"|string;
  307. export interface DukptEncryptionAttributes {
  308. /**
  309. * The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY
  310. */
  311. DukptKeyDerivationType?: DukptDerivationType;
  312. /**
  313. * The type of use of DUKPT, which can be incoming data decryption, outgoing data encryption, or both.
  314. */
  315. DukptKeyVariant?: DukptKeyVariant;
  316. /**
  317. * An input used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero.
  318. */
  319. InitializationVector?: HexLength16Or32;
  320. /**
  321. * The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter.
  322. */
  323. KeySerialNumber: HexLengthBetween10And24;
  324. /**
  325. * The block cipher method to use for encryption. The default is CBC.
  326. */
  327. Mode?: DukptEncryptionMode;
  328. }
  329. export type DukptEncryptionMode = "ECB"|"CBC"|string;
  330. export type DukptKeyVariant = "BIDIRECTIONAL"|"REQUEST"|"RESPONSE"|string;
  331. export interface DynamicCardVerificationCode {
  332. /**
  333. * The transaction counter value that comes from the terminal.
  334. */
  335. ApplicationTransactionCounter: HexLengthBetween2And4;
  336. /**
  337. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  338. */
  339. PanSequenceNumber: HexLengthEquals2;
  340. /**
  341. * The data on the two tracks of magnetic cards used for financial transactions. This includes the cardholder name, PAN, expiration date, bank ID (BIN) and several other numbers the issuing bank uses to validate the data received.
  342. */
  343. TrackData: HexLengthBetween2And160;
  344. /**
  345. * A random number generated by the issuer.
  346. */
  347. UnpredictableNumber: HexLengthBetween2And8;
  348. }
  349. export interface DynamicCardVerificationValue {
  350. /**
  351. * The transaction counter value that comes from the terminal.
  352. */
  353. ApplicationTransactionCounter: HexLengthBetween2And4;
  354. /**
  355. * The expiry date of a payment card.
  356. */
  357. CardExpiryDate: NumberLengthEquals4;
  358. /**
  359. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  360. */
  361. PanSequenceNumber: HexLengthEquals2;
  362. /**
  363. * The service code of the payment card. This is different from Card Security Code (CSC).
  364. */
  365. ServiceCode: NumberLengthEquals3;
  366. }
  367. export interface EmvEncryptionAttributes {
  368. /**
  369. * An input used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero.
  370. */
  371. InitializationVector?: HexLength16Or32;
  372. /**
  373. * The EMV derivation mode to use for ICC master key derivation as per EMV version 4.3 book 2.
  374. */
  375. MajorKeyDerivationMode: EmvMajorKeyDerivationMode;
  376. /**
  377. * The block cipher method to use for encryption.
  378. */
  379. Mode?: EmvEncryptionMode;
  380. /**
  381. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  382. */
  383. PanSequenceNumber: HexLengthEquals2;
  384. /**
  385. * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  386. */
  387. PrimaryAccountNumber: NumberLengthBetween12And19;
  388. /**
  389. * The derivation value used to derive the ICC session key. It is typically the application transaction counter value padded with zeros or previous ARQC value padded with zeros as per EMV version 4.3 book 2.
  390. */
  391. SessionDerivationData: HexLengthEquals16;
  392. }
  393. export type EmvEncryptionMode = "ECB"|"CBC"|string;
  394. export type EmvMajorKeyDerivationMode = "EMV_OPTION_A"|"EMV_OPTION_B"|string;
  395. export interface EncryptDataInput {
  396. /**
  397. * The encryption key type and attributes for plaintext encryption.
  398. */
  399. EncryptionAttributes: EncryptionDecryptionAttributes;
  400. /**
  401. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
  402. */
  403. KeyIdentifier: KeyArnOrKeyAliasType;
  404. /**
  405. * The plaintext to be encrypted. For encryption using asymmetric keys, plaintext data length is constrained by encryption key strength that you define in KeyAlgorithm and padding type that you define in AsymmetricEncryptionAttributes. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide.
  406. */
  407. PlainText: HexEvenLengthBetween16And4064;
  408. }
  409. export interface EncryptDataOutput {
  410. /**
  411. * The encrypted ciphertext.
  412. */
  413. CipherText: HexEvenLengthBetween16And4096;
  414. /**
  415. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
  416. */
  417. KeyArn: KeyArn;
  418. /**
  419. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  420. */
  421. KeyCheckValue?: KeyCheckValue;
  422. }
  423. export interface EncryptionDecryptionAttributes {
  424. Asymmetric?: AsymmetricEncryptionAttributes;
  425. Dukpt?: DukptEncryptionAttributes;
  426. /**
  427. * Parameters for plaintext encryption using EMV keys.
  428. */
  429. Emv?: EmvEncryptionAttributes;
  430. /**
  431. * Parameters that are required to perform encryption and decryption using symmetric keys.
  432. */
  433. Symmetric?: SymmetricEncryptionAttributes;
  434. }
  435. export type EncryptionMode = "ECB"|"CBC"|"CFB"|"CFB1"|"CFB8"|"CFB64"|"CFB128"|"OFB"|string;
  436. export interface GenerateCardValidationDataInput {
  437. /**
  438. * The algorithm for generating CVV or CSC values for the card within Amazon Web Services Payment Cryptography.
  439. */
  440. GenerationAttributes: CardGenerationAttributes;
  441. /**
  442. * The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to generate card data.
  443. */
  444. KeyIdentifier: KeyArnOrKeyAliasType;
  445. /**
  446. * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
  447. */
  448. PrimaryAccountNumber: NumberLengthBetween12And19;
  449. /**
  450. * The length of the CVV or CSC to be generated. The default value is 3.
  451. */
  452. ValidationDataLength?: IntegerRangeBetween3And5Type;
  453. }
  454. export interface GenerateCardValidationDataOutput {
  455. /**
  456. * The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to generate CVV or CSC.
  457. */
  458. KeyArn: KeyArn;
  459. /**
  460. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  461. */
  462. KeyCheckValue: KeyCheckValue;
  463. /**
  464. * The CVV or CSC value that Amazon Web Services Payment Cryptography generates for the card.
  465. */
  466. ValidationData: NumberLengthBetween3And5;
  467. }
  468. export interface GenerateMacInput {
  469. /**
  470. * The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.
  471. */
  472. GenerationAttributes: MacAttributes;
  473. /**
  474. * The keyARN of the MAC generation encryption key.
  475. */
  476. KeyIdentifier: KeyArnOrKeyAliasType;
  477. /**
  478. * The length of a MAC under generation.
  479. */
  480. MacLength?: IntegerRangeBetween4And16;
  481. /**
  482. * The data for which a MAC is under generation. This value must be hexBinary.
  483. */
  484. MessageData: HexEvenLengthBetween2And4096;
  485. }
  486. export interface GenerateMacOutput {
  487. /**
  488. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for MAC generation.
  489. */
  490. KeyArn: KeyArn;
  491. /**
  492. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  493. */
  494. KeyCheckValue: KeyCheckValue;
  495. /**
  496. * The MAC cryptogram generated within Amazon Web Services Payment Cryptography.
  497. */
  498. Mac: HexLengthBetween4And128;
  499. }
  500. export interface GeneratePinDataInput {
  501. /**
  502. * The keyARN of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block.
  503. */
  504. EncryptionKeyIdentifier: KeyArnOrKeyAliasType;
  505. /**
  506. * The attributes and values to use for PIN, PVV, or PIN Offset generation.
  507. */
  508. GenerationAttributes: PinGenerationAttributes;
  509. /**
  510. * The keyARN of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.
  511. */
  512. GenerationKeyIdentifier: KeyArnOrKeyAliasType;
  513. /**
  514. * The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports ISO_Format_0 and ISO_Format_3. The ISO_Format_0 PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length. The ISO_Format_3 PIN block format is the same as ISO_Format_0 except that the fill digits are random values from 10 to 15.
  515. */
  516. PinBlockFormat: PinBlockFormatForPinData;
  517. /**
  518. * The length of PIN under generation.
  519. */
  520. PinDataLength?: IntegerRangeBetween4And12;
  521. /**
  522. * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
  523. */
  524. PrimaryAccountNumber: NumberLengthBetween12And19;
  525. }
  526. export interface GeneratePinDataOutput {
  527. /**
  528. * The PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.
  529. */
  530. EncryptedPinBlock: HexLengthBetween16And32;
  531. /**
  532. * The keyARN of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation.
  533. */
  534. EncryptionKeyArn: KeyArn;
  535. /**
  536. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  537. */
  538. EncryptionKeyCheckValue: KeyCheckValue;
  539. /**
  540. * The keyARN of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.
  541. */
  542. GenerationKeyArn: KeyArn;
  543. /**
  544. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  545. */
  546. GenerationKeyCheckValue: KeyCheckValue;
  547. /**
  548. * The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.
  549. */
  550. PinData: PinData;
  551. }
  552. export type HexEvenLengthBetween16And32 = string;
  553. export type HexEvenLengthBetween16And4064 = string;
  554. export type HexEvenLengthBetween16And4096 = string;
  555. export type HexEvenLengthBetween2And4096 = string;
  556. export type HexEvenLengthBetween4And128 = string;
  557. export type HexLength16Or32 = string;
  558. export type HexLengthBetween10And24 = string;
  559. export type HexLengthBetween16And32 = string;
  560. export type HexLengthBetween1And16 = string;
  561. export type HexLengthBetween2And1024 = string;
  562. export type HexLengthBetween2And160 = string;
  563. export type HexLengthBetween2And4 = string;
  564. export type HexLengthBetween2And8 = string;
  565. export type HexLengthBetween4And128 = string;
  566. export type HexLengthEquals1 = string;
  567. export type HexLengthEquals16 = string;
  568. export type HexLengthEquals2 = string;
  569. export type HexLengthEquals4 = string;
  570. export type HexLengthEquals8 = string;
  571. export interface Ibm3624NaturalPin {
  572. /**
  573. * The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.
  574. */
  575. DecimalizationTable: NumberLengthEquals16;
  576. /**
  577. * The unique data for cardholder identification.
  578. */
  579. PinValidationData: NumberLengthBetween4And16;
  580. /**
  581. * The padding character for validation data.
  582. */
  583. PinValidationDataPadCharacter: HexLengthEquals1;
  584. }
  585. export interface Ibm3624PinFromOffset {
  586. /**
  587. * The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.
  588. */
  589. DecimalizationTable: NumberLengthEquals16;
  590. /**
  591. * The PIN offset value.
  592. */
  593. PinOffset: NumberLengthBetween4And12;
  594. /**
  595. * The unique data for cardholder identification.
  596. */
  597. PinValidationData: NumberLengthBetween4And16;
  598. /**
  599. * The padding character for validation data.
  600. */
  601. PinValidationDataPadCharacter: HexLengthEquals1;
  602. }
  603. export interface Ibm3624PinOffset {
  604. /**
  605. * The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.
  606. */
  607. DecimalizationTable: NumberLengthEquals16;
  608. /**
  609. * The encrypted PIN block data. According to ISO 9564 standard, a PIN Block is an encoded representation of a payment card Personal Account Number (PAN) and the cardholder Personal Identification Number (PIN).
  610. */
  611. EncryptedPinBlock: HexLengthBetween16And32;
  612. /**
  613. * The unique data for cardholder identification.
  614. */
  615. PinValidationData: NumberLengthBetween4And16;
  616. /**
  617. * The padding character for validation data.
  618. */
  619. PinValidationDataPadCharacter: HexLengthEquals1;
  620. }
  621. export interface Ibm3624PinVerification {
  622. /**
  623. * The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.
  624. */
  625. DecimalizationTable: NumberLengthEquals16;
  626. /**
  627. * The PIN offset value.
  628. */
  629. PinOffset: NumberLengthBetween4And12;
  630. /**
  631. * The unique data for cardholder identification.
  632. */
  633. PinValidationData: NumberLengthBetween4And16;
  634. /**
  635. * The padding character for validation data.
  636. */
  637. PinValidationDataPadCharacter: HexLengthEquals1;
  638. }
  639. export interface Ibm3624RandomPin {
  640. /**
  641. * The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.
  642. */
  643. DecimalizationTable: NumberLengthEquals16;
  644. /**
  645. * The unique data for cardholder identification.
  646. */
  647. PinValidationData: NumberLengthBetween4And16;
  648. /**
  649. * The padding character for validation data.
  650. */
  651. PinValidationDataPadCharacter: HexLengthEquals1;
  652. }
  653. export type IntegerRangeBetween0And9 = number;
  654. export type IntegerRangeBetween3And5Type = number;
  655. export type IntegerRangeBetween4And12 = number;
  656. export type IntegerRangeBetween4And16 = number;
  657. export type KeyArn = string;
  658. export type KeyArnOrKeyAliasType = string;
  659. export type KeyCheckValue = string;
  660. export type MacAlgorithm = "ISO9797_ALGORITHM1"|"ISO9797_ALGORITHM3"|"CMAC"|"HMAC_SHA224"|"HMAC_SHA256"|"HMAC_SHA384"|"HMAC_SHA512"|string;
  661. export interface MacAlgorithmDukpt {
  662. /**
  663. * The key type derived using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY.
  664. */
  665. DukptDerivationType?: DukptDerivationType;
  666. /**
  667. * The type of use of DUKPT, which can be MAC generation, MAC verification, or both.
  668. */
  669. DukptKeyVariant: DukptKeyVariant;
  670. /**
  671. * The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter.
  672. */
  673. KeySerialNumber: HexLengthBetween10And24;
  674. }
  675. export interface MacAlgorithmEmv {
  676. /**
  677. * The method to use when deriving the master key for EMV MAC generation or verification.
  678. */
  679. MajorKeyDerivationMode: MajorKeyDerivationMode;
  680. /**
  681. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  682. */
  683. PanSequenceNumber: HexLengthEquals2;
  684. /**
  685. * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  686. */
  687. PrimaryAccountNumber: NumberLengthBetween12And19;
  688. /**
  689. * The method of deriving a session key for EMV MAC generation or verification.
  690. */
  691. SessionKeyDerivationMode: SessionKeyDerivationMode;
  692. /**
  693. * Parameters that are required to generate session key for EMV generation and verification.
  694. */
  695. SessionKeyDerivationValue: SessionKeyDerivationValue;
  696. }
  697. export interface MacAttributes {
  698. /**
  699. * The encryption algorithm for MAC generation or verification.
  700. */
  701. Algorithm?: MacAlgorithm;
  702. /**
  703. * Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.
  704. */
  705. DukptCmac?: MacAlgorithmDukpt;
  706. /**
  707. * Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.
  708. */
  709. DukptIso9797Algorithm1?: MacAlgorithmDukpt;
  710. /**
  711. * Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.
  712. */
  713. DukptIso9797Algorithm3?: MacAlgorithmDukpt;
  714. /**
  715. * Parameters that are required for MAC generation or verification using EMV MAC algorithm.
  716. */
  717. EmvMac?: MacAlgorithmEmv;
  718. }
  719. export type MajorKeyDerivationMode = "EMV_OPTION_A"|"EMV_OPTION_B"|string;
  720. export type NumberLengthBetween12And19 = string;
  721. export type NumberLengthBetween3And5 = string;
  722. export type NumberLengthBetween4And12 = string;
  723. export type NumberLengthBetween4And16 = string;
  724. export type NumberLengthEquals16 = string;
  725. export type NumberLengthEquals3 = string;
  726. export type NumberLengthEquals4 = string;
  727. export type PaddingType = "PKCS1"|"OAEP_SHA1"|"OAEP_SHA256"|"OAEP_SHA512"|string;
  728. export type PinBlockFormatForPinData = "ISO_FORMAT_0"|"ISO_FORMAT_3"|string;
  729. export interface PinData {
  730. /**
  731. * The PIN offset value.
  732. */
  733. PinOffset?: NumberLengthBetween4And12;
  734. /**
  735. * The unique data to identify a cardholder. In most cases, this is the same as cardholder's Primary Account Number (PAN). If a value is not provided, it defaults to PAN.
  736. */
  737. VerificationValue?: NumberLengthBetween4And12;
  738. }
  739. export interface PinGenerationAttributes {
  740. /**
  741. * Parameters that are required to generate or verify Ibm3624 natural PIN.
  742. */
  743. Ibm3624NaturalPin?: Ibm3624NaturalPin;
  744. /**
  745. * Parameters that are required to generate or verify Ibm3624 PIN from offset PIN.
  746. */
  747. Ibm3624PinFromOffset?: Ibm3624PinFromOffset;
  748. /**
  749. * Parameters that are required to generate or verify Ibm3624 PIN offset PIN.
  750. */
  751. Ibm3624PinOffset?: Ibm3624PinOffset;
  752. /**
  753. * Parameters that are required to generate or verify Ibm3624 random PIN.
  754. */
  755. Ibm3624RandomPin?: Ibm3624RandomPin;
  756. /**
  757. * Parameters that are required to generate or verify Visa PIN.
  758. */
  759. VisaPin?: VisaPin;
  760. /**
  761. * Parameters that are required to generate or verify Visa PIN Verification Value (PVV).
  762. */
  763. VisaPinVerificationValue?: VisaPinVerificationValue;
  764. }
  765. export interface PinVerificationAttributes {
  766. /**
  767. * Parameters that are required to generate or verify Ibm3624 PIN.
  768. */
  769. Ibm3624Pin?: Ibm3624PinVerification;
  770. /**
  771. * Parameters that are required to generate or verify Visa PIN.
  772. */
  773. VisaPin?: VisaPinVerification;
  774. }
  775. export interface ReEncryptDataInput {
  776. /**
  777. * Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.
  778. */
  779. CipherText: HexEvenLengthBetween16And4096;
  780. /**
  781. * The attributes and values for incoming ciphertext.
  782. */
  783. IncomingEncryptionAttributes: ReEncryptionAttributes;
  784. /**
  785. * The keyARN of the encryption key of incoming ciphertext data.
  786. */
  787. IncomingKeyIdentifier: KeyArnOrKeyAliasType;
  788. /**
  789. * The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.
  790. */
  791. OutgoingEncryptionAttributes: ReEncryptionAttributes;
  792. /**
  793. * The keyARN of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.
  794. */
  795. OutgoingKeyIdentifier: KeyArnOrKeyAliasType;
  796. }
  797. export interface ReEncryptDataOutput {
  798. /**
  799. * The encrypted ciphertext.
  800. */
  801. CipherText: HexEvenLengthBetween16And4096;
  802. /**
  803. * The keyARN (Amazon Resource Name) of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
  804. */
  805. KeyArn: KeyArn;
  806. /**
  807. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  808. */
  809. KeyCheckValue: KeyCheckValue;
  810. }
  811. export interface ReEncryptionAttributes {
  812. Dukpt?: DukptEncryptionAttributes;
  813. /**
  814. * Parameters that are required to encrypt data using symmetric keys.
  815. */
  816. Symmetric?: SymmetricEncryptionAttributes;
  817. }
  818. export interface SessionKeyAmex {
  819. /**
  820. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  821. */
  822. PanSequenceNumber: HexLengthEquals2;
  823. /**
  824. * The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  825. */
  826. PrimaryAccountNumber: NumberLengthBetween12And19;
  827. }
  828. export interface SessionKeyDerivation {
  829. /**
  830. * Parameters to derive session key for an Amex payment card for ARQC verification.
  831. */
  832. Amex?: SessionKeyAmex;
  833. /**
  834. * Parameters to derive session key for an Emv2000 payment card for ARQC verification.
  835. */
  836. Emv2000?: SessionKeyEmv2000;
  837. /**
  838. * Parameters to derive session key for an Emv common payment card for ARQC verification.
  839. */
  840. EmvCommon?: SessionKeyEmvCommon;
  841. /**
  842. * Parameters to derive session key for a Mastercard payment card for ARQC verification.
  843. */
  844. Mastercard?: SessionKeyMastercard;
  845. /**
  846. * Parameters to derive session key for a Visa payment cardfor ARQC verification.
  847. */
  848. Visa?: SessionKeyVisa;
  849. }
  850. export type SessionKeyDerivationMode = "EMV_COMMON_SESSION_KEY"|"EMV2000"|"AMEX"|"MASTERCARD_SESSION_KEY"|"VISA"|string;
  851. export interface SessionKeyDerivationValue {
  852. /**
  853. * The cryptogram provided by the terminal during transaction processing.
  854. */
  855. ApplicationCryptogram?: HexLengthEquals16;
  856. /**
  857. * The transaction counter that is provided by the terminal during transaction processing.
  858. */
  859. ApplicationTransactionCounter?: HexLengthBetween2And4;
  860. }
  861. export interface SessionKeyEmv2000 {
  862. /**
  863. * The transaction counter that is provided by the terminal during transaction processing.
  864. */
  865. ApplicationTransactionCounter: HexLengthBetween2And4;
  866. /**
  867. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  868. */
  869. PanSequenceNumber: HexLengthEquals2;
  870. /**
  871. * The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  872. */
  873. PrimaryAccountNumber: NumberLengthBetween12And19;
  874. }
  875. export interface SessionKeyEmvCommon {
  876. /**
  877. * The transaction counter that is provided by the terminal during transaction processing.
  878. */
  879. ApplicationTransactionCounter: HexLengthBetween2And4;
  880. /**
  881. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  882. */
  883. PanSequenceNumber: HexLengthEquals2;
  884. /**
  885. * The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  886. */
  887. PrimaryAccountNumber: NumberLengthBetween12And19;
  888. }
  889. export interface SessionKeyMastercard {
  890. /**
  891. * The transaction counter that is provided by the terminal during transaction processing.
  892. */
  893. ApplicationTransactionCounter: HexLengthBetween2And4;
  894. /**
  895. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  896. */
  897. PanSequenceNumber: HexLengthEquals2;
  898. /**
  899. * The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  900. */
  901. PrimaryAccountNumber: NumberLengthBetween12And19;
  902. /**
  903. * A random number generated by the issuer.
  904. */
  905. UnpredictableNumber: HexLengthBetween2And8;
  906. }
  907. export interface SessionKeyVisa {
  908. /**
  909. * A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).
  910. */
  911. PanSequenceNumber: HexLengthEquals2;
  912. /**
  913. * The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  914. */
  915. PrimaryAccountNumber: NumberLengthBetween12And19;
  916. }
  917. export interface SymmetricEncryptionAttributes {
  918. /**
  919. * An input used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero.
  920. */
  921. InitializationVector?: HexLength16Or32;
  922. /**
  923. * The block cipher method to use for encryption.
  924. */
  925. Mode: EncryptionMode;
  926. /**
  927. * The padding to be included with the data.
  928. */
  929. PaddingType?: PaddingType;
  930. }
  931. export interface TranslatePinDataInput {
  932. /**
  933. * The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.
  934. */
  935. EncryptedPinBlock: HexEvenLengthBetween16And32;
  936. /**
  937. * The attributes and values to use for incoming DUKPT encryption key for PIN block translation.
  938. */
  939. IncomingDukptAttributes?: DukptDerivationAttributes;
  940. /**
  941. * The keyARN of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.
  942. */
  943. IncomingKeyIdentifier: KeyArnOrKeyAliasType;
  944. /**
  945. * The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.
  946. */
  947. IncomingTranslationAttributes: TranslationIsoFormats;
  948. /**
  949. * The attributes and values to use for outgoing DUKPT encryption key after PIN block translation.
  950. */
  951. OutgoingDukptAttributes?: DukptDerivationAttributes;
  952. /**
  953. * The keyARN of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.
  954. */
  955. OutgoingKeyIdentifier: KeyArnOrKeyAliasType;
  956. /**
  957. * The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.
  958. */
  959. OutgoingTranslationAttributes: TranslationIsoFormats;
  960. }
  961. export interface TranslatePinDataOutput {
  962. /**
  963. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses to encrypt outgoing PIN block data after translation.
  964. */
  965. KeyArn: KeyArn;
  966. /**
  967. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  968. */
  969. KeyCheckValue: KeyCheckValue;
  970. /**
  971. * The outgoing encrypted PIN block data after translation.
  972. */
  973. PinBlock: HexLengthBetween16And32;
  974. }
  975. export interface TranslationIsoFormats {
  976. /**
  977. * Parameters that are required for ISO9564 PIN format 0 tranlation.
  978. */
  979. IsoFormat0?: TranslationPinDataIsoFormat034;
  980. /**
  981. * Parameters that are required for ISO9564 PIN format 1 tranlation.
  982. */
  983. IsoFormat1?: TranslationPinDataIsoFormat1;
  984. /**
  985. * Parameters that are required for ISO9564 PIN format 3 tranlation.
  986. */
  987. IsoFormat3?: TranslationPinDataIsoFormat034;
  988. /**
  989. * Parameters that are required for ISO9564 PIN format 4 tranlation.
  990. */
  991. IsoFormat4?: TranslationPinDataIsoFormat034;
  992. }
  993. export interface TranslationPinDataIsoFormat034 {
  994. /**
  995. * The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder.
  996. */
  997. PrimaryAccountNumber: NumberLengthBetween12And19;
  998. }
  999. export interface TranslationPinDataIsoFormat1 {
  1000. }
  1001. export interface VerifyAuthRequestCryptogramInput {
  1002. /**
  1003. * The auth request cryptogram imported into Amazon Web Services Payment Cryptography for ARQC verification using a major encryption key and transaction data.
  1004. */
  1005. AuthRequestCryptogram: HexLengthEquals16;
  1006. /**
  1007. * The attributes and values for auth request cryptogram verification. These parameters are required in case using ARPC Method 1 or Method 2 for ARQC verification.
  1008. */
  1009. AuthResponseAttributes?: CryptogramAuthResponse;
  1010. /**
  1011. * The keyARN of the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification.
  1012. */
  1013. KeyIdentifier: KeyArnOrKeyAliasType;
  1014. /**
  1015. * The method to use when deriving the major encryption key for ARQC verification within Amazon Web Services Payment Cryptography. The same key derivation mode was used for ARQC generation outside of Amazon Web Services Payment Cryptography.
  1016. */
  1017. MajorKeyDerivationMode: MajorKeyDerivationMode;
  1018. /**
  1019. * The attributes and values to use for deriving a session key for ARQC verification within Amazon Web Services Payment Cryptography. The same attributes were used for ARQC generation outside of Amazon Web Services Payment Cryptography.
  1020. */
  1021. SessionKeyDerivationAttributes: SessionKeyDerivation;
  1022. /**
  1023. * The transaction data that Amazon Web Services Payment Cryptography uses for ARQC verification. The same transaction is used for ARQC generation outside of Amazon Web Services Payment Cryptography.
  1024. */
  1025. TransactionData: HexLengthBetween2And1024;
  1026. }
  1027. export interface VerifyAuthRequestCryptogramOutput {
  1028. /**
  1029. * The result for ARQC verification or ARPC generation within Amazon Web Services Payment Cryptography.
  1030. */
  1031. AuthResponseValue?: HexLengthBetween1And16;
  1032. /**
  1033. * The keyARN of the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification.
  1034. */
  1035. KeyArn: KeyArn;
  1036. /**
  1037. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  1038. */
  1039. KeyCheckValue: KeyCheckValue;
  1040. }
  1041. export interface VerifyCardValidationDataInput {
  1042. /**
  1043. * The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify card data.
  1044. */
  1045. KeyIdentifier: KeyArnOrKeyAliasType;
  1046. /**
  1047. * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
  1048. */
  1049. PrimaryAccountNumber: NumberLengthBetween12And19;
  1050. /**
  1051. * The CVV or CSC value for use for card data verification within Amazon Web Services Payment Cryptography.
  1052. */
  1053. ValidationData: NumberLengthBetween3And5;
  1054. /**
  1055. * The algorithm to use for verification of card data within Amazon Web Services Payment Cryptography.
  1056. */
  1057. VerificationAttributes: CardVerificationAttributes;
  1058. }
  1059. export interface VerifyCardValidationDataOutput {
  1060. /**
  1061. * The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify CVV or CSC.
  1062. */
  1063. KeyArn: KeyArn;
  1064. /**
  1065. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  1066. */
  1067. KeyCheckValue: KeyCheckValue;
  1068. }
  1069. export interface VerifyMacInput {
  1070. /**
  1071. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.
  1072. */
  1073. KeyIdentifier: KeyArnOrKeyAliasType;
  1074. /**
  1075. * The MAC being verified.
  1076. */
  1077. Mac: HexEvenLengthBetween4And128;
  1078. /**
  1079. * The length of the MAC.
  1080. */
  1081. MacLength?: IntegerRangeBetween4And16;
  1082. /**
  1083. * The data on for which MAC is under verification. This value must be hexBinary.
  1084. */
  1085. MessageData: HexEvenLengthBetween2And4096;
  1086. /**
  1087. * The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.
  1088. */
  1089. VerificationAttributes: MacAttributes;
  1090. }
  1091. export interface VerifyMacOutput {
  1092. /**
  1093. * The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for MAC verification.
  1094. */
  1095. KeyArn: KeyArn;
  1096. /**
  1097. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  1098. */
  1099. KeyCheckValue: KeyCheckValue;
  1100. }
  1101. export interface VerifyPinDataInput {
  1102. /**
  1103. * The attributes and values for the DUKPT encrypted PIN block data.
  1104. */
  1105. DukptAttributes?: DukptAttributes;
  1106. /**
  1107. * The encrypted PIN block data that Amazon Web Services Payment Cryptography verifies.
  1108. */
  1109. EncryptedPinBlock: HexLengthBetween16And32;
  1110. /**
  1111. * The keyARN of the encryption key under which the PIN block data is encrypted. This key type can be PEK or BDK.
  1112. */
  1113. EncryptionKeyIdentifier: KeyArnOrKeyAliasType;
  1114. /**
  1115. * The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports ISO_Format_0 and ISO_Format_3. The ISO_Format_0 PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length. The ISO_Format_3 PIN block format is the same as ISO_Format_0 except that the fill digits are random values from 10 to 15.
  1116. */
  1117. PinBlockFormat: PinBlockFormatForPinData;
  1118. /**
  1119. * The length of PIN being verified.
  1120. */
  1121. PinDataLength?: IntegerRangeBetween4And12;
  1122. /**
  1123. * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
  1124. */
  1125. PrimaryAccountNumber: NumberLengthBetween12And19;
  1126. /**
  1127. * The attributes and values for PIN data verification.
  1128. */
  1129. VerificationAttributes: PinVerificationAttributes;
  1130. /**
  1131. * The keyARN of the PIN verification key.
  1132. */
  1133. VerificationKeyIdentifier: KeyArnOrKeyAliasType;
  1134. }
  1135. export interface VerifyPinDataOutput {
  1136. /**
  1137. * The keyARN of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation.
  1138. */
  1139. EncryptionKeyArn: KeyArn;
  1140. /**
  1141. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  1142. */
  1143. EncryptionKeyCheckValue: KeyCheckValue;
  1144. /**
  1145. * The keyARN of the PIN encryption key that Amazon Web Services Payment Cryptography uses for PIN or PIN Offset verification.
  1146. */
  1147. VerificationKeyArn: KeyArn;
  1148. /**
  1149. * The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
  1150. */
  1151. VerificationKeyCheckValue: KeyCheckValue;
  1152. }
  1153. export interface VisaPin {
  1154. /**
  1155. * The value for PIN verification index. It is used in the Visa PIN algorithm to calculate the PVV (PIN Verification Value).
  1156. */
  1157. PinVerificationKeyIndex: IntegerRangeBetween0And9;
  1158. }
  1159. export interface VisaPinVerification {
  1160. /**
  1161. * The value for PIN verification index. It is used in the Visa PIN algorithm to calculate the PVV (PIN Verification Value).
  1162. */
  1163. PinVerificationKeyIndex: IntegerRangeBetween0And9;
  1164. /**
  1165. * Parameters that are required to generate or verify Visa PVV (PIN Verification Value).
  1166. */
  1167. VerificationValue: NumberLengthBetween4And12;
  1168. }
  1169. export interface VisaPinVerificationValue {
  1170. /**
  1171. * The encrypted PIN block data to verify.
  1172. */
  1173. EncryptedPinBlock: HexLengthBetween16And32;
  1174. /**
  1175. * The value for PIN verification index. It is used in the Visa PIN algorithm to calculate the PVV (PIN Verification Value).
  1176. */
  1177. PinVerificationKeyIndex: IntegerRangeBetween0And9;
  1178. }
  1179. /**
  1180. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  1181. */
  1182. export type apiVersion = "2022-02-03"|"latest"|string;
  1183. export interface ClientApiVersions {
  1184. /**
  1185. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  1186. */
  1187. apiVersion?: apiVersion;
  1188. }
  1189. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  1190. /**
  1191. * Contains interfaces for use with the PaymentCryptographyData client.
  1192. */
  1193. export import Types = PaymentCryptographyData;
  1194. }
  1195. export = PaymentCryptographyData;