- Newest
- Most votes
- Most comments
To generate an enciphered PIN block for IBM 3624 Offset PIN using AWS Payment Cryptography, you need to ensure you're using the correct key types and parameters.
For IBM3624 PIN operations, you need two specific key types:
- A PIN verification key (TR31_V1_IBM3624_PIN_VERIFICATION_KEY) with TDES_3KEY algorithm
- A PIN encryption key (TR31_P0_PIN_ENCRYPTION_KEY) with either TDES_2KEY or TDES_3KEY algorithm
The PIN verification key must have the Generate mode of use enabled, and the PIN encryption key must have the appropriate modes of use (Encrypt, Wrap, etc.) depending on your specific operation.
For generating IBM3624 PIN data, you would use the generate-pin-data command with the following required parameters:
- generation-key-identifier (your IBM3624 PIN verification key)
- encryption-key-identifier (your PIN encryption key)
- primary-account-number (the PAN)
- pin-block-format (e.g., ISO_FORMAT_0)
- generation-attributes with the appropriate IBM3624 method
For IBM3624RandomPin, you need to provide:
- DecimalizationTable (e.g., "9876543210654321")
- PinValidationDataPadCharacter (e.g., "D")
- PinValidationData (typically the PAN)
The issue you're experiencing might be related to how you're trying to use the ECDH key pair. The AWS Payment Cryptography service doesn't directly support using an ECDH shared secret to derive a 3DES key for PIN block generation in a single operation.
Instead, you would need to:
- First establish the shared secret using your ECDH key pair
- Derive the 3DES key separately
- Import the derived 3DES key as a TR31_P0_PIN_ENCRYPTION_KEY
- Use this imported key in your generate-pin-data operation
The "ValidationException" error suggests that one or more parameters in your request don't meet the validation requirements for the GeneratePinData operation. Double-check that your key types match the requirements for IBM3624 PIN operations and that all required parameters are correctly formatted.
Sources
Generate IBM3624 pin offset for a pin - AWS Payment Cryptography
Valid keys for cryptographic operations - AWS Payment Cryptography
Creating keys - AWS Payment Cryptography
answered a year ago
Relevant content
asked 2 years ago
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 2 years ago

I am posting it here because I already saw these examples with Random PIN on the documentations. I already took too many hours consulting all AI models. This AI generated answer is just a repetition of what I already researched so far. Also it is just a generic rip-off of the documentation.
Please, can anyone human help me?