Skip to content
Cryptographic Operations

Cryptographic Operations

A suite of cryptographic primitives offered by the Exoscale KMS.

Read more


Other Operations

decrypt

[BETA] Decrypt

POST /kms-key/{id}/decrypt

Decrypt a ciphertext.

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
ciphertextstringyes
encryption-contextstringno
Example
{
  "ciphertext": "string",
  "encryption-context": "string"
}

Responses

200: 200

Content-Type: application/json

PropertyTypeDescription
plaintextstring
Example output
{
  "plaintext": "string"
}

400: 400

Content-Type: application/json

PropertyTypeDescription
detailstring
errorsarray of Errors
instancestring
statusinteger
titlestring
typestring
Example output
{
  "detail": "string",
  "errors": [
    {
      "detail": "string",
      "location": "string",
      "path": "string",
      "pointer": "string"
    }
  ],
  "instance": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for decrypt: golang | Python | Java

CLI: exo api decrypt

encrypt

[BETA] Encrypt

POST /kms-key/{id}/encrypt

Encrypt a plaintext.

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
plaintextstringyes
encryption-contextstringno
Example
{
  "encryption-context": "string",
  "plaintext": "string"
}

Responses

200: 200

Content-Type: application/json

PropertyTypeDescription
ciphertextstring
Example output
{
  "ciphertext": "string"
}

400: 400

Content-Type: application/json

PropertyTypeDescription
detailstring
errorsarray of Errors
instancestring
statusinteger
titlestring
typestring
Example output
{
  "detail": "string",
  "errors": [
    {
      "detail": "string",
      "location": "string",
      "path": "string",
      "pointer": "string"
    }
  ],
  "instance": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for encrypt: golang | Python | Java

CLI: exo api encrypt

generate-data-key

[BETA] Generate Data Key

POST /kms-key/{id}/generate-data-key

Generate a Data Encryption Key from a given KMS Key.

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
bytes-countintegerno
encryption-contextstringno
key-specstringnoAllowed values: AES-256.
Example
{
  "bytes-count": 0,
  "encryption-context": "string",
  "key-spec": "AES-256"
}

Responses

200: 200

Content-Type: application/json

PropertyTypeDescription
ciphertextstring
plaintextstring
Example output
{
  "ciphertext": "string",
  "plaintext": "string"
}

400: 400

Content-Type: application/json

PropertyTypeDescription
detailstring
errorsarray of Errors
instancestring
statusinteger
titlestring
typestring
Example output
{
  "detail": "string",
  "errors": [
    {
      "detail": "string",
      "location": "string",
      "path": "string",
      "pointer": "string"
    }
  ],
  "instance": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for generate-data-key: golang | Python | Java

CLI: exo api generate-data-key

re-encrypt

[BETA] Re-encrypt

POST /kms-key/{id}/re-encrypt

Decrypts an existing ciphertext using its original key material and re-encrypts the underlying plaintext using a specified KMS key or the latest key material of the same KMS Key.

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
destinationDestinationyes
sourceSourceyes
Example
{
  "destination": {
    "encryption-context": "string",
    "key": "string"
  },
  "source": {
    "ciphertext": "string",
    "encryption-context": "string",
    "key": "string"
  }
}

Responses

200: 200

Content-Type: application/json

PropertyTypeDescription
ciphertextstring
Example output
{
  "ciphertext": "string"
}

400: 400

Content-Type: application/json

PropertyTypeDescription
detailstring
errorsarray of Errors
instancestring
statusinteger
titlestring
typestring
Example output
{
  "detail": "string",
  "errors": [
    {
      "detail": "string",
      "location": "string",
      "path": "string",
      "pointer": "string"
    }
  ],
  "instance": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for re-encrypt: golang | Python | Java

CLI: exo api re-encrypt

Last updated on