This page summarizes the cryptographic mechanisms of Stronghold:
- Which algorithms are used for TLS.
- How data in the storage is encrypted.
- How HSM complements the built-in encryption.
- Which algorithms are available in
PKI. - Which algorithms are available in
Transit.
Summary
The table lists the main cryptographic mechanisms of Stronghold:
| Area | Main algorithms and mechanisms |
|---|---|
| TLS | Configurable versions TLS 1.0–TLS 1.3, cipher suites for TLS 1.2 and earlier, server and client certificate verification |
| Storage encryption | Built-in AES-256-GCM cryptographic barrier |
| Additional protection | seal "pkcs11" for HSM and seal wrap for additional encryption of critical data |
| PKI | RSA, EC, Ed25519, and supported GOST variants |
| Transit | AES-GCM, ChaCha20-Poly1305, RSA, ECDSA, Ed25519, HMAC, and supported GOST variants |
GOST algorithms
GOST cryptography is available in Stronghold EE. Stronghold EE supports the following scenarios with GOST algorithms:
TLSsupportsTLS 1.3with verification of certificates based onGOST 34.10keys and with theMagmaandKuznyechikGOST ciphers.- The
PKIengine supports issuing certificates withGOST 34.10keys. - The
Transitengine supports signing with asymmetricGOST 34.10keys, as well as encryption with the symmetricGOST 34.12(Magma,Kuznyechik) andGOST 28147-89algorithms. - When
Managed Keysand HSMs that support GOST cryptography are used, you can work not only withRSA, but also with keys and certificates based on the supported GOST algorithms.
TLS: versions, cipher suites, and certificate verification
TLS for the Stronghold API is configured in the listener "tcp" section using the standalone configuration parameters.
Supported TLS versions
The tls_min_version and tls_max_version parameters accept the following values:
tls10tls11tls12tls13
For production environments, use only TLS 1.2 and TLS 1.3.
Supported cipher suites
The tls_cipher_suites parameter lets you explicitly set the list of ciphers for TLS 1.2 and earlier versions.
Keep in mind:
tls_cipher_suitesdoes not affectTLS 1.3; forTLS 1.3, the cipher order is set by the globaltls_13_cipher_policyparameter described in the configuration.- The names of allowed ciphers correspond to the list from Go
crypto/tls. - If you specify only cipher suites that are forbidden by the
HTTP/2specification, the CLI and othernet/http-based clients may not work correctly.
A practical approach:
- Limit
tls_min_versiontotls12. - Set
tls_cipher_suitesonly when required by security or compatibility requirements. - After changing the cipher suites, check that the CLI, UI, and load balancers work.
Certificate verification
Stronghold supports several levels of TLS certificate verification:
tls_cert_fileandtls_key_fileset the server certificate and private key.tls_cert_filecan contain a full PEM chain, in which the node certificate must come first.tls_require_and_verify_client_cert = trueenables mandatory client certificate verification.tls_client_ca_filesets the CA file that Stronghold uses to verify client certificates.tls_disable_client_certs = truefully disables client certificate verification.
In environments that use GOST cryptography, Stronghold supports TLS 1.3 with verification of GOST 34.10 certificates, as well as TLS encryption using the Magma and Kuznyechik algorithms.
Storage encryption
Stronghold protects data in the storage with a built-in cryptographic barrier based on AES-256-GCM.
This means:
AES-GCMwith a 256-bit key is used to encrypt data in the storage.- The barrier provides not only confidentiality, but also data integrity control.
- A separate
nonceis used for each entry; the standardGCM noncesize is 96 bits (12 bytes). - Stronghold supports barrier key rotation, so new entries can be encrypted with a new key without losing access to previously stored data.
Barrier encryption works on top of the selected storage backend. Therefore, regardless of whether raft, filesystem, etcd, or postgresql is used, already encrypted Stronghold values are written to the physical storage.
It is important to distinguish between:
- Cryptographic protection of Stronghold data, provided by the
AES-256-GCMbarrier. - Operational backup procedures for the storage backend, which remain the administrator’s responsibility.
Additional encryption via HSM
HSM support does not replace the built-in AES-256-GCM barrier; it complements it.
In a typical scenario:
- Data in the storage backend is still protected by the Stronghold barrier.
- The root key and unseal operations can be protected via
seal "pkcs11"and an external HSM. - Additional encryption via
seal wrapcan be used for some critical internal data.
Thus, Stronghold uses several levels of protection:
- Built-in storage encryption with
AES-256-GCM - Protection of the root key and auto-unseal via HSM
- If necessary, an additional
seal wraplayer for the most sensitive values
If the HSM or external key provider supports GOST cryptography, this approach also applies to scenarios with GOST keys: the external module protects the key material, and Stronghold continues to use it in PKI, Transit, and related cryptographic operations.
Support for seal "pkcs11" applies to the standalone Stronghold installation.
More details:
Algorithms in PKI
The PKI secrets engine issues and signs X.509 certificates.
When configuring roles and generating keys, the following key types are available:
rsaeced25519gost3410-256-paramset-a,gost3410-256-paramset-b,gost3410-256-paramset-c,gost3410-256-paramset-dgost3410-512-paramset-a,gost3410-512-paramset-b,gost3410-512-paramset-c
The any value can be used in roles as a service mode when you need to allow any supported key type. It is not a separate cryptographic algorithm.
Additionally, you can set key size parameters for PKI:
- For
rsa:2048,3072,4096,8192. - For
ec:224,256,384,521. - For
ed25519, thekey_bitsparameter is not used. - For GOST parameters, the key type already defines the corresponding parameter set.
For the signature algorithm, the signature_bits parameter supports:
256forSHA-2-256384forSHA-2-384512forSHA-2-512
If signature_bits is not set, Stronghold selects the value automatically:
SHA-2-256is used forRSA.- For
NIST P-Curves, the hash matching the curve size is selected.
In practice, this means that PKI in Stronghold covers typical corporate scenarios with RSA and EC, modern scenarios with Ed25519, and infrastructures that require the supported GOST algorithms.
In particular, PKI supports issuing certificates with GOST 34.10 keys, including the supported 256-bit and 512-bit parameter sets.
For details on configuring PKI, see PKI secrets engine.
Algorithms in Transit
Transit provides cryptographic operations as a service: encryption, decryption, signing, signature verification, HMAC, hashing, and data key operations.
Main Transit key types
Symmetric encryption algorithms:
aes128-gcm96aes256-gcm96(default)chacha20-poly1305gost28147gost341264gost3412128
Asymmetric algorithms for signing and, in some cases, encryption:
ecdsa-p256ecdsa-p384ecdsa-p521ed25519rsa-2048rsa-3072rsa-4096gost3410-256-paramset-a,gost3410-256-paramset-b,gost3410-256-paramset-c,gost3410-256-paramset-dgost3410-512-paramset-a,gost3410-512-paramset-b,gost3410-512-paramset-c
Specialized types:
hmacfor HMAC operationsmanaged_keyfor operations via an external managed key, if it has been configured beforehand.
The managed_key type is not a separate encryption algorithm: in this mode, Transit uses a preconfigured external key source.
If managed_key points to an HSM or another external provider that supports GOST cryptography, Transit can also use external GOST keys.
Available operations
Transit key types support the following operations:
aes128-gcm96,aes256-gcm96,chacha20-poly1305, and the supported symmetricGOSTtypes are suitable forencrypt/decrypt.RSAis suitable forencrypt/decrypt, as well assign/verify.ECDSA,Ed25519, and the supported asymmetricGOSTtypes are used forsign/verify.- All key types can be used in HMAC scenarios via a separate HMAC key that Transit maintains together with the main key.
- The
hmactype is intended only for HMAC operations.
For GOST scenarios, this means:
gost3410-*is used forsign/verifyoperations.gost3412128andgost341264correspond to the symmetricGOST 34.12algorithms (KuznyechikandMagma).gost28147coversGOST 28147-89scenarios.
For RSA, Transit uses:
OAEPfor encryption and decryptionPSSfor signing and signature verificationPKCS#1 v1.5for signing and signature verification
Derived keys are supported for symmetric keys, and convergent encryption is supported for some types. Rotate AES-GCM keys regularly, depending on the load.
For details on Transit capabilities, see Transit secrets engine.
Practical recommendations
Follow these guidelines when you configure cryptography in Stronghold:
- For public and service-to-service APIs, set
tls_min_version = "tls12"or higher. - Do not restrict
tls_cipher_suiteswithout a clear reason: it may unexpectedly affect client compatibility. - Treat HSM as an additional level of protection, not as a replacement for the built-in Stronghold encryption.
- For PKI, standardize the allowed key types and key lengths at the role level in advance.
- For Transit, define the allowed key types separately for each scenario: symmetric encryption, signing, HMAC, BYOK, managed keys.