Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data encryption and security

Application-level encryption of sensitive data

PCI-sensitive fields in inbound and outbound API messages are encrypted using the PKCS#7 enveloped-data format. This is in addition to the mutual TLS (mTLS) connection.

PKCS#7 application-level encryption on top of mutual TLS (mTLS).

Keys and certificates

Use the TSH portal during TSH onboarding to manage PKCS#7 certificates:

  • Upload your Issuer certificate (ISSUER_PKCS7_CERT). Thales TSH uses it to encrypt PCI-sensitive fields sent to the issuer backend. Thales TSH also sends the certificate identifier so you can select the right private key (for example, in RequestCardDigitalization).

  • Download the Thales certificate. Use it to encrypt PCI-sensitive fields sent from the issuer backend to Thales TSH. Include the certificate identifier in your request so Thales TSH can select the right private key (for example, in UpdateCard).

Encryption parameters

PKCS#7 and CMS are defined in RFC 2315 and RFC 5652. Most cryptographic libraries support the required operations.

Encryption parameters:

  • Content encryption algorithm: AES-256-CBC with PKCS7Padding.

  • Key encryption algorithm: RSA/None/OAEPWithSHA256AndMGF1Padding (MGF1 uses SHA-256), with a 2048- or 4096-bit RSA public key.

  • Output encoding: hexadecimal string representation.

PKCS#7 encryption examples

These code samples show how to generate and process PKCS#7 enveloped-data. In the TSH API, the encrypted bytes are encoded as a hexadecimal string.

Last updated

Was this helpful?