Fix TR-31/TR-34 op names and sort Payments category alphabetically
Rename two ops to follow the domain-prefix-first convention: "Parse TR-31 Key Block" -> "TR-31 Parse Key Block" "Parse TR-34 Key Transport" -> "TR-34 Parse Key Transport" Sort all 33 Payments category entries alphabetically in Categories.json. With domain-prefix names the prefixes cluster related ops naturally, so alphabetical order is also logical order. Update PAYMENT_RECIPES.md UI Arrangement section to document alphabetical ordering. Fix stale lowercase references in AWS_PAYMENT_CRYPTOGRAPHY_RECIPES.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c6d530348e
commit
eba7e37185
@ -158,8 +158,8 @@ Preferred chain:
|
|||||||
- `Derive ECDH Key Material`
|
- `Derive ECDH Key Material`
|
||||||
- KDF if needed
|
- KDF if needed
|
||||||
- `AES Key Wrap` or `AES Key Unwrap`
|
- `AES Key Wrap` or `AES Key Unwrap`
|
||||||
- `Parse TR-31 key block`
|
- `TR-31 Parse Key Block`
|
||||||
- `Parse TR-34 B9 envelope`
|
- `TR-34 Parse Key Transport`
|
||||||
|
|
||||||
Important assumption:
|
Important assumption:
|
||||||
- this is a recipe chain, not a single HSM-like rewrap boundary
|
- this is a recipe chain, not a single HSM-like rewrap boundary
|
||||||
@ -209,4 +209,4 @@ Method:
|
|||||||
- `Derive ECDH Key Material`
|
- `Derive ECDH Key Material`
|
||||||
- `AES Key Unwrap`
|
- `AES Key Unwrap`
|
||||||
- `AES Key Wrap`
|
- `AES Key Wrap`
|
||||||
- `Parse TR-31 key block`
|
- `TR-31 Parse Key Block`
|
||||||
|
|||||||
@ -22,12 +22,7 @@ Pattern: `[Domain Prefix] [Verb] [Qualifier]`
|
|||||||
|
|
||||||
## UI Arrangement
|
## UI Arrangement
|
||||||
|
|
||||||
The `Payments` category is arranged in this order:
|
The `Payments` category is sorted alphabetically. The domain-prefix naming convention means related operations naturally cluster together in the list (all EMV ops together, all PIN Block ops together, etc.).
|
||||||
- payment-facing wrappers (Payment Encrypt/Decrypt/Re-Encrypt) first
|
|
||||||
- MAC and EMV flows next
|
|
||||||
- PAN, card, and PIN flows after that
|
|
||||||
- key derivation, generation, KCV, and parser utilities next
|
|
||||||
- HSM command parsers last
|
|
||||||
|
|
||||||
## 1) Encrypt / Decrypt / Re-Encrypt Payment Data
|
## 1) Encrypt / Decrypt / Re-Encrypt Payment Data
|
||||||
|
|
||||||
@ -228,8 +223,8 @@ Important assumptions:
|
|||||||
Operations:
|
Operations:
|
||||||
- `HSM Parse Thales Command`
|
- `HSM Parse Thales Command`
|
||||||
- `HSM Parse Futurex Command`
|
- `HSM Parse Futurex Command`
|
||||||
- `Parse TR-31 Key Block`
|
- `TR-31 Parse Key Block`
|
||||||
- `Parse TR-34 Key Transport`
|
- `TR-34 Parse Key Transport`
|
||||||
|
|
||||||
Use this when:
|
Use this when:
|
||||||
- you need to inspect vendor HSM command syntax, wrapped-key material, or transport frames during testing
|
- you need to inspect vendor HSM command syntax, wrapped-key material, or transport frames during testing
|
||||||
@ -237,14 +232,14 @@ Use this when:
|
|||||||
Input:
|
Input:
|
||||||
- `HSM Parse Thales Command`: raw legacy host command or response text
|
- `HSM Parse Thales Command`: raw legacy host command or response text
|
||||||
- `HSM Parse Futurex Command`: raw bracketed Excrypt command or response text
|
- `HSM Parse Futurex Command`: raw bracketed Excrypt command or response text
|
||||||
- `Parse TR-31 Key Block` / `Parse TR-34 Key Transport`: full payload as text or hex, depending on the operation comment
|
- `TR-31 Parse Key Block` / `TR-34 Parse Key Transport`: full payload as text or hex, depending on the operation comment
|
||||||
|
|
||||||
Important assumptions:
|
Important assumptions:
|
||||||
- the Thales and Futurex parsers currently focus on visible message syntax, delimiters, command identification, and field splitting rather than deep per-command semantic decoding
|
- the Thales and Futurex parsers currently focus on visible message syntax, delimiters, command identification, and field splitting rather than deep per-command semantic decoding
|
||||||
- `HSM Parse Thales Command` expects the configured message-header length to be supplied in the op args
|
- `HSM Parse Thales Command` expects the configured message-header length to be supplied in the op args
|
||||||
- `HSM Parse Futurex Command` treats Excrypt messages as delimiter-based tag/value fields and commonly uses the `AO` field as the command code
|
- `HSM Parse Futurex Command` treats Excrypt messages as delimiter-based tag/value fields and commonly uses the `AO` field as the command code
|
||||||
- `Parse TR-31 Key Block` decodes all X9.143 header fields with descriptions and PCI compliance flags
|
- `TR-31 Parse Key Block` decodes all X9.143 header fields with descriptions and PCI compliance flags
|
||||||
- `Parse TR-34 Key Transport` handles B0–B9 message types, error codes, and peeks at the outer ASN.1 SEQUENCE of the CMS envelope
|
- `TR-34 Parse Key Transport` handles B0–B9 message types, error codes, and peeks at the outer ASN.1 SEQUENCE of the CMS envelope
|
||||||
|
|
||||||
## Chaining Patterns
|
## Chaining Patterns
|
||||||
|
|
||||||
|
|||||||
@ -586,39 +586,39 @@
|
|||||||
{
|
{
|
||||||
"name": "Payments",
|
"name": "Payments",
|
||||||
"ops": [
|
"ops": [
|
||||||
"Payment Encrypt Data",
|
"AS2805 Generate KEK Validation",
|
||||||
"Payment Decrypt Data",
|
|
||||||
"Payment Re-Encrypt Data",
|
|
||||||
"MAC Generate",
|
|
||||||
"MAC Verify",
|
|
||||||
"EMV Generate MAC",
|
|
||||||
"EMV Verify MAC",
|
|
||||||
"EMV Generate ARQC",
|
|
||||||
"EMV Verify ARQC",
|
|
||||||
"EMV Generate ARPC",
|
|
||||||
"EMV Generate MAC (PIN Change)",
|
|
||||||
"PAN Generate",
|
|
||||||
"PAN Parse",
|
|
||||||
"Card Validation Data Generate",
|
"Card Validation Data Generate",
|
||||||
"Card Validation Data Verify",
|
"Card Validation Data Verify",
|
||||||
"PIN Data Generate",
|
"DUKPT Derive AES Key",
|
||||||
"PIN Data Verify",
|
"DUKPT Derive TDES Key",
|
||||||
|
"EMV Generate ARPC",
|
||||||
|
"EMV Generate ARQC",
|
||||||
|
"EMV Generate MAC",
|
||||||
|
"EMV Generate MAC (PIN Change)",
|
||||||
|
"EMV Verify ARQC",
|
||||||
|
"EMV Verify MAC",
|
||||||
|
"HSM Parse Futurex Command",
|
||||||
|
"HSM Parse Thales Command",
|
||||||
|
"IBM 3624 Generate PIN Offset",
|
||||||
|
"IBM 3624 Verify PIN",
|
||||||
|
"Key Generate",
|
||||||
|
"MAC Generate",
|
||||||
|
"MAC Verify",
|
||||||
|
"PAN Generate",
|
||||||
|
"PAN Parse",
|
||||||
|
"Payment Calculate KCV",
|
||||||
|
"Payment Decrypt Data",
|
||||||
|
"Payment Encrypt Data",
|
||||||
|
"Payment Re-Encrypt Data",
|
||||||
"PIN Block Build",
|
"PIN Block Build",
|
||||||
"PIN Block Parse",
|
"PIN Block Parse",
|
||||||
"PIN Block Translate",
|
"PIN Block Translate",
|
||||||
"IBM 3624 Generate PIN Offset",
|
"PIN Data Generate",
|
||||||
"IBM 3624 Verify PIN",
|
"PIN Data Verify",
|
||||||
|
"TR-31 Parse Key Block",
|
||||||
|
"TR-34 Parse Key Transport",
|
||||||
"VISA PVV Generate",
|
"VISA PVV Generate",
|
||||||
"VISA PVV Verify",
|
"VISA PVV Verify"
|
||||||
"DUKPT Derive TDES Key",
|
|
||||||
"DUKPT Derive AES Key",
|
|
||||||
"Key Generate",
|
|
||||||
"Payment Calculate KCV",
|
|
||||||
"AS2805 Generate KEK Validation",
|
|
||||||
"HSM Parse Thales Command",
|
|
||||||
"HSM Parse Futurex Command",
|
|
||||||
"Parse TR-31 Key Block",
|
|
||||||
"Parse TR-34 Key Transport"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -120,7 +120,7 @@ class ParseTR31KeyBlock extends Operation {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.name = "Parse TR-31 Key Block";
|
this.name = "TR-31 Parse Key Block";
|
||||||
this.module = "Payment";
|
this.module = "Payment";
|
||||||
this.description = [
|
this.description = [
|
||||||
"Parses a <b>TR-31</b> (ANSI X9.143) key block and decodes every header field into a human-readable description.",
|
"Parses a <b>TR-31</b> (ANSI X9.143) key block and decodes every header field into a human-readable description.",
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class ParseTR34B9Envelope extends Operation {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.name = "Parse TR-34 Key Transport";
|
this.name = "TR-34 Parse Key Transport";
|
||||||
this.module = "Payment";
|
this.module = "Payment";
|
||||||
this.description = [
|
this.description = [
|
||||||
"Parses a <b>TR-34</b> key transport message frame (hex input) and decodes each section.",
|
"Parses a <b>TR-34</b> key transport message frame (hex input) and decodes each section.",
|
||||||
|
|||||||
@ -213,7 +213,7 @@ TestRegister.addTests([
|
|||||||
}, null, 4),
|
}, null, 4),
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "Parse TR-31 Key Block",
|
op: "TR-31 Parse Key Block",
|
||||||
args: [true]
|
args: [true]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -255,7 +255,7 @@ TestRegister.addTests([
|
|||||||
}, null, 4),
|
}, null, 4),
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "Parse TR-34 Key Transport",
|
op: "TR-34 Parse Key Transport",
|
||||||
args: []
|
args: []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user