Skip to content

Service Configurations for Client Encryption Python

Jean-Alexis Aufauvre edited this page Jun 2, 2021 · 5 revisions

Table of Contents

Overview

Predefined service configurations for the Python client encryption library.

Configurations

MDES Token Connect

{
  "paths": {
    "$": {
      "toEncrypt": {
        "pushFundingAccount.encryptedPayload.encryptedData": "pushFundingAccount.encryptedPayload"
      },
      "toDecrypt": {}
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "encryptedData",
  "dataEncoding": "hex",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "oaepPaddingDigestAlgorithm": "SHA-512",
  "encryptionCertificateFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepHashingAlgorithm"
}

MDES Digital Enablement API

{
  "paths": {
    "$": {
      "toEncrypt": {
        "cardInfo.encryptedData": "cardInfo",
        "fundingAccountInfo.encryptedPayload.encryptedData": "fundingAccountInfo.encryptedPayload"
      },
      "toDecrypt": {
        "tokenDetail": "tokenDetail.encryptedData"
      }
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "encryptedData",
  "dataEncoding": "hex",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "decryptionKey": "./path/to/private.key",
  "oaepPaddingDigestAlgorithm": "SHA-256",
  "encryptionCertificateFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepHashingAlgorithm"
}

Installment APIs

{
  "paths": {
    "$": {
      "toEncrypt": {
        "configReqData.primaryAccountNumber": "configReqData",
        "receiveIssuerApprReqData.primaryAccountNumber": "receiveIssuerApprReqData"
      },
      "toDecrypt": {}
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "wrappedKey",
  "encryptedValueFieldName": "primaryAccountNumber",
  "dataEncoding": "base64",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "oaepPaddingDigestAlgorithm": "SHA-256"
}

Payment Account Management

{
  "paths": {
    "$": {
      "toEncrypt": {
        "encryptedPayload.encryptedData": "encryptedPayload"
      },
      "toDecrypt": {
        "encryptedPayload": "encryptedPayload.encryptedData"
      }
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "encryptedData",
  "dataEncoding": "hex",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "decryptionKey": "./path/to/private.key",
  "oaepPaddingDigestAlgorithm": "SHA-512",
  "encryptionKeyFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepHashingAlgorithm"
}

Payment Account Reference Inquiry

{
  "paths": {
    "$": {
      "toEncrypt": {
        "encryptedPayload.encryptedData": "encryptedPayload"
      },
      "toDecrypt": {
        "encryptedPayload": "encryptedPayload.encryptedData"
      }
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "encryptedData",
  "dataEncoding": "hex",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "decryptionKey": "./path/to/private.key",
  "oaepPaddingDigestAlgorithm": "SHA-512",
  "encryptionKeyFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepHashingAlgorithm"
}

Mastercard QR for Merchant Aggregators

{
  "paths": {
    "$": {
      "toEncrypt": {},
      "toDecrypt": {
        "$": "items"
      }
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "items",
  "dataEncoding": "base64",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "decryptionKey": "./path/to/private.key",
  "oaepPaddingDigestAlgorithm": "SHA-512",
  "encryptionCertificateFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepHashingAlgorithm"
}

Mastercard Directory Services

{
  "paths": {
    "$": {
      "toEncrypt": {
        "$": "encrypted_payload"
      },
      "toDecrypt": {
        "encrypted_payload": "$"
      }
    }
  },
  "useHttpHeaders": true,
  "ivFieldName": "x-iv",
  "encryptedKeyFieldName": "x-encrypted-key",
  "encryptedValueFieldName": "data",
  "dataEncoding": "base64",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "decryptionKey": "./path/to/private.key",
  "decryptionKeyPassword": "<yourkeypassword>",
  "oaepPaddingDigestAlgorithm": "SHA-256",
  "encryptionKeyFingerprintFieldName": "x-public-key-fingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "x-oaep-hashing-algorithm"
}

Buyer Payment Agent

{
  "paths": {
    "$": {
      "toEncrypt": {
        "card": "encryptedCard"
      },
      "toDecrypt": {
        "encryptedCard": "card"
      }
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "encryptedValue",
  "dataEncoding": "base64",
  "encryptionCertificate": "./path/to/your/encryption.crt",
  "decryptionKey": "./path/to/private.key",
  "oaepPaddingDigestAlgorithm": "SHA-256",
  "encryptionKeyFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepPaddingDigestAlgorithm"
}

Supplier Payment Agent

{
  "paths": {
    "$": {
      "toEncrypt": {},
      "toDecrypt": {
        "encryptedCard": "card"
      }
    }
  },
  "ivFieldName": "iv",
  "encryptedKeyFieldName": "encryptedKey",
  "encryptedValueFieldName": "encryptedValue",
  "dataEncoding": "base64",
  "decryptionKey": "./path/to/private.key",
  "oaepPaddingDigestAlgorithm": "SHA-256",
  "encryptionKeyFingerprintFieldName": "publicKeyFingerprint",
  "oaepPaddingDigestAlgorithmFieldName": "oaepPaddingDigestAlgorithm"
}