Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Funzioni specifiche del visto
ARQC -/ CVN18CVN22
CVN18 e CVN22 utilizza il metodo CSK di derivazione delle chiavi. I dati esatti della transazione variano tra questi due metodi: consulta la documentazione dello schema per i dettagli sulla costruzione del campo dei dati della transazione.
ARQC - CVN10
CVN10 è un vecchio metodo Visa per le transazioni EMV che utilizza la derivazione per chiave della carta anziché la derivazione per sessione (per transazione) e utilizza anche un payload diverso. Per informazioni sul contenuto del payload, si prega di contattare lo schema per ulteriori dettagli.
Crea chiave
$aws payment-cryptography create-key --exportable --key-attributes KeyAlgorithm=TDES_2KEY,KeyUsage=TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS,KeyClass=SYMMETRIC_KEY,KeyModesOfUse='{DeriveKey=true}' --tags='[{"Key":"KEY_PURPOSE","Value":"CVN10"},{"Key":"CARD_BIN","Value":"12345678"}]'
La risposta richiama i parametri della richiesta, tra cui un ARN per le chiamate successive e un Key Check Value (KCV).
{ "Key": { "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/pw3s6nl62t5ushfk", "KeyAttributes": { "KeyUsage": "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "KeyClass": "SYMMETRIC_KEY", "KeyAlgorithm": "TDES_2KEY", "KeyModesOfUse": { "Encrypt": false, "Decrypt": false, "Wrap": false, "Unwrap": false, "Generate": false, "Sign": false, "Verify": false, "DeriveKey": true, "NoRestrictions": false } }, "KeyCheckValue": "08D7B4", "KeyCheckValueAlgorithm": "ANSI_X9_24", "Enabled": true, "Exportable": true, "KeyState": "CREATE_COMPLETE", "KeyOrigin": "AWS_PAYMENT_CRYPTOGRAPHY", "CreateTimestamp": "2024-03-07T06:41:46.648000-07:00", "UsageStartTimestamp": "2024-03-07T06:41:46.626000-07:00" } }
Prendi nota di KeyArn ciò che rappresenta la chiave, ad esempio arn:aws:payment-cryptography:us-east- 2:111122223333:key/pw3s6nl62t5ushfk. Ne hai bisogno nel passaggio successivo.
Convalida l'ARQC
Esempio
In questo esempio, convalideremo un ARQC generato utilizzando Visa. CVN10
Se AWS Payment Cryptography è in grado di convalidare l'ARQC, viene restituito un http/200. Se l'arqc non è convalidato, restituirà una risposta http/400.
$aws payment-cryptography-data verify-auth-request-cryptogram --auth-request-cryptogram D791093C8A921769 \ --key-identifier arn:aws:payment-cryptography:us-east-2:111122223333:key/pw3s6nl62t5ushfk \ --major-key-derivation-mode EMV_OPTION_A \ --transaction-data 00000000170000000000000008400080008000084016051700000000093800000B03011203000000 \ --session-key-derivation-attributes='{"Visa":{"PanSequenceNumber":"01" \ ,"PrimaryAccountNumber":"9137631040001422"}}'
{ "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/pw3s6nl62t5ushfk", "KeyCheckValue": "08D7B4" }
3DS CAVV V7
Per le transazioni Visa Secure (3DS), l'Access Control Server (ACS) dell'emittente genera un CAVV (Cardholder Authentication Verification Value). Il CAVV è la prova che l'autenticazione del titolare della carta è avvenuta, è unico per ogni transazione di autenticazione e viene fornito dall'acquirente nel messaggio di autorizzazione. CAVV v7 vincola all'approvazione i dati aggiuntivi sulla transazione, inclusi elementi come il nome del commerciante, l'importo dell'acquisto e la data di acquisto. In questo modo, è effettivamente un hash crittografico del payload della transazione.
Dal punto di vista crittografico, CAVV V7 utilizza l'algoritmo CVV, ma gli input sono stati tutti una changed/repurposed. Please consult appropriate third party/Visa documentazione su come produrre gli input per generare un payload CAVV V7.
Crea la chiave
$aws payment-cryptography create-key --exportable --key-attributes KeyAlgorithm=TDES_2KEY,KeyUsage=TR31_C0_CARD_VERIFICATION_KEY,KeyClass=SYMMETRIC_KEY,KeyModesOfUse='{Generate=true,Verify=true}' --tags='[{"Key":"KEY_PURPOSE","Value":"CAVV-V7"},{"Key":"CARD_BIN","Value":"12345678"}]'
La risposta richiama i parametri della richiesta, tra cui un ARN per le chiamate successive e un Key Check Value (KCV).
{ "Key": { "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/dnaeyrjgdjjtw6dk", "KeyAttributes": { "KeyUsage": "TR31_C0_CARD_VERIFICATION_KEY", "KeyClass": "SYMMETRIC_KEY", "KeyAlgorithm": "TDES_2KEY", "KeyModesOfUse": { "Encrypt": false, "Decrypt": false, "Wrap": false, "Unwrap": false, "Generate": true, "Sign": false, "Verify": true, "DeriveKey": false, "NoRestrictions": false } }, "KeyCheckValue": "F3FB13", "KeyCheckValueAlgorithm": "ANSI_X9_24", "Enabled": true, "Exportable": true, "KeyState": "CREATE_COMPLETE", "KeyOrigin": "AWS_PAYMENT_CRYPTOGRAPHY", "CreateTimestamp": "2023-06-05T06:41:46.648000-07:00", "UsageStartTimestamp": "2023-06-05T06:41:46.626000-07:00" } }
Prendi nota di KeyArn ciò che rappresenta la chiave, ad esempio arn:aws:payment-cryptography:us-east- 2:111122223333:key/dnaeyrjgdjjtw6dk. Ne hai bisogno nel passaggio successivo.
Genera un CAVV V7
Esempio
In questo esempio, genereremo un CAVV V7 per una determinata transazione con input come specificato nelle specifiche. Nota che per questo algoritmo, i campi possono essere riutilizzati/riutilizzati, quindi non si deve presumere che le etichette dei campi corrispondano agli input.
Per tutti i parametri disponibili, vedi CardVerificationValue1 nella guida di riferimento delle API.
$aws payment-cryptography-data generate-card-validation-data --key-identifier arn:aws:payment-cryptography:us-east-2:111122223333:key/dnaeyrjgdjjtw6dk --primary-account-number=171234567890123 --generation-attributes CardVerificationValue1='{CardExpiryDate=9431,ServiceCode=431}'
{ "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/dnaeyrjgdjjtw6dk", "KeyCheckValue": "F3FB13", "ValidationData": "491" }
Convalida CAVV V7
Esempio
Per la convalida, gli input sono CVK, i valori di input calcolati e il CAVV fornito durante la transazione per la convalida.
Nota
CAVV non è un valore inserito dall'utente (come CVV2) ma viene calcolato dall'emittente ACS. Si dovrebbe valutare se debba sempre essere convalidato quando fornito.
$aws payment-cryptography-data verify-card-validation-data --key-identifier arn:aws:payment-cryptography:us-east-2:111122223333:key/dnaeyrjgdjjtw6dk --primary-account-number=171234567890123 --verification-attributes CardVerificationValue1='{CardExpiryDate=9431,ServiceCode=431} --validation-data 491
{ "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/dnaeyrjgdjjtw6dk", "KeyCheckValue": "F3FB13", "ValidationData": "491" }
dCVV (Dynamic Card Verification Value) - CVN17
dCVV (dynamic Card Verification Value) è un crittogramma dinamico specifico per Visa utilizzato per le transazioni EMV senza contatto. È noto come uno dei primi EMV e offre una maggiore sicurezza generando un valore di verifica unico per ogni transazione. Il dCvv utilizza input tra cui il Primary Account Number (PAN), il PAN Sequence Number (PSN), l'Application Transaction Counter (ATC), il numero imprevedibile e i dati di traccia. È ancora utilizzato in alcuni luoghi, ma è stato per lo più sostituito da altri algoritmi come. CVN18
Per tutti i parametri disponibili, DynamicCardVerificationValueconsulta la guida di riferimento delle API.
Crea chiave
$aws payment-cryptography create-key --exportable --key-attributes KeyAlgorithm=TDES_2KEY,KeyUsage=TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS,KeyClass=SYMMETRIC_KEY,KeyModesOfUse='{Generate=true,Verify=true}' --tags='[{"Key":"KEY_PURPOSE","Value":"DCVV"},{"Key":"CARD_BIN","Value":"12345678"}]'
La risposta richiama i parametri della richiesta, tra cui un ARN per le chiamate successive e un Key Check Value (KCV).
{ "Key": { "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/mw7dn3qxvkfh8ztc", "KeyAttributes": { "KeyUsage": "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "KeyClass": "SYMMETRIC_KEY", "KeyAlgorithm": "TDES_2KEY", "KeyModesOfUse": { "Encrypt": false, "Decrypt": false, "Wrap": false, "Unwrap": false, "Generate": true, "Sign": false, "Verify": true, "DeriveKey": false, "NoRestrictions": false } }, "KeyCheckValue": "A8E4D2", "KeyCheckValueAlgorithm": "ANSI_X9_24", "Enabled": true, "Exportable": true, "KeyState": "CREATE_COMPLETE", "KeyOrigin": "AWS_PAYMENT_CRYPTOGRAPHY", "CreateTimestamp": "2025-02-02T11:45:30.648000-08:00", "UsageStartTimestamp": "2025-02-02T11:45:30.626000-08:00" } }
Prendi nota di KeyArn ciò che rappresenta la chiave, ad esempio arn:aws:payment-cryptography:us-east- 2:111122223333:key/mw7dn3qxvkfh8ztc. Ne hai bisogno nel passaggio successivo.
Genera un dCVV
Esempio
In questo esempio, genereremo un dCVV per una transazione EMV senza contatto. Gli input includono il PAN, il numero di sequenza PAN, l'Application Transaction Counter, il numero imprevedibile e i dati di traccia.
$aws payment-cryptography-data generate-card-validation-data --key-identifier arn:aws:payment-cryptography:us-east-2:111122223333:key/mw7dn3qxvkfh8ztc \ --primary-account-number=5111112627662122 \ --generation-attributes DynamicCardVerificationValue='{ApplicationTransactionCounter=01,PanSequenceNumber=00,TrackData=12345,UnpredictableNumber=123}' \ --validation-data-length 5
{ "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/mw7dn3qxvkfh8ztc", "KeyCheckValue": "A8E4D2", "ValidationData": "36667" }
Convalida dCVV
Esempio
In questo esempio, convalideremo un DCVV fornito durante una transazione. Gli stessi input utilizzati per la generazione devono essere forniti per la convalida.
Se AWS Payment Cryptography è in grado di convalidare, viene restituito un http/200. Se il valore non è convalidato, restituirà una risposta http/400.
$aws payment-cryptography-data verify-card-validation-data --key-identifier arn:aws:payment-cryptography:us-east-2:111122223333:key/mw7dn3qxvkfh8ztc \ --primary-account-number=5111112627662122 \ --validation-data=36667 \ --verification-attributes DynamicCardVerificationValue='{ApplicationTransactionCounter=01,PanSequenceNumber=00,TrackData=12345,UnpredictableNumber=123}'
{ "KeyArn": "arn:aws:payment-cryptography:us-east-2:111122223333:key/mw7dn3qxvkfh8ztc", "KeyCheckValue": "A8E4D2" }