메서드: privatekeydecrypt
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
래핑된 비공개 키를 래핑 해제한 다음 공개 키로 암호화된 콘텐츠 암호화 키를 복호화합니다.
HTTP 요청
POST https://KACLS_URL/privatekeydecrypt
KACLS_URL
을 주요 액세스 제어 목록 서비스 (KACLS) URL로 바꿉니다.
경로 매개변수
없음
요청 본문
요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.
JSON 표현 |
{
"authentication": string,
"authorization": string,
"algorithm": string,
"encrypted_data_encryption_key": string,
"rsa_oaep_label": string,
"reason": string,
"wrapped_private_key": string
}
|
필드 |
authentication |
string
사용자가 누구인지 어설션하는 ID 제공자 (IdP)에서 발급한 JWT입니다. 인증 토큰을 참고하세요.
|
authorization |
string
사용자가 resource_name 의 키를 래핑 해제할 수 있음을 어설션하는 JWT입니다. 승인 토큰을 참고하세요.
|
algorithm |
string
봉투 암호화에서 데이터 암호화 키 (DEK)를 암호화하는 데 사용된 알고리즘입니다.
|
encrypted_data_encryption_key |
string (UTF-8)
비공개 키와 연결된 공개 키로 암호화된 Base64로 인코딩된 암호화된 콘텐츠 암호화 키입니다. 최대 크기: 1KB
|
rsa_oaep_label |
string
알고리즘이 RSAES-OAEP인 경우 Base64로 인코딩된 라벨 L 알고리즘이 RSAES-OAEP가 아니면 이 필드는 무시됩니다.
|
reason |
string (UTF-8)
작업에 관한 추가 컨텍스트를 제공하는 통과 JSON 문자열입니다. 제공된 JSON은 표시되기 전에 정리해야 합니다. 최대 크기: 1KB
|
wrapped_private_key |
string
base64로 인코딩된 래핑된 비공개 키입니다. 최대 크기: 8KB
비공개 키 또는 래핑된 비공개 키의 형식은 키 액세스 제어 목록 서비스 (KACLS) 구현에 따라 달라집니다. 클라이언트와 Gmail 측에서 이는 불투명 blob으로 처리됩니다.
|
응답 본문
성공하면 이 메서드는 base64 데이터 암호화 키를 반환합니다.
작업이 실패하면 구조화된 오류 응답이 반환됩니다.
JSON 표현 |
{
"data_encryption_key": string
}
|
필드 |
data_encryption_key |
string
base64로 인코딩된 데이터 암호화 키입니다.
|
예
이 예에서는 privatekeydecrypt
메서드의 샘플 요청과 응답을 제공합니다.
요청
POST https://mykacls.example.org/v1/privatekeydecrypt
{
"wrapped_private_key": "wHrlNOTI9mU6PBdqiq7EQA...",
"encrypted_data_encryption_key": "dGVzdCB3cmFwcGVkIGRlaw...",
"authorization": "eyJhbGciOi...",
"authentication": "eyJhbGciOi...",
"algorithm": "RSA/ECB/PKCS1Padding",
"reason": "decrypt"
}
응답
{
"data_encryption_key": "akRQtv3nr+jUhcFL6JmKzB+WzUxbkkMyW5kQsqGUAFc="
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-04(UTC)
[null,null,["최종 업데이트: 2025-08-04(UTC)"],[[["\u003cp\u003eThis endpoint (\u003ccode\u003eprivatekeydecrypt\u003c/code\u003e) unwraps a wrapped private key and decrypts the data encryption key.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires authentication, authorization, algorithm, encrypted data encryption key, wrapped private key, and optionally, RSA OAEP label and reason.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful execution, the endpoint returns the base64-encoded data encryption key.\u003c/p\u003e\n"],["\u003cp\u003eIf the operation fails, a structured error response will be returned.\u003c/p\u003e\n"],["\u003cp\u003eAn example request and response are provided for illustration.\u003c/p\u003e\n"]]],["The `privatekeydecrypt` method unwraps a provided private key and decrypts an encrypted data encryption key (DEK). A POST request is sent to the `BASE_URL/privatekeydecrypt` endpoint. The request body requires `authentication`, `authorization`, `algorithm`, `encrypted_data_encryption_key`, `rsa_oaep_label`(optional), `reason`, and `wrapped_private_key`. Upon success, the response body returns the decrypted base64-encoded `data_encryption_key`; otherwise, a structured error is returned.\n"],null,["# Method: privatekeydecrypt\n\nUnwraps a wrapped private key and then decrypts the content encryption key\nthat is encrypted to the public key.\n\n### HTTP request\n\n`POST https://`\u003cvar translate=\"no\"\u003eKACLS_URL\u003c/var\u003e`/privatekeydecrypt`\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, \"authorization\": string, \"algorithm\": string, \"encrypted_data_encryption_key\": string, \"rsa_oaep_label\": string, \"reason\": 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| `authorization` | `string` A JWT asserting that the user is allowed to unwrap a key for `resource_name`. See [authorization tokens](/workspace/cse/reference/authorization-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| `wrapped_private_key` | `string` The base64-encoded wrapped private key. Max size: 8 KB. The format of the private key or the wrapped private key is up to the Key Access Control List Service (KACLS) implementation. On the client and on the Gmail side, this is treated as an opaque blob. |\n\n### Response body\n\nIf successful, this method returns a base64 data encryption key.\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 `privatekeydecrypt`\nmethod.\n\n#### Request\n\n POST https://mykacls.example.org/v1/privatekeydecrypt\n\n {\n \"wrapped_private_key\": \"wHrlNOTI9mU6PBdqiq7EQA...\",\n \"encrypted_data_encryption_key\": \"dGVzdCB3cmFwcGVkIGRlaw...\",\n \"authorization\": \"eyJhbGciOi...\",\n \"authentication\": \"eyJhbGciOi...\",\n \"algorithm\": \"RSA/ECB/PKCS1Padding\",\n \"reason\": \"decrypt\"\n }\n\n#### Response\n\n {\n \"data_encryption_key\": \"akRQtv3nr+jUhcFL6JmKzB+WzUxbkkMyW5kQsqGUAFc=\"\n }"]]