One Time Payment Code API 支援以 PGP 或 JWE 執行應用程式層加密。
PGP 加密
PGP 是一組標準的加密、解密和簽署演算法,可提供加密編譯隱私保護與驗證功能。
使用 PGP 來加密酬載時,合作夥伴必須能夠執行下列作業:
使用多組 PGP 金鑰來加密及解密酬載。
使用多個 PGP 金鑰簽署酬載。
使用多個簽名驗證酬載,其中任何一個簽名都可以包含由 Google 提供的金鑰。
將採用 Base64 編碼的網路安全酬載解密。
提供給 Google 的 PGP 公開金鑰必須具有用於加密的子金鑰。使用子金鑰可與主要金鑰分開輪替。主要金鑰用於驗證身分。私密金鑰須為 2048 個位元以上的 RSA 金鑰,效期為一年,生命週期最長為兩年。
在開始開發之前,您必須先與 Google 交換 PGP 金鑰。在這個步驟中,您將產生 PGP 公開/私密金鑰組,將公開金鑰提供給 Google,並從 Google 收回公開金鑰。在開發期間,您只需要交換在非正式版環境中用於開發及測試的沙箱金鑰。在測試及發布正式版之前,您必須執行另一項正式版金鑰的交換作業。
在開始開發之前,您必須先與 Google 交換 JWE 金鑰。在這個步驟中,您會產生公開/私密金鑰組,然後將公開金鑰提供給 Google,並取得 Google 提供的公開金鑰。在開發期間,您只需要交換在非正式版環境中用於開發及測試的沙箱金鑰。在測試及發布正式版之前,您必須執行另一項正式版金鑰的交換作業。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-10-16 (世界標準時間)。"],[[["One Time Payment Code APIs utilize either PGP or JWE for application layer encryption to ensure secure transactions."],["PGP encryption requires partners to manage key pairs, adhering to specific guidelines such as key expiration and algorithm usage for encryption and signing."],["JWE encryption, coupled with JWS signing, involves the use of JSON Web Tokens and mandates specific algorithms and key management practices for secure communication."],["Partners need to exchange keys with Google for both PGP and JWE/JWS methods, initially for sandbox testing and subsequently for production environments."],["Both PGP and JWE/JWS private keys must have a maximum lifetime of two years and should expire within one year, requiring regular key rotation for enhanced security."]]],["One Time Payment Code APIs utilize PGP or JWE for encryption. PGP requires partners to encrypt/decrypt and sign payloads with multiple keys, using `SHA384` for signing and `AES256` for encryption. Keys must be 2048+ bit RSA keys expiring in one year. JWE/JWS requires compact serialization, multiple key support, RSA-OAEP, ECDH-ES, and A256GCM encryption algorithms, with specific algorithms for signature creation. Both methods necessitate exchanging public-private keys with Google before development, with a one-year expiration for private keys.\n"]]