Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
meta:
title: Cryptographic details of Scaleway Key Manager
description: This document details the cryptographic mechanisms of Scaleway Key Manager with adherence to ANSSI-PA-079 recommendations
content:
h1: Cryptographic details of Scaleway Key Manager
paragraph: This document details the cryptographic mechanisms of Scaleway Key Manager with adherence to ANSSI-PA-079 recommendations
tags: key-manager security
dates:
validation: 2025-04-30
posted: 2025-04-30
---

## Cryptographic primitives

### Random number generation

#### Generating KEKs

Scaleway Key Manager uses a **Cryptographically Secure Pseudorandom Number Generator (CSPRNG)**
to generate both keying material for managed keys and cryptographic unique IVs.

The CSPRNG relies on recent Linux provided ChaCha-based PRNG, which is seeded with high-entropy and unpredictable sources:
- Timing variations from hardware events
- True Random Number Generators (TRNGs), such as the `RDSEED`/`RDRAND` instructions on AMD64 family processors

<Message type="note">
Conforms to ANSSI-PA-079 R14.
</Message>

<Message type="warning">
That section does not apply to key imported by users via the Bring Your Own Key (BYOK) mechanism.
</Message>


#### Customer-provided KEKs (BYOK)

Scaleway's Key Manager supports Bring Your Own Key (BYOK), so customer can import their
own key material without relying on Scaleway to generate keys for them. In this case,
the user has the responsibility to provide a strong key material.

The provided material is not used as is. It is derived using the **HKDF algorithm with SHA2-256**
as the hash algorithm, with secure random bytes injected as salt.

### Symmetric encryption

Scaleway Key Manager uses **AES-256-GCM** (AES with 256-bit key in Galois Counter Mode) with
authenticated associated data (AEAD) to encrypt and decrypt user-provided payload.

To reduce the risk of key overuse, plaintext payloads cannot exceed 64 KiB.

For each encryption operation, a 96-bit Initialization Vector (IV)
is generated using the CSPRNG described in the previous section.

<Message type="note">
Conforms to ANSSI-PA-079 R1, R4, R12.
</Message>

<Message type="warning">
The Key Manager uses AES-256-GCM algorithm internally, but this does not constrain users to the same algorithm for their DEKs.
We recommend using cryptographic libraries like Tink, which handle DEK management with robust and reviewed algorithms.
Scaleway provides a Tink integrations for Go and Python, which is the preferred integration method.
- [Tink Python integration](https://github.com/scaleway/tink-py-scwkms)
- [Ting Go integration](https://github.com/scaleway/tink-go-scwkms)

</Message>