方法:Privilegeprivatekeydecrypt
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
解密,而无需检查封装的私钥 ACL。用于解密从 Google 导出(导出)的数据。
HTTP 请求
POST https://KACLS_URL/privilegedprivatekeydecrypt
将 KACLS_URL
替换为密钥访问控制列表服务 (KACLS) 网址。
路径参数
无。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"authentication": string,
"algorithm": string,
"encrypted_data_encryption_key": string,
"rsa_oaep_label": string,
"reason": string,
"spki_hash": string,
"spki_hash_algorithm": string,
"wrapped_private_key": string
}
|
字段 |
authentication |
string
身份提供程序 (IdP) 发出的 JWT,用于声明用户的身份。请参阅身份验证令牌。
|
algorithm |
string
在信封加密中用于加密数据加密密钥 (DEK) 的算法。
|
encrypted_data_encryption_key |
string (UTF-8)
采用 Base64 编码的加密内容加密密钥,该密钥是使用与私钥关联的公钥加密的。大小上限:1 KB。
|
rsa_oaep_label |
string
如果算法为 RSAES-OAEP,则为 Base64 编码的标签 L。如果算法不是 RSAES-OAEP,则系统会忽略此字段。
|
reason |
string (UTF-8)
一个传输 JSON 字符串,用于提供有关操作的其他背景信息。提供的 JSON 应先经过清理,然后才能显示。大小上限:1 KB。
|
spki_hash |
string
要访问的私钥的 DER 编码 SubjectPublicKeyInfo 的标准 base64 编码摘要。
|
spki_hash_algorithm |
string
用于生成 spki_hash 的算法。可以是“SHA-256”。
|
wrapped_private_key |
string
采用 base64 编码的封装私钥。大小上限:8 KB。
|
响应正文
如果成功,此方法将返回 base64 数据加密密钥。此密钥在客户端用于解密邮件正文。
如果操作失败,系统会返回结构化错误响应。
JSON 表示法 |
{
"data_encryption_key": string
}
|
字段 |
data_encryption_key |
string
使用 base64 编码的数据加密密钥。
|
示例
以下示例提供了 privilegedprivatekeydecrypt
方法的示例请求和响应。
请求
POST https://mykacls.example.org/v1/privilegedprivatekeydecrypt
{
"wrapped_private_key": "wHrlNOTI9mU6PBdqiq7EQA...",
"encrypted_data_encryption_key": "dGVzdCB3cmFwcGVkIGRlaw...",
"authentication": "eyJhbGciOi...",
"spki_hash": "LItGzrmjSFD57QdrY1dcLwYmSwBXzhQLAA6zVcen+r0=",
"spki_hash_algorithm": "SHA-256",
"algorithm": "RSA/ECB/PKCS1Padding",
"reason": "admin decrypt"
}
响应
{
"data_encryption_key": "akRQtv3nr+jUhcFL6JmKzB+WzUxbkkMyW5kQsqGUAFc"
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eDecrypts data exported from Google, like takeout, without checking private key ACLs.\u003c/p\u003e\n"],["\u003cp\u003eUses a \u003ccode\u003ePOST\u003c/code\u003e request to the \u003ccode\u003e/privilegedprivatekeydecrypt\u003c/code\u003e endpoint, providing authentication and encryption details in the request body.\u003c/p\u003e\n"],["\u003cp\u003eReturns the base64-encoded data encryption key upon successful decryption, which is used for client-side decryption of the message body.\u003c/p\u003e\n"],["\u003cp\u003eIn case of failure, the API returns a structured error reply.\u003c/p\u003e\n"]]],["This content describes a decryption process for data exported from Google, specifically using the `privilegedprivatekeydecrypt` method. A POST request is sent with a JSON body including an authentication token, encrypted data encryption key, wrapped private key, hashing information, the encryption algorithm, and a reason string. Upon successful decryption, the response returns a base64-encoded data encryption key, which is to be used for decrypting the message body. The data is not decrypted without checking the key's ACL.\n"],null,["# Method: privilegedprivatekeydecrypt\n\nDecrypts without checking the wrapped private key ACL. It's used to decrypt the\ndata exported ([takeout](https://support.google.com/a/answer/100458)) from Google.\n\n### HTTP request\n\n`POST https://`\u003cvar translate=\"no\"\u003eKACLS_URL\u003c/var\u003e`/privilegedprivatekeydecrypt`\n\nReplace \u003cvar translate=\"no\"\u003eKACLS_URL\u003c/var\u003e with the Key Access Control List\nService (KACLS) URL.\n\n### Path parameters\n\nNone.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"authentication\": string, \"algorithm\": string, \"encrypted_data_encryption_key\": string, \"rsa_oaep_label\": string, \"reason\": string, \"spki_hash\": string, \"spki_hash_algorithm\": string, \"wrapped_private_key\": string } ``` |\n\n| Fields ||\n|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `authentication` | `string` A JWT issued by the identity provider (IdP) asserting who the user is. See [authentication tokens](/workspace/cse/reference/authentication-tokens). |\n| `algorithm` | `string` The algorithm that was used to encrypt the Data Encryption Key (DEK) in envelope encryption. |\n| `encrypted_data_encryption_key` | `string (UTF-8)` Base64-encoded encrypted content encryption key, which is encrypted with the public key associated with the private key. Max size: 1 KB. |\n| `rsa_oaep_label` | `string` Base64-encoded label L, if the algorithm is RSAES-OAEP. If the algorithm is not RSAES-OAEP, this field is ignored. |\n| `reason` | `string (UTF-8)` A passthrough JSON string providing additional context about the operation. The JSON provided should be sanitized before being displayed. Max size: 1 KB. |\n| `spki_hash` | `string` Standard base64-encoded digest of the DER-encoded `SubjectPublicKeyInfo` of the private key being accessed. |\n| `spki_hash_algorithm` | `string` Algorithm used to produce `spki_hash`. Can be \"SHA-256\". |\n| `wrapped_private_key` | `string` The base64-encoded wrapped private key. Max size: 8 KB. |\n\n### Response body\n\nIf successful, this method returns the base64 data encryption key. This key is\nused client-side to decrypt the message body.\n\nIf the operation fails, a\n[structured error reply](/workspace/cse/reference/structured-errors)\nis returned.\n\n| JSON representation ||\n|-------------------------------------------|---|\n| ``` { \"data_encryption_key\": string } ``` |\n\n| Fields ||\n|-----------------------|------------------------------------------------|\n| `data_encryption_key` | `string` A base64-encoded data encryption key. |\n\n### Example\n\nThis example provides a sample request and response for the\n`privilegedprivatekeydecrypt` method.\n\n#### Request\n\n POST https://mykacls.example.org/v1/privilegedprivatekeydecrypt\n\n {\n \"wrapped_private_key\": \"wHrlNOTI9mU6PBdqiq7EQA...\",\n \"encrypted_data_encryption_key\": \"dGVzdCB3cmFwcGVkIGRlaw...\",\n \"authentication\": \"eyJhbGciOi...\",\n \"spki_hash\": \"LItGzrmjSFD57QdrY1dcLwYmSwBXzhQLAA6zVcen+r0=\",\n \"spki_hash_algorithm\": \"SHA-256\",\n \"algorithm\": \"RSA/ECB/PKCS1Padding\",\n \"reason\": \"admin decrypt\"\n }\n\n#### Response\n\n {\n \"data_encryption_key\": \"akRQtv3nr+jUhcFL6JmKzB+WzUxbkkMyW5kQsqGUAFc\"\n }"]]