|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: Cryptographic details of Scaleway Key Manager |
| 4 | + description: This page describes the cryptographic mechanisms used by Scaleway Key Manager, in accordance with ANSSI-PA-079 recommendations. |
| 5 | +content: |
| 6 | + h1: Cryptographic details of Scaleway Key Manager |
| 7 | + paragraph: This page describes the cryptographic mechanisms used by Scaleway Key Manager, in accordance with ANSSI-PA-079 recommendations. |
| 8 | +tags: key-manager security |
| 9 | +categories: |
| 10 | + - identity-and-access-management |
| 11 | +dates: |
| 12 | + validation: 2025-05-12 |
| 13 | + posted: 2025-05-12 |
| 14 | +--- |
| 15 | + |
| 16 | +## Cryptographic primitives in Scaleway Key Manager |
| 17 | + |
| 18 | +This page provides information on the core cryptographic mechanisms used by Key Manager. It explains how cryptographic keys are generated, managed, and used to encrypt data. Key Manager uses these mechanisms in compliance with the cryptographic guidelines issued by [France's national cybersecurity agency](https://cyber.gouv.fr/), as outlined in the ANSSI-PA-079 recommendations, to ensure the confidentiality and integrity of customer data. |
| 19 | + |
| 20 | +### Random number generation |
| 21 | + |
| 22 | +#### Key encryption key (KEK) generation |
| 23 | + |
| 24 | +Scaleway Key Manager uses a **C**ryptographically **S**ecure **P**seudorandom **N**umber **G**enerator (CSPRNG) to generate both keying material for managed keys and cryptographically unique initialization vectors (IVs). |
| 25 | + |
| 26 | +This CSPRNG is based on the ChaCha-based pseudorandom number generator provided by modern Linux kernels. It is seeded with high-entropy, unpredictable sources, such as: |
| 27 | + |
| 28 | +- Timing variations from hardware events |
| 29 | +- True Random Number Generators (TRNGs), including the `RDSEED` and `RDRAND` instructions available on AMD64 processors |
| 30 | + |
| 31 | +<Message type="note"> |
| 32 | + The section above is in compliance with [ANSSI-PA-079 Recommendation R14](https://cyber.gouv.fr/sites/default/files/2021/03/anssi-guide-selection_crypto-1.0.pdf), which mandates the use of a cryptographically secure and appropriately seeded pseudorandom generator for key and IV material. |
| 33 | +</Message> |
| 34 | + |
| 35 | +<Message type="important"> |
| 36 | + The information above applies only to keys generated by Key Manager. If you import a key using the Bring Your Own Key (BYOK) mechanism, these safeguards are not applied to your key material. |
| 37 | +</Message> |
| 38 | + |
| 39 | + |
| 40 | +#### Customer-provided KEKs (BYOK) |
| 41 | + |
| 42 | +Scaleway Key Manager supports Bring Your Own Key (BYOK), allowing customers to import their own key material. In this model, Scaleway does not generate keys on behalf of the customer. Instead, the responsibility for generating strong key material lies with the user. |
| 43 | + |
| 44 | +To protect against direct reuse, imported key material is not used directly. Instead, it is processed using the HKDF algorithm (HMAC-based Key Derivation Function) with SHA-256 as the hash algorithm, incorporating secure random bytes added as a salt value. |
| 45 | + |
| 46 | +### Symmetric encryption |
| 47 | + |
| 48 | +Scaleway Key Manager uses **AES-256-GCM** (AES with a 256-bit key in Galois/Counter Mode) with authenticated associated data (AEAD) for encrypting and decrypting user payloads. |
| 49 | + |
| 50 | +To reduce the risk of key overuse, plaintext payloads are limited to a maximum size of 64 KiB. A unique 96-bit initialization vector (IV) is generated using the CSPRNG described in the section above. |
| 51 | + |
| 52 | +<Message type="note"> |
| 53 | + The section above is in compliance with ANSSI-PA-079 Recommendations R1, R4, and R12 regarding the choice of secure, authenticated symmetric encryption (R1), key and IV uniqueness (R4), payload size limitations and proper use of AEAD modes (R12). Refer to the ANSSI-PA-079 recommendations [documentation](https://cyber.gouv.fr/sites/default/files/2021/03/anssi-guide-selection_crypto-1.0.pdf) for more details. |
| 54 | +</Message> |
| 55 | + |
| 56 | +<Message type="important"> |
| 57 | + While Key Manager internally uses AES-256-GCM, this does not restrict users to the same algorithm for their data encryption keys (DEKs). |
| 58 | + We recommend using cryptographic libraries like Tink, which handle DEK management with robust and reviewed algorithms. |
| 59 | + Scaleway provides Tink integrations for Go and Python, which is the preferred integration method. |
| 60 | + |
| 61 | + - [Tink Python integration](https://github.com/scaleway/tink-py-scwkms) |
| 62 | + - [Ting Go integration](https://github.com/scaleway/tink-go-scwkms) |
| 63 | + |
| 64 | +</Message> |
0 commit comments