4461 Commits

Author SHA1 Message Date
github-actions[bot]
8dd1f09d49 Merge remote-tracking branch 'upstream/master' 2026-06-01 11:05:46 +00:00
dependabot[bot]
53d6f0c746
chore (deps): bump qs and express (#2478)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-30 12:44:28 +01:00
dependabot[bot]
a50e868cb9
chore (deps): bump tmp from 0.2.5 to 0.2.7 (#2479)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-30 12:38:34 +01:00
dependabot[bot]
bdcd5fa8b1
chore (deps): bump the patch-updates group across 1 directory with 6 updates (#2463)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 11:31:26 +01:00
dependabot[bot]
bf2e12d141
chore (deps): bump the docker-dependencies group across 1 directory with 2 updates (#2468)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 11:05:45 +01:00
dependabot[bot]
61c00ae6da
chore (deps): bump terser from 5.46.2 to 5.48.0 (#2385)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-28 16:02:34 +01:00
GCHQDeveloper581
5383da81f8
Make dependabot quieter (#2467)
* group remaining update categories
* add cooldowns
2026-05-28 14:51:05 +01:00
Blank0120
6b780bc507
update sitemap (#2443) 2026-05-28 12:59:33 +01:00
GCHQDeveloper581
98bb5f117d
Bump webpack-dev-server to 5.2.4 (#2417) 2026-05-28 09:38:25 +01:00
GCHQDeveloper581
772f7866bf
Fix pgp tests (#2461)
Co-authored-by: C85297 <95289555+C85297@users.noreply.github.com> (fix for #2267)
2026-05-28 09:17:43 +01:00
dependabot[bot]
b47c1c0547
chore (deps): bump the patch-updates group across 1 directory with 4 updates (#2438)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 16:33:27 +01:00
dependabot[bot]
3da6a51ef7
chore (deps): bump docker/setup-buildx-action from 4.0.0 to 4.1.0 (#2439)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 16:24:07 +01:00
dependabot[bot]
ea29704a73
chore (deps): bump docker/login-action from 4.1.0 to 4.2.0 (#2441)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 16:20:47 +01:00
dependabot[bot]
4de8d338aa
chore (deps): bump docker/metadata-action from 6.0.0 to 6.1.0 (#2442)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 16:09:51 +01:00
github-actions[bot]
7830bac871 Merge remote-tracking branch 'upstream/master' 2026-05-25 09:45:00 +00:00
J8k3
db1e72d05c docs: standardize Session Start and Commit Scope in AGENTS.md
Align wording with the shared standard used across all four repos in
this project family. No behavioral change — same rules, consistent text.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 14:07:46 -04:00
J8k3
16a893e70a test(payment): add 5 golden-value tests for AES ECB, AES CTR, DUKPT TDES CBC
Covers the remaining untested cipher profiles in PaymentEncryptData /
PaymentDecryptData. Values are pinned from a clean run against the forge
upstream library, catching regressions in mode selection, IV wiring,
and padding behaviour without re-deriving cryptographic outputs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 14:05:23 -04:00
J8k3
60a89aa64f test(payment): add 7 new test cases covering json output shape and TDES cipher profiles
JSON output shape (covering recent ksn/bdk additions):
  - DUKPT Derive AES Key: IK JSON output includes ksn, iki, counter
  - DUKPT Derive TDES Key: IPEK JSON output includes ksn and bdk

Payment cipher coverage (previously only AES CBC was tested):
  - Payment Encrypt/Decrypt Data: TDES ECB (APC cross-validated block 1)
  - Payment Encrypt/Decrypt Data: TDES CBC (derived from passing re-encrypt chain)
  - Payment Encrypt Data: DUKPT TDES ECB Data variant (ANSI X9.24-1; APC variant
    mismatch documented in test comment and PAYMENT_RECIPES.md)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 13:03:31 -04:00
J8k3
4ce7860a19 fix(dukpt): add KSN/BDK to JSON output for AES and TDES DUKPT derive operations
AES DUKPT IK JSON was missing ksn, iki, counter; working key was missing ksn.
TDES DUKPT IPEK and session key JSON were missing ksn and bdk.
Both now mirror the full derivation context, making json=true self-contained for debugging and cross-validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 10:52:43 -04:00
Blank0120
6a3a370bb1
update bson (#2425)
Co-authored-by: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> (update of dependabot excluded packages)
2026-05-23 12:42:40 +01:00
dependabot[bot]
fba4a0a0af
chore (deps): bump webpack from 5.106.2 to 5.107.1 (#2428)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-23 11:47:11 +01:00
dependabot[bot]
ad51a17482
chore (deps): bump protobufjs from 7.5.8 to 7.6.0 (#2429)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-23 11:40:20 +01:00
dependabot[bot]
9b6619c45a
chore (deps): bump sql-formatter from 15.7.4 to 15.8.0 (#2430)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-23 11:25:31 +01:00
dependabot[bot]
50d5798c1f
chore (deps): bump docker/build-push-action from 7.1.0 to 7.2.0 (#2431)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-23 11:16:44 +01:00
J8k3
d7a32d1293 docs: trim PAYMENT_RECIPES.md to dev reference, update AGENTS.md
PAYMENT_RECIPES.md was duplicating content now maintained in
J8k3/CyberChef-Payments (recipe catalog, chaining patterns, validation
status). Trimmed to: naming conventions, operation registry, raw APC
comparison test vectors + results. Added pointer to CyberChef-Payments.

AGENTS.md updated:
- Pre-commit checklist now says: update PAYMENT_RECIPES.md operation
  registry + CyberChef-Payments README if op appears in catalog
- Added paragraph clarifying the two-file split (dev vs. user-facing)
- Naming convention step now explicitly calls out CyberChef-Payments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 00:20:59 -04:00
J8k3
a50b1f6faf README: reframe as implementation repo, redirect recipe catalog to CyberChef-Payments
- Update opening: workflow-oriented tooling for engineering, debugging,
  interoperability, development, QA — replaces narrow regulated-env framing
- Add explicit links to CyberChef-Payments (workflow catalog) and Payments (KB)
  near the top
- Replace verbose recipe list (24 entries) with 7 representative examples;
  redirect to J8k3/CyberChef-Payments for the full catalog and screenshots
- Fix typo: "Current coverage includes:h" -> "Current coverage includes:"
- Rewrite validation section: remove "unfinished product" and "best validation
  we can do" — replace with scoped statement on standards, vectors, and APC
  comparison where APIs are comparable
- Restructure: What this fork adds / Scope / Validation / Non-goals / Recipes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 00:18:01 -04:00
J8k3
c7a4b6358a Rename Parse EMV TLV → EMV Parse TLV (naming convention)
Domain prefix must come first per AGENTS.md convention. All references
updated: op file, Categories.json, tests, PAYMENT_RECIPES.md, lib comment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 04:25:28 -04:00
Jacob Marks
040da1fd92
Modify EMV recipes in README.md
Updated EMV-related recipes in the README.
2026-05-21 22:33:08 -04:00
J8k3
a44fc20da0 Fix lint: comma-spacing in Payment.mjs test; document full lint command
eslint:tests catches Payment.mjs too — document that npx grunt eslint runs
all five targets, not just eslint:core.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 20:03:37 -04:00
J8k3
8e0c192973 Fix lint: brace-style, comma-spacing, key-spacing, JSDoc, operator-linebreak
11 ESLint errors across 6 files introduced in the ARQC/ARPC/TLV/Script ops.
Also document the constructor-JSDoc and operator-linebreak rules in AGENTS.md
to prevent recurrence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:44:13 -04:00
J8k3
32622a01de AGENTS.md: add reciprocal knowledge loop rule to APC cross-reference
The one-way rule (CyberChef gaps → GitHub issue) didn't cover the return path.
New paragraph: discoveries from CyberChef sessions (PCI rules, algorithm edge cases,
HSM commands) must be written back into the MCP server in the same session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:29 -04:00
J8k3
2b9c92bae6 Enforce same-commit docs + APC check rule in AGENTS.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:28 -04:00
J8k3
a35b5aa23c Docs: add EMV Build Script Data ops to PAYMENT_RECIPES.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:27 -04:00
J8k3
eeb16eaaa8 Add EMV Build Script Data and Build PIN Change Script Data operations
Also fixes expectedError test format (OperationErrors surface as result
strings, not result.error) and updates PAYMENT_RECIPES.md docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:25 -04:00
J8k3
259b9740a7 Add EMV Build/Parse ARPC Data operations
- EMV Build ARPC Data: assembles ARPC preimage from named fields; Method 1 (Visa/Amex/Discover: ARQC+ARC, 10 bytes) and Method 2 (Mastercard: ARQC+CSU+optional PAD, 12-20 bytes); outputs hex (chainable into EMV Generate ARPC), JSON, or annotated
- EMV Parse ARPC Data: inverse; parses hex preimage back into named fields by method
- Shared lib EmvArpc.mjs with build/parse/format functions
- 6 new tests in Payment.mjs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:24 -04:00
J8k3
10bb87b320 Add EMV Build/Parse ARQC Data and Parse EMV TLV operations (issues #11)
- EMV Build ARQC Data: assembles 10-field CDOL1 preimage from args; outputs hex (chainable into EMV Generate ARQC), JSON, or annotated TLV
- EMV Parse ARQC Data: inverse; parses flat 33-byte CDOL1 hex back into named fields
- Parse EMV TLV: BER-TLV parser with 102-entry EMV tag dictionary; handles constructed/nested tags, 1- and 2-byte tags, long-form lengths; dictionary mode lists all known tags
- Shared libs: EmvCdol.mjs (CDOL1 field defs), EmvTlv.mjs (parser), EmvTlvDictionary.mjs (tag dict)
- 12 new tests in Payment.mjs covering all three operations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:23 -04:00
Jacob Marks
f90fba92fd
Fix typos and enhance README clarity
Corrected typos and improved clarity in the README.
2026-05-21 12:42:49 -04:00
Jacob Marks
a87e24cad5
Revise README for CyberChef Payments focus
Updated the README to reflect the focus on payment cryptography operations, clarified the development status, and modified section headings.
2026-05-21 12:30:50 -04:00
Jacob Marks
8d45d908e6
Revise CyberChef recipes in README
Updated links for PIN and EMV generation recipes.
2026-05-21 07:59:53 -04:00
J8k3
c44873ab3f Fix lint: expand inline try/catch in KeyComponentCombine; add brace-style rule to AGENTS.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 22:22:51 -04:00
J8k3
28cda9bad9 Add Key Component Split and Combine operations (issue #2)
XOR key ceremony helpers: split a key into 2-8 components and recombine.
Chains cleanly with Key Generate and wrap/encrypt operations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 22:06:32 -04:00
J8k3
79ac440b14 Docs: AGENTS.md, PAYMENT_RECIPES.md, README.md updates
- AGENTS.md: add APC cross-reference, security constraint, ESLint, and gap-filing instructions
- PAYMENT_RECIPES.md: DUKPT AES key status to Externally cross-checked; VISA PVV APC results updated with second key cross-check
- README.md: PIN Block Translate Encrypted in coverage list and recipe links

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 21:49:34 -04:00
J8k3
ffc5fcbf41 Add PIN Block Translate Encrypted; fix CBOR v9 encode; fix EMV MAC tests; fix bcrypt node test
- PIN Block Translate Encrypted: new operation with 5 tests; registered in Payments category
- CBOR v9: fix Encoder streaming/Buffer pool issue; JSDoc on helpers
- EMV Generate MAC: fix empty-input hex parse, stale 3-arg test, missing padding method in verify test
- parseHexBytes: accept empty string as valid 0-byte hex
- bcrypt node test: accept $2a prefix from bcryptjs v2.4.3

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 19:04:35 -04:00
J8k3
c628207471 Add DUKPT session key variant, PIN block edge case, and EMV MAC boundary tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:44:34 -04:00
Leon Zandman
ad20c91f5b
Fix flaky npm run testui (#2412) 2026-05-20 18:33:40 +01:00
GCHQ Developer 85297
2cf778c253
Include git ref in website download zip name (#2339) 2026-05-20 15:32:46 +01:00
J8k3
31310d5d57 PAYMENT_RECIPES: explain ISO9797 Method 1/2; update EMV MAC APC comparison row 2026-05-19 21:13:12 -04:00
J8k3
9015ea9f40 EMV Generate/Verify MAC: add padding method selector (default Method 2) 2026-05-19 20:43:25 -04:00
J8k3
0d08681d55 PAYMENT_RECIPES: add APC comparison results; fix PIN translation note 2026-05-19 19:40:23 -04:00
J8k3
e09d6df31e Fix AES DUKPT derivation: use AES-ECB, 32-bit tree, usage 0x8000
X9.24-3 uses AES_Encrypt_ECB for all derivation steps, not AES-CMAC.
Intermediate tree nodes use key usage 0x8000 (not 0x0000), and the
binary tree traversal must cover all 32 counter bits (not 21).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 15:06:58 -04:00