You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: identity-and-access-management/key-manager/api-cli/create-dek-api-cli.mdx
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,9 @@ An output similar to the following should display:
48
48
CreatedAt <creation_date>
49
49
```
50
50
51
+
<Messagetype="important">
52
+
For convenience, Key Manager returns the plaintext version of the DEK, but it should never be stored in this form. Storing the decrypted plaintext of your DEK undermines the security provided by Key Manager, rendering it ineffective.
53
+
</Message>
51
54
52
55
## Generate a DEK using the API
53
56
@@ -65,7 +68,7 @@ Key Manager also supports the `GenerateDataKey` request without a plaintext oper
65
68
66
69
If you need to use your DEK, you can decrypt it using the [Decrypt data operation](https://www.scaleway.com/en/developers/api/key-manager/#path-keys-decrypt-data) specifying the `kek_id` parameter used to encrypt it.
67
70
68
-
Key Manager **does not allow the use of data encryption keys for data encryption**.
71
+
**Key Manager does not handle direct data encryption**. It is specifically designed to **encrypt and decrypt Data Encryption Keys (DEKs) and is limited to processing inputs up to 64KB in size**.
69
72
70
73
However, you can use the DEK independently from Key Manager, for example with the [Tink extension](/encrypt-decrypt-dek-/#encrypt-and-decrypt-data-with-tink-and-key-manager) or with [OpenSSL](/encrypt-decrypt-dek/#manually-encrypt-and-decrypt-data-with-a-key-manager-dek).
Copy file name to clipboardExpand all lines: identity-and-access-management/key-manager/api-cli/encrypt-decrypt-data-with-km-dek.mdx
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
meta:
3
3
title: Encrypting and decrypting data with a Key Manager data encryption key
4
-
description: Learn how to use Tink with Scaleway's Key Manager to securely encrypt and manage keys, including KEKs and DEKs, in Go applications.
4
+
description: Learn how to use Tink with Scaleway's Key Manager to securely encrypt and manage keys, including KEKs and DEKs, in Go and Python applications.
5
5
content:
6
6
h1: Encrypting and decrypting data with a Key Manager data encryption key
7
-
paragraph: Learn how to use Tink with Scaleway's Key Manager to securely encrypt and manage keys, including KEKs and DEKs, in Go applications.
7
+
paragraph: Learn how to use Tink with Scaleway's Key Manager to securely encrypt and manage keys, including KEKs and DEKs, in Go and Python applications.
8
8
tags: key-manager encryption decryption kms dek data-encryption-key
9
9
dates:
10
-
validation: 2025-01-06
11
-
posted: 2025-01-06
10
+
validation: 2025-01-20
11
+
posted: 2025-01-20
12
12
categories:
13
13
- identity-and-access-management
14
14
---
@@ -23,8 +23,11 @@ This page shows you how to encrypt and decrypt data using your Key Manager [data
23
23
- Retrieved your key encryption key's ID
24
24
- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/)
25
25
- Downloaded and configured the [Scaleway CLI](https://github.com/scaleway/scaleway-cli?tab=readme-ov-file#getting-started)
26
-
-[Dowloaded and installed Python](https://www.python.org/downloads/) or [Go](https://go.dev/doc/install)
26
+
-[Dowloaded and installed Python](https://www.python.org/downloads/)version >=3.9 or [Go](https://go.dev/doc/install)
27
27
-[Created a Key Manager data encryption key](/identity-and-access-management/key-manager/how-to/create-manage-dek/)
Poetry is used to manage dependencies. You can however use any package management tool of your choice. For more information on managing dependencies, refer to the [official Python documentation](https://packaging.python.org/en/latest/tutorials/managing-dependencies/).
71
75
</Message>
72
-
73
-
2. Add the [Scaleway Tink provider for Python](https://github.com/scaleway/tink-py-scwkms/tree/v0.1.0):
76
+
2. Initialize your project:
77
+
```
78
+
poetry init
79
+
```
80
+
3. Add the [Scaleway Tink provider for Python](https://github.com/scaleway/tink-py-scwkms/tree/v0.1.0):
74
81
```bash
75
82
poetry add scaleway-tink
76
83
```
77
-
3. Copy the following template:
84
+
4. Copy the following template:
78
85
```bash
79
86
from scaleway_tink.integration.scwkms import clientimport base64
80
87
import base64
@@ -93,9 +100,9 @@ Open a terminal and paste the following command to export your environment varia
93
100
94
101
main()
95
102
```
96
-
4. Create a file named `example.py` and paste the code from the step above in it.
103
+
5. Create a file named `example.py` and paste the code from the step above in it.
0 commit comments