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: pages/key-manager/api-cli/configuring-tink.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@ We recommend using Tink with Scaleway’s Key Manager, especially for Go-based a
24
24
-[Created a Key Manager key](/key-manager/how-to/create-km-key)
25
25
26
26
27
-
The Scaleway Tink extension generates a unique data encryption key for each piece of data that it encrypts. This method follows the cryptography best practices of using unique data encryption keys for each encryption operation.
28
-
29
27
Tink is a library that helps you perform encryption (securing data) and manage encryption keys. It can work with various key management services (KMS), including Scaleway's Key Manager.
28
+
29
+
The Scaleway Tink extension generates a unique data encryption key for each piece of data that it encrypts. This method follows the cryptography best practices of using unique data encryption keys for each encryption operation.
30
30
To use Tink with Scaleway Key Manager, you need to install dependencies that let Tink interact with Key Manager.
Copy file name to clipboardExpand all lines: pages/key-manager/api-cli/create-dek-api-cli.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,5 +72,5 @@ However, you can use the DEK independently from Key Manager, for example with th
72
72
73
73
<Messagetype="important">
74
74
The way the KEK is generated, its length, and the encryption algorithm used, **cannot be changed or customized after creation**. However, unlike the KEK, you have the flexibility to choose any encryption algorithm (cipher) you prefer for encrypting and decrypting your data with the DEK. You are not restricted to a specific encryption method for the data itself.
75
-
**We highly recommend that you use standard and well-established ciphers (and the proper mode), as well as a library like Tink, that chooses the right cryptosystem according to your use-case.**
75
+
**We highly recommend that you use standard and well-established ciphers (and the proper mode), as well as a library like Tink, that chooses the right cryptosystem according to your usecase.**
Copy file name to clipboardExpand all lines: pages/key-manager/api-cli/encrypt-decrypt-data-with-km-dek.mdx
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,10 @@ To decrypt or encrypt your data using OpenSSL, you need to send your encrypted D
118
118
Scaleway Key Manager then uses your key encryption key (KEK) to decrypt the encrypted DEK, returning it to its plaintext (unencrypted) form, which you can then use to decrypt your actual data.
119
119
120
120
<Message type="important">
121
-
- **We do not recommend that you use OpenSSL in a production environment**.
121
+
- **We do not recommend using OpenSSL in a production environment**.
122
122
- You should **never save the plaintext DEK on disk or any permanent storage, as it poses a security risk**.
123
123
</Message>
124
124
125
-
126
125
### Encrypting data with OpenSSL
127
126
128
127
To encrypt your data using OpenSSl, you need to:
@@ -180,7 +179,7 @@ Open a terminal and paste the following command to perform the actions described
180
179
2. Use your newly created DEK to encrypt the desired plaintext securely.
181
180
182
181
<Message type="note">
183
-
We recommend using **standard and well-established ciphers** such as `AES` (Advanced Encryption Standard), to perform the encryption operation.
182
+
We recommend using **standard and well-established ciphers**, such as `AES` (Advanced Encryption Standard), to perform the encryption operation.
184
183
</Message>
185
184
186
185
3. After encrypting the plaintext using your DEK, concatenate the encrypted DEK with the resulting ciphertext. This ensures that the encrypted DEK is securely associated with the corresponding ciphertext for decryption.
Copy file name to clipboardExpand all lines: pages/key-manager/api-cli/encrypt-decrypt-keys-with-streaming-aead-tink.mdx
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ dates:
11
11
posted: 2025-02-03
12
12
---
13
13
14
-
This page shows you how to use Scaleway Key Manager with Tink to securely handle large data streams. Specifically, it uses AEAD, which ensures both encryption and authentication of data, along with associated data (like file paths) that is authenticated but not encrypted. This is important for handling large files efficiently, especially in cases where stream processing is necessary (such as video files or large logs).
14
+
This page shows you how to use Scaleway Key Manager with Tink to securely handle large data streams. Specifically, it uses AEAD, which ensures both encryption and authentication of data, along with associated data (like file paths) that is authenticated but not encrypted. This is important for handling large files efficiently, especially in cases where stream processing is necessary, such as video files or large logs.
15
15
16
16
Tink is a multi-language cryptographic library that simplifies common cryptographic operations like encryption, decryption, signing, and more. It provides cryptographic primitives, including AEAD.
17
17
@@ -48,7 +48,6 @@ Open a terminal and paste the following commands to export your environment vari
48
48
49
49
## Encrypting and decrypting large data streams using AEAD
50
50
51
-
52
51
1. Paste the following code into a Go file:
53
52
54
53
```
@@ -189,7 +188,7 @@ Open a terminal and paste the following commands to export your environment vari
189
188
```
190
189
<Messagetype="note">
191
190
- The example above shows you how to use the Key Manager remote key encryption key to protect your data encryption key and AEAD stream, you can also protect the data encryption key using another non-remote key.
192
-
- Associated data is authenticated but not encrypted
191
+
- Associated data is authenticated but not encrypted.
Copy file name to clipboardExpand all lines: pages/key-manager/api-cli/manage-keys-with-tink.mdx
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Paste the following code into a `.go` file. This template contains the data we w
38
38
```
39
39
40
40
<Messagetype="important">
41
-
While the code shown above functions as intended, this is not a recommended pattern and the following limitations apply:
41
+
While the code shown above functions as intended, this is not a recommended pattern, and the following limitations apply:
42
42
- It is slow: since the key resides on Scaleway Key Manager, each encryption or decryption operation translates into a remote API call.
43
43
- The payload to encrypt is limited in size: Key Manager only allows up to 64 KiB. As a result, you will not be able to encrypt larger payloads with `kekAEAD`.
44
44
- You cannot choose the cipher and the algorithm that suit your use case, Key Manager handles that on your behalf.
@@ -123,7 +123,7 @@ Tink does not handle single keys, it manages groups of keys called **keysets**,
123
123
encDEK:= buf.Bytes() // encrypted DEK in Tink wire format
124
124
```
125
125
126
-
You can then store the bytes of the encrypted DEK in a database for example, with the encrypted data it protects. For example, the encrypted data (enc_data) and the encrypted DEK (enc_dek) might be stored together in a row in a database (base64-encoded in the following example):
126
+
You can then store the bytes of the encrypted DEK in a database, for example, with the encrypted data it protects. For example, the encrypted data (enc_data) and the encrypted DEK (enc_dek) might be stored together in a row in a database (base64-encoded in the following example):
127
127
128
128
```console
129
129
SELECT id, enc_data, enc_dek FROM sensible_stuff;
@@ -137,7 +137,6 @@ You can then store the bytes of the encrypted DEK in a database for example, wit
137
137
...
138
138
```
139
139
140
-
141
140
## Associated Data
142
141
143
142
Associated Data (AD) is not encrypted, but it is authenticated. It must be the same when you encrypt and decrypt data, otherwise the decryption fails. This is useful to prevent reading the wrong data in the wrong context. In the table above, the data in both rows 42 and 43 is protected by the same DEK. If we swapped the data, an application would be able to decrypt the data from another row. But, by providing the intended ID as the associated data, the decryption would fail.
@@ -159,7 +158,6 @@ Run the following command to encrypt your data with `Associated Data`. In the ex
159
158
160
159
Associated Data does not need to be stored, as it can be inferred from the context at decryption time. It is also possible to use a unique DEK for each payload. We recommend using Associated Data.
161
160
162
-
163
161
## Hierarchy of keys
164
162
165
163
Unlike KEKs that reside and are managed by Key Manager, DEKs are free: you can generate and have as many as you want.
Copy file name to clipboardExpand all lines: pages/key-manager/api-cli/rotate-keys-api-cli.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Key rotation is a critical security practice that ensures that encryption keys a
15
15
16
16
This reduces the risk of exposure if a key is compromised, thus enhancing the overall security and resilience of your system. For symmetric encryption, it is generally recommended to rotate keys every 30 to 90 days.
17
17
18
-
However, this may vary based on your specific use-case and risk profile.
18
+
However, this may vary based on your specific usecase and risk profile.
19
19
20
20
<Messagetype="important">
21
21
Rotating a key will not re-encrypt your data encryption key or any data you may have encrypted. When performing a
@@ -26,7 +26,7 @@ However, this may vary based on your specific use-case and risk profile.
26
26
27
27
## Why is key rotation recommended?
28
28
29
-
Key rotation offers several important advantages such as:
29
+
Key rotation offers several important advantages, such as:
30
30
31
31
-**Mitigating cryptanalysis attacks:** Limiting the amount of messages encrypted with the same key version reduces the risk of
32
32
cryptanalysis attacks. The recommended key lifetime varies depending on the key algorithm, the number of messages, and
These operations are designed to protect data from unauthorized access, ensure its integrity, and verify the identities of users or systems.
42
41
43
42
## Data encryption key (DEK)
@@ -86,7 +85,7 @@ Key Manager only supports symmetric encryption.
86
85
87
86
## Encryption scheme
88
87
89
-
An encryption scheme is a structured approach to encryption that specifies the encryption algorithm, key size, and mode of operation for block chiphers.
88
+
An encryption scheme is a structured approach to encryption that specifies the encryption algorithm, key size, and mode of operation for block ciphers.
90
89
91
90
For example, in the `AES-256-GCM` encryption scheme:
Copy file name to clipboardExpand all lines: pages/key-manager/how-to/create-manage-dek.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ dates:
10
10
validation: 2025-02-03
11
11
posted: 2025-02-03
12
12
---
13
+
13
14
Scaleway's key Manager allows you to create [data encryption keys (DEK)](/key-manager/concepts/#data-encryption-key-dek) to encrypt and decrypt your [payload](/key-manager/concepts/#payload).
14
15
15
16
You can then use your Key Manager key to encrypt your DEK.
Copy file name to clipboardExpand all lines: pages/key-manager/how-to/disable-km-keys.mdx
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,6 @@ dates:
13
13
14
14
This page shows you how to disable a Key Manager key which is enabled by default. Disabling a key renders it unusable for cryptographic operations by any user and application.
15
15
16
-
17
16
<Macroid="requirements" />
18
17
19
18
- A Scaleway account logged into the [console](https://console.scaleway.com)
@@ -29,4 +28,3 @@ This page shows you how to disable a Key Manager key which is enabled by default
29
28
Your key might be used by third-party programs. Disabling it could cause your services to stop working. You can enable your key again anytime.
0 commit comments