Data Security Key Reference
This document describes the purpose, configuration entry points, and usage documentation of the "data security" keys involved in OpenPaaS integration.
1. Data Symmetric Encryption Key
1.1 Purpose
A symmetric key held jointly by the APP Server and SUD OP SVR, used for symmetric encryption/decryption of sensitive business data. Typical use cases:
- sessionKey encryption/decryption: SUD OP SVR encrypts
sessionKeyintoencrypted_session_keyand delivers it; the APP Server uses this key to decrypt it and obtain the realsessionKey; - userSignature encryption/decryption: When the APP Server generates a
userSignature, it uses this key to AES-GCM encrypt the authentication payload.
1.2 Algorithm and Specification
| Item | Value |
|---|---|
| Encryption algorithm | AES-256-GCM |
| Key length | 256 bits (32 bytes) |
| Encoding format | 43-character Base64 string, 32 bytes after decoding |
1.3 Configuration and Download
Generate and download it on the corresponding configuration page in the SUD OpenPaaS admin console (downloadable only once; keep it safe locally, and it is recommended to host it in a KMS or an encrypted configuration center).
This key and the "symmetric key" used for S2S message encryption/decryption in Server API Signature and Encryption are two independent sets of keys, generated and downloaded on different configuration pages. Do not mix them up.
1.4 Usage Documentation
1.5 Example Code
Complete example code covering both the userSignature generation and sessionKey decryption scenarios is available in Example Code.
2. Data Signature Public/Private Key
2.1 Purpose
Used by the APP side to verify the signature field within the business data payload delivered by SUD OpenPaaS, confirming that the payload comes from a genuine source and has not been tampered with. Typical use cases:
gameSignaturesignature verification- Signature verification of other signed business data fields
This mechanism only handles the signature of "business data payload fields"; encryption/signing at the HTTP message layer for APIs and callbacks goes through Server API Signature and Encryption (application public/private key / SUD OpenPaaS certificate). The two do not overlap; do not mix them up.
2.2 Obtaining the Public Key
Obtain the public key corresponding to the application in the SUD OpenPaaS admin console. If the APP does not enable signature verification, it can be skipped (not recommended, as signature verification is the key line of defense against payload forgery).
2.3 Signature Verification Algorithm Specification
| Item | Value |
|---|---|
| Signature algorithm | RSASSA-PSS |
| Digest algorithm | SHA-256 |
| MGF | MGF1 (SHA-256) |
| Salt length | 32 bytes |
| Trailer Field | 1 |
| Content-to-sign encoding | UTF-8 |
| Signature output encoding | Base64 |
SUD OpenPaaS signs the business data payload using the private key corresponding to the application, and the APP side verifies the signature using the public key obtained from the admin console. The "concatenation rule for the content to be verified" for each business data field (such as gameSignature) is defined separately in the corresponding business documentation.
2.4 Example Code
Complete example code covering the business data payload signature verification scenario is available in Example Code.
