Skip to content

Added mastercard-payload-encryption skill - #74

Open
kshamajha wants to merge 3 commits into
Mastercard:mainfrom
kshamajha:main
Open

kshamajha wants to merge 3 commits into
Mastercard:mainfrom
kshamajha:main

Conversation

@kshamajha

@kshamajha kshamajha commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

This adds a second agent skill, mastercard-payload-encryption. It helps agents build, debug and review code that encrypts requests to Mastercard APIs or decrypts their responses. Each service sets up encryption its own way: scheme, paths, field names, OAEP digest, encoding, and opt-in at onboarding. Agents often guess these from memory or copy them from library README placeholders. The skill makes the agent look up the service's own documentation first.

The mastercard-payload-encryption skill covers the following:

  • Per-service encryption profiles: a table of every part of a profile, with real examples (Account Validation, Mastercard Processing, Consumer Clarity, MDES Authentication Facilitator) showing how much they vary.
  • Finding the profile before writing code: resolve the service, find its encryption pages, check llms-full.txt and the x-mastercard-api-encrypted spec marker, read the operation contract, and write the profile down with a source for each value. Anything the docs don't state gets asked or left as a marked TODO, never filled with a guess.
  • JWE vs. Mastercard (field-level) encryption: how they compare, and a rule never to switch a service from one to the other.
  • Client-encryption libraries: Java, C#, Python, Node.js and Go, with the config differences between languages (path syntax, key parameter names, Go's gabs dot-notation catch). It also notes that the PHP and Ruby libraries are archived, and says to check that encryption actually happened before sending.
  • Encryption keys: Client Encryption Key vs. Mastercard Encryption Key, how their roles reverse when Mastercard calls your server, fingerprints, environment scoping, and keeping encryption keys separate from signing keys.
  • Encryption with authentication: for OAuth 1.0a, encrypt first and then sign, with the interceptor order for each library.
  • Troubleshooting: a table matching symptoms (DECRYPT_PRIVATE_KEY_NOT_FOUND, REQUEST_DECRYPT_FAILED, CRYPTOGRAPHY_ERROR, a 401 after adding encryption, etc.) to what to check first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants