Open Data Validation and Decryption
Getting Open Data on the Server
The app needs to support the following methods to provide open data validation and decryption for SUD.
- OpenPaaS platform validates and decrypts open data
- Directly obtain open data
Method 1: OpenPaaS Platform Validates and Decrypts Open Data
After the app provides open data, the OpenPaaS platform signs and encrypts this open data. Signature verification and data encryption/decryption involve the user's session key session_key.
Data Signature Verification
To ensure the security of user data returned by the open API, the OpenPaaS platform signs the plaintext data.
Encrypted Data Decryption Algorithm
If the API involves sensitive data, the plaintext content of the API will not contain this sensitive data. The app returns the data after encrypting it. The encrypted data (encryptedData) is symmetrically decrypted. The decryption algorithm is as follows:
- The algorithm used for symmetric decryption is AES-128-CBC, and the data uses PKCS#7 padding.
- The target ciphertext for symmetric decryption is Base64_Decode(encryptedData).
- The symmetric decryption key aeskey = Base64_Decode(session_key), where aeskey is 16 bytes.
- The initialization vector of the symmetric decryption algorithm is Base64_Decode(iv), where iv is returned by the data API.
