Skip to content

Commit 86aa8c7

Browse files
docs(key-manager): apply suggestions from code review
Co-authored-by: Jessica <[email protected]>
1 parent 44e86eb commit 86aa8c7

13 files changed

+15
-25
lines changed

pages/key-manager/api-cli/configuring-tink.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ We recommend using Tink with Scaleway’s Key Manager, especially for Go-based a
2424
- [Created a Key Manager key](/key-manager/how-to/create-km-key)
2525

2626

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-
2927
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.
3030
To use Tink with Scaleway Key Manager, you need to install dependencies that let Tink interact with Key Manager.
3131

3232

pages/key-manager/api-cli/create-dek-api-cli.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ However, you can use the DEK independently from Key Manager, for example with th
7272

7373
<Message type="important">
7474
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 use case.**
7676
</Message>

pages/key-manager/api-cli/encrypt-decrypt-data-with-km-dek.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,10 @@ To decrypt or encrypt your data using OpenSSL, you need to send your encrypted D
118118
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.
119119
120120
<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**.
122122
- You should **never save the plaintext DEK on disk or any permanent storage, as it poses a security risk**.
123123
</Message>
124124
125-
126125
### Encrypting data with OpenSSL
127126
128127
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
180179
2. Use your newly created DEK to encrypt the desired plaintext securely.
181180
182181
<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.
184183
</Message>
185184
186185
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.

pages/key-manager/api-cli/encrypt-decrypt-keys-with-streaming-aead-tink.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dates:
1111
posted: 2025-02-03
1212
---
1313

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.
1515

1616
Tink is a multi-language cryptographic library that simplifies common cryptographic operations like encryption, decryption, signing, and more. It provides cryptographic primitives, including AEAD.
1717

@@ -48,7 +48,6 @@ Open a terminal and paste the following commands to export your environment vari
4848

4949
## Encrypting and decrypting large data streams using AEAD
5050

51-
5251
1. Paste the following code into a Go file:
5352

5453
```
@@ -189,7 +188,7 @@ Open a terminal and paste the following commands to export your environment vari
189188
```
190189
<Message type="note">
191190
- 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.
193192
</Message>
194193

195194
2. Save your changes.

pages/key-manager/api-cli/manage-keys-with-tink.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Paste the following code into a `.go` file. This template contains the data we w
3838
```
3939

4040
<Message type="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:
4242
- It is slow: since the key resides on Scaleway Key Manager, each encryption or decryption operation translates into a remote API call.
4343
- 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`.
4444
- 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**,
123123
encDEK := buf.Bytes() // encrypted DEK in Tink wire format
124124
```
125125

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):
127127

128128
```console
129129
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
137137
...
138138
```
139139

140-
141140
## Associated Data
142141

143142
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
159158

160159
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.
161160

162-
163161
## Hierarchy of keys
164162

165163
Unlike KEKs that reside and are managed by Key Manager, DEKs are free: you can generate and have as many as you want.

pages/key-manager/api-cli/rotate-keys-api-cli.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Key rotation is a critical security practice that ensures that encryption keys a
1515

1616
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.
1717

18-
However, this may vary based on your specific use-case and risk profile.
18+
However, this may vary based on your specific use case and risk profile.
1919

2020
<Message type="important">
2121
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.
2626

2727
## Why is key rotation recommended?
2828

29-
Key rotation offers several important advantages such as:
29+
Key rotation offers several important advantages, such as:
3030

3131
- **Mitigating cryptanalysis attacks:** Limiting the amount of messages encrypted with the same key version reduces the risk of
3232
cryptanalysis attacks. The recommended key lifetime varies depending on the key algorithm, the number of messages, and

pages/key-manager/concepts.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Key Manager supports the three following cryptographic operations:
3737
- [Decryption](#decryption)
3838
- [Data encryption key](#data-encryption-key-dek) generation
3939

40-
4140
These operations are designed to protect data from unauthorized access, ensure its integrity, and verify the identities of users or systems.
4241

4342
## Data encryption key (DEK)
@@ -86,7 +85,7 @@ Key Manager only supports symmetric encryption.
8685

8786
## Encryption scheme
8887

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.
9089

9190
For example, in the `AES-256-GCM` encryption scheme:
9291

pages/key-manager/how-to/create-manage-dek.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dates:
1010
validation: 2025-02-03
1111
posted: 2025-02-03
1212
---
13+
1314
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).
1415

1516
You can then use your Key Manager key to encrypt your DEK.

pages/key-manager/how-to/disable-km-keys.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dates:
1313

1414
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.
1515

16-
1716
<Macro id="requirements" />
1817

1918
- 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
2928
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.
3029
</Message>
3130
4. Click **Disable key** to confirm.
32-

pages/key-manager/quickstart.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Scaleway's Key Manager allows you to create key encryption keys from the [Scalew
3636

3737
## How to create and manage a data encryption key (DEK)
3838

39-
4039
1. Click Key Manager in the **Security and Identity section** of the [Scaleway console](https://console.scaleway.com) side menu. Your keys display.
4140
2. Click the key for which to create a data encryption key.
4241
3. Scroll down to the **Create data encryption key** section.

0 commit comments

Comments
 (0)