Encrypted PIN Transfer
Last updated
Last updated
📘Applicable only for the request that accepts the
Signing-Method
header.
This feature allows you to transfer your end-users signing methods (PIN, Emergency Code, Biometrics) in a secure and encrypted way so that it is not visible on your system in any way. Your system won't be able to view or read the end-user signing method's value.
This feature also ensures that the original end-user request body is not tampered with and helps avoid duplicate transactions.
📘
First, generate a random AES 256-bit key.
Next, generate a random iv vector which should be 12 bytes.
Next, encrypt the randomly generated AES 256-bit key with the AWS RSA-2048 public key that we expose in our publicly available endpoint:
HTTP
JSON
Generate a SHA256 hash based on the request body.
JSON
SHA256 Hash
Next, encrypt the Signing-Method
body with your raw AES key. The structure of the Signing-Method body is as follows:
id
The unique ID of the signing method.
✅
value
The value of the signing method.
✅
physicalDeviceId
The physicalDeviceId
which is the unique ID
of the user's device. (Applicable for BIOMETRIC
only)
❌
idempotencyKey
A unique UUID for every request.
✅
signature.type
This will be sha256
✅
signature.value
✅
JSON
PIN
:JSON
Emergency Code
:JSON
Biometric
:JSON
Encrypted-Signing-Method
HeaderEncrypted-Signing-Method
Next, prepare the following JSON body.
encryption.type
This will be AES/GCM/NoPadding
.
encryption.key.encryptedValue
encryption.key.encryptionKeyId
encryption.iv
value
JSON
Next, you have to base64 encode the JSON body which is to be passed in the Encrypted-Signing-Method
header.
There are two ways to supply the signing method in the header:
Encrypted-Signing-Method
)You need to send the JSON base64 encoded body in the Encrypted-Signing-Method
header from the previous step. The Encrypted-Signing-Method
indicates that the signing method and the request body are encrypted.
Signing-Method
)The Signing-Method
header can be passed as usual for non-encrypted transfers.
Signing-Method
Header
id:value
id
: This is the ID of the signing method
value
: This is the value of the signing method
756ae7a7-3713-43ee-9936-0dff50306488:123456
Example Request
PIN
Signing MethodExample Request
Example Request
View the for Encrypted PIN Transfer.
SHA256 encoded hash of the JSON request body. - from
The AES key that is encrypted with RSA-2048 public key (GET /api/security
) - from
The value corresponds to the result.encryptionKeys.id
param in the response body of the GET /api/security
endpoint - from
Your randomly generated iv vector (12 bytes). - from
The body of the Signing-Method that is encrypted with the raw AES key. - from