Generating the Random Bytes
The post /v1/cckm/sap/hyok/v1/keystores/{keystore_id}/keys/{external_key_id}/generate-random-bytes
API generates random bytes using HMAC512-DRBG implementation and encrypts the generated random number string using the specified key. Only AES-GCM encryption of the generated random bytes is supported. The key specified in the key_id
path variable MUST be a symmetric key with ENCRYPT and DECRYPT attributes.
Request Parameters
Parameter | Type | Description |
---|---|---|
length | integer | Length of the random bytes to be generated (1-4096 bytes). |
sap_tenant_id | string | ID of the SAP Tenant. |
Example Request
post https://<Host IP Address>/api/v1/cckm/sap/hyok/v1/keystores/{keystore_id}/keys/{external_key_id}/generate-random-bytes
<authorization token and other headers>
{
"length": 16,
"request_metadata": {
"sap_tenant_id": "5e3d1d87-9502-42af-a946-3ffec9e71a44"
}
}
Example Response
{
"plaintext": "7Jh/Jnr1tOolEItNnoFd9Q==",
"ciphertext": "PQaX+CayoP2teh1CuzGKZA==",
"iv": "lAJERudiOA+/fV0l",
"tag": "B1WmXxueXz0zkFD6Bbl9fg==",
"key_version_id": "0dab7383-fa9b-4540-bcc7-fe03a6f59487"
}
Response Codes
Response Code | Description |
---|---|
200 | Ok |
400 | Bad request |
401 | Unauthorized |
404 | Not found |
403 | Forbidden |
500 | Internal server error |
Refer to HTTP status codes for details.