Enigma provides a production-grade Scaleway backend in three separate layers:
keymgmt/scwkm: key lifecycle (CreateKey,GetKey,RotateKey,DeleteKey,Capabilities).recipient/scwkm: runtime DEK wrap/unwrap (WrapKey,UnwrapKey).resolver/scwkm: resolve a storedKeyReferenceto a runtime recipient.
This backend uses the official Scaleway Go SDK:
github.com/scaleway/scaleway-sdk-go
- Scaleway Key Manager is used as a root of trust for envelope encryption key custody.
- Enigma still encrypts document/field plaintext locally with AEAD.
- Enigma wraps and unwraps DEKs through Scaleway Key Manager operations.
- Wrapped DEKs are stored by the application in Enigma containers/value blobs.
- DEKs are not stored by Scaleway Key Manager for the application lifecycle.
This backend is classical cloud cryptography:
SecurityLevel:cloud_classicalSupportsPQNatively:false- No post-quantum guarantee is provided by this backend.
Current lifecycle/runtime mapping:
aes-256-gcm-> Scaleway key usagesymmetric_encryption/aes_256_gcmrsa-oaep-3072-sha256-> Scaleway key usageasymmetric_encryption/rsa_oaep_3072_sha256
Not supported in this backend:
ml-kem-768ml-kem-1024
Use localmlkem backend for local PQ workflows.
Shared config shape:
type Config struct {
Region string
AccessKey string
SecretKey string
APIURL string
ProjectID string
}Notes:
Regionis required for deterministic key reference resolution.- If
AccessKey/SecretKeyare omitted, SDK environment/profile resolution is used. APIURLis optional (useful for controlled environments/tests).ProjectIDis used for key creation context.
Scaleway references are serialized as generic Enigma KeyReference values:
Backend:scaleway_kmsID: Scaleway key IDVersion: key rotation count stringURI:enigma-scwkm://key/<key-id>?region=<region>&project_id=<project-id>&version=<n>
KeyReference never stores credentials or private key material.
km, _ := keymgmtscwkm.NewManager(keymgmtscwkm.Config{Region: "fr-par", ProjectID: "<project-id>"})
desc, _ := km.CreateKey(ctx, keymgmt.CreateKeyRequest{
Name: "org-a-primary",
Purpose: keymgmt.PurposeKeyWrapping,
Algorithm: keymgmt.AlgorithmAES256GCM,
ProtectionLevel: keymgmt.ProtectionKMS,
})
// Store desc.Reference in your application database.
_ = desc.Referenceres, _ := resolverscwkm.New(resolverscwkm.Config{Region: "fr-par", ProjectID: "<project-id>"})
runtimeRecipient, _ := res.ResolveRecipient(ctx, storedRef)_ = document.EncryptFile(ctx, "plain.txt", "plain.txt.enc", document.WithRecipient(runtimeRecipient))
_ = document.DecryptFile(ctx, "plain.txt.enc", "plain.dec.txt", document.WithRecipient(runtimeRecipient))KeyManager.RotateKeyrotates backend key material/provider version.document.Rewrapupdates recipient entries in existing encrypted containers.
These are distinct operations and must be orchestrated explicitly by the application.
Scaleway backend reports:
CanCreateKeys = trueCanDeleteKeys = trueCanRotateProviderNative = trueCanExportPublicKey = true(backend capability)CanResolveRecipient = trueSupportsPQNatively = falseSupportsClassicalWrapping = trueSupportsRewrapWorkflow = true
- No PQ-native wrapping.
- Only explicitly mapped algorithms are accepted.
- Live cloud integration tests are optional and not required for standard CI runs.