API entry point path http://avt-crypto.evf.us/api/v1/decrypt
API allowed to to GET and PUT HTTP method requests.
To do simulate PUT request need do execute regular POST request but add X-HTTP-Method-Override: PUT in request headers.
HTTP POST payload must be:
Content-Type: application/x-www-form-urlencoded
Basically it look like this:
parameter1=value¶meter2=value2
List of supported encryption methods
Method | API path | ------ | -------- | GET | http://avt-crypto.evf.us/api/v1/decrypt
Get required parameters for encryption method
<encryption> - encryption name from list of supported
Method | API path | ------ | ------- | GET | http://avt-crypto.evf.us/api/v1/decrypt/<encryption>
Error handling
If decryption failed or required parameter is missed you will receive error response:
Method | API path | HTTP Payload | ------ | -------- | ------------ | PUT | http://avt-crypto.evf.us/api/v1/decrypt/kme | type=carddata&base24tdeskey=1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C
Example result
{
"status": "error",
"result": "Decryption failed. Debug info: cipher required"
}
Base64 Decode
Method | API path | HTTP Payload | ------ | -------- | ----------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/base64decode | payload=MTIzNDU=
Example result
{
"status": "success",
"result": "12345"
}
EPS Decrypt
Method | API path | ---- | ------ | PUT | http://avt-crypto.evf.us/api/v1/decrypt/eps
HTTP Payload
cipher=2ABB932C20FB1778CE6CD88416DDED838A89A4F43B464BFD5D9885AE4F0441C6AD59164C3632B177E9598FD073692B78
ksn=FFFF4900361491E00001
key_type=derivation_key
key=0123456789ABCDEFFEDCBA9876543210
Example result
{
"status": "success",
"result": "%B0227271714569^4/TEST CARDHOLDER^081210110000?\u0000"
}
Mercury Decrypt
Method | API path | ---- | ------ | PUT | http://avt-crypto.evf.us/api/v1/decrypt/mercury
HTTP Payload
cipher=2176234C318BBE5F8B0C6CB46A7D4093A441EDE313A6F1C102D49DE1A870CADF88833FB4C1629FD72F044D7DE6CAB1826763ADEAFE3AF964BD6F9934AA133183:21111010000000000007:7C2ED412F753D63788C8B9C56F4D5D04977924C1D1082AEC1956266EE0B8B81FA4B7A265010F3F26:21111010000000000008
ksn=21111010000000000023
key_type=derivation_key
key=0123456789ABCDEFFEDCBA9876543210
Example result
{
"status": "success",
"result": {
"track1": "%B554460671969661^INWUKDIXPO/GAEAI^1202473397935315053340?",
"track2": ";554460671969661=12024733979353150533?"
}
}
Monetra Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/monetra
HTTP Payload
cipher=53B499A03AA623F465CEA4280020A16E8865DF82CE186782ABFB9386DD85176C
ksn=0000000200000B000002
key_type=ipek
key=84d9dd4b9cbfe22b88a5c6a3ee8c2b14
Example result
{
"status": "success",
"result": "5444009999222205|1412|1254\u0000\u0000\u0000\u0000\u0000\u0000"
}
TDES DUKPT Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/tdes_dukpt
HTTP Payload
cipher=01E1597AF0B4AE3631E650D9B57DA00451F7EBBFA2CC979088E6A2A1743C796BF46712AE5B09247789CC5D2FD80ADC4B58CD87AE6D0150E3E30FD15E954C925DA64B85C6B51F7EB52F88DD0B9FDE5D2491BC59CF96966D77A17122528F424CFDA5A135C411AFEAD1
ksn=FFFF4900361491E00001
key_type=derivation_key
key=0123456789ABCDEFFEDCBA9876543210
Example result
{
"status": "success",
"result": "%B371449635398431^PAYMENTECH TEST CARD^10121015432112345678?;371449635398431=10121015432112345678?\u0000\u0000\u0000\u0000\u0000\u0000"
}
TDES DUKPT NCR Retalix Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/tdesdukptncr_retalix
HTTP Payload
cipher=3B9824164396AAFB85178CA890942787BAA9E56342F89F48993428101A1B8A768854166B6F72B5464F5660CA539BD0A8
ksn=FFFF9876543211400018
key_type=derivation_key
key=0123456789ABCDEFFEDCBA9876543210
Example result
{
"status": "success",
"result": {
"decrypted": "\u001c5178059975752461=190420115086456901\u001c\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"extra": ""
}
}
S1 Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/s1
HTTP Payload
cipher=313030314230303041FFFF1231232468A000183031313030365331:31303036423038554B8EADE8B047F4303035301232BE5490FF7399907077658E1F8426602AF1ED5CA9FC278615BE7F6E4A7D7858E541A556156084C4B95E12D0D68FC17691916112BF2D88EE34EA568D55BD010C4EB4BE1D2D02F870C7176F1534BD3D2044FCED86BCD9D3:31303035333038F02C73AF8FCFD6DB303033386206CAA2E2D23E4824954517E0EB9353B952E38940641A9ECE5626AC05D72FEF77DD3CF74865A349376BB49E7E4878DDCBE98EC11295F97C8F68C9349D2D1227
key_type=ipek
key=4145C943621BC87DF7EF8ED76405B341
Example result
{
"status": "success",
"result": {
"volatile": {
"track1_disc_data": "175890089300000000000000",
"track2": "4761739001010119D22122011175898938900F",
"white_list_hash_algorithm": "01",
"white_list_hash_sha1": "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709"
},
"persisted": {
"track2": "4761739001010119D22122011175898938900F",
"white_list_hash_algorithm": "01",
"white_list_hash_sha1": "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709"
}
}
}
RSA OAEP Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/rsa_oaep
HTTP Payload
cipher=bnErg6Zedb4Jjw5bFfk4fkofUS/viT+8OX/7k3jV+Zk6qLNgVckglTr8NsueWgBLxiTrKG0h3x4dLHc2xy0r2gdEUnVawiyGU14QgPC9Uxce8heYd6o8lim+Pw5MrPQWp7UlKO7xngjvaxXTcDbtjXPF1vujyb12te4tiPJ5h1F9ljau5s+M8ct37dklYsUeUVpQVz6abxAKOOEuFn1JguXYDRF735keR89isj1pwNvcbF9ITUccxq0JOWHEOx9dK6wSi5VezXE+NNvgvLG4GfuunMBrbgs6RKPq7QBx4nxmob12oBilsLU11PefgRuzW3aArITlk8g4KUe0HM1t/A==
private_key=<string content of private key PEM file>
decryption_provider=OPENSSL SHA1 | SunJCE SHA1 | SunJCE SHA256
Example result
{
"status": "success",
"result": "Hello World!"
}
TransArmor Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/trans_armor
HTTP Payload
cipher=KjPz5FyGANWUuyxB/lDGfW4Fj+GmSp+eGUpGfYqjKktseRp9olkRL4478J5BRTs2aJBg7I5itCXCFOWfEERRRD1iWuyezn/Iu1NzKye7QiB/rR8RelYXBgQnXwP88iaNvi7UPNE1tBDfh+SO9Wp4EgHG91kxxMx7/lwpGoBnqTSlt8Vl/onl+OnBQ5+EFyymB2nwa+vliu4Tx1EaB88bEzoYiiJg5wgCI74aV6zcsjXL5y2NYWh3uEHsyey3N+cRC5XyZLlFgQlDMZTHACPu8e7GVM8TapHcmAsXhL6jGeM60w952FzQtrVW7VrT6cC2yP8J9ZrrwHpKFrHgvCrtQQ==
private_key=<string content of private key PEM file>
Example result
{
"status": "success",
"result": "12345678;341111597242000=14121010000000000000?"
}
Pincode Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/pincode
HTTP Payload
cryptogram=AE1E01A8A7CBA153
ksn=FFFF4900361491E00001
pan=4149502015382079
key_type=derivation_key
key=0123456789ABCDEFFEDCBA9876543210
Example result
{
"status": "success",
"result": {
"length": 4,
"pin_code": "1234",
"tail": "ffffffffff",
"pinblock": "041234ffffffffff"
}
}
Pincode M/S Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/pincode_ms
HTTP Payload
cryptogram=45454545454545454545454545454545
key=45454545454545454545454545454545
pan=5412644903507164
iv=0000000000000000
Example result
{
{
"status": "success",
"result": {
"length": 4,
"pin_code": "9632",
"tail": "ffffffffff",
"pinblock": "049632ffffffffff"
}
}
Voltage Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/voltage
Parameters track1, track2, pan and mid may use separately for decryption.
HTTP Payload
etb=/wECAQEEAoE9AgEH3gcWSQjmVQ1pZEBzYW1wbGUuY29tedqBfFDZ1rYtN6MnduFHbSvpVKZrN+diJpKKOfhTiPxY5D3ipdQBgBecVlOekrqqcL9S2MzNv1ZOh6bNkbJMsUmEEWzEI7OX2lbh/1KzswLN2WhofJzUOggdJPHOfGXsZwg4wxuidIxI1EmmjaQ2/4qJl5R58KxaqZLCW5Lvo28AMYVGtaAVxo8sHVfnMyxQffxtejlOSsttVbirJ1r1T7IAALQ8
track1=B343874849668^UHJJNQLG/VKKAWCEHSXOTDH^1108992EPllbcW0DiRGNG
track2=343874849668=1108992lGXBlq43
pan=34387471219668
Example result
{
"status": "success",
"result": {
"mid": null,
"pan": "34387456959668",
"track1": "B34387456959668^UHJJNQLG/VKKAWCEHSXOTDH^1108992852998466640",
"track2": "34387456959668=1108992466640",
"track3": null
}
}
OnGuard FPE Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/onguard
HTTP Payload
cipher=4445220007161151200001BFFFF9876543210E00007011425M0943558660162808=082143532DCA9F279A4E4310E14E63226FC36A0EC644BA8A506FD803AF961A935632FE497D8DE4E0A4651C523ECDA2C047449BFD7090
type=manual_entry
Example result
{
"status": "success",
"result": {
"card_verification_value": "123",
"clear_bin_length": "0",
"complementary_data": null,
"encipher_pan_end": null,
"encryption_type": "3DES",
"expiry_date": "1512",
"extended_encryption": true,
"hash_type": null,
"key_alias": null,
"ksn": "FFFF9876543210E000070114",
"other_data": null,
"pan": "4445222299990007",
"return_code": "00",
"return_message": null,
"terminal_id": "test",
"track1": null,
"track2": null,
"transaction_amount": "100",
"@xmlns:ax21": "http://decrypt.e2e.ingenico.com/xsd",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"@xsi:type": "ax21:TransactionElements",
"cvv": "123"
}
}
OnGuard SDE Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/onguard_sde
HTTP Payload
cipher=FFFF9876543210E00002:2:0048:691204990F8D6BDD44A80B385FD7880FF562AF893DD8EF53B926EE59B00E4E0E0E0260847BBC0F78F824023EC77364AD
key_type=derivation_key
key=0123456789ABCDEFFEDCBA9876543210
Example result
{
"status": "success",
"result": ";377666759794368=180920115097948700000?;"
}
Onguard Tracks
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/onguard_tracks
HTTP Payload
key=0123456789ABCDEFFEDCBA9876543210
key_type=derivation_key
ksn=FFFF9876543210E0000D
track2=0406142163490295=26387646618255127170
track1=B0406142163490295^N,^26020024887888978061
Example result
{
"status": "success",
"result": {
"card_verification_value": null,
"clear_bin_length": "0",
"encipher_pan_end": true,
"encryption_type": "3DES",
"expiry_date": null,
"extended_encryption": "true",
"ksn": "FFFF9876543210E0000D",
"bdk": "0123456789ABCDEFFEDCBA9876543210",
"ipek": null,
"pan": "",
"track1": "B5181271098934703^ /^14032010107201414513",
"track2": "5181271098934703=14032010189701414513",
"cvv": null
}
}
KME Decrypt
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/kme
HTTP Payload
cipher=373953100715120121018001A8000432D68AA3A4F226888C8E4E8FB8D53CAB3AFF6EDE620BBCBB2B914EC2D1DBDEFFFD8BC45F15C7132340A0F5B78F768F66DE1C5CE7A727C9296631C34C4D9A6D14AA3C35CED1CDAE9A6838C966C84E632C945B87BF3D3806D5B8409078B61383965FB785BF34631CCFF7
type=card_data
base_24_tdes_key=1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C
Example result
{
"status": "success",
"result": "\u001cq;373953189371007=20121015432112345678?"
}
MAC
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/mac
HTTP Payload
data=00WMTCAAAAAAB 0000022222222CD43E8304D499B9C6FEF55406C5152E107D978B8BE5A4909EBCCD9E83F0E49271111111111
key=88889999AAAABBBBCCCCDDDDEEEEFFFF
Example result
{
"status": "success",
"result": "F05A835C"
}
MAC DUKPT
Method | API path | ------ | -------- | PUT | http://avt-crypto.evf.us/api/v1/decrypt/mac_dukpt
HTTP Payload
data=test
key=0123456789ABCDEFFEDCBA9876543210
key_type=derivation_key
ksn=FFFF9876543210E00001
Example result
{
"status": "success",
"result": "Derived IPEK: 6AC292FAA1315B4D858AB3A3D7D5933A\nDerived PEK: 042666B49184CFA368DE9628D0397BC9\nMAC: F21A699E"
}