Crypto Profile Configuration
Audience: Operators and DevOps owners deploying into regulated regions; crypto/platform engineers. Scope: How to pick a regional crypto profile, choose between free/OSS and paid/licensed providers, and enable simulations while hardware or licenses are pending.
Related: Cryptographic compliance profiles (the purpose-based algorithm model and certification status) · FIPS/eIDAS/KCMVP validation · OpenSSL GOST remote signer · SM hardware simulation.
Use this guide to take a deployment from “which region am I in?” to a working, evidence-producing crypto profile — including the OSS, licensed, and simulated provider paths.
Quick selectors
- Compliance profile (hash/sign policy):
STELLAOPS_CRYPTO_COMPLIANCE_PROFILE=world|fips|gost|sm|kcmvp|eidas(or configCrypto:Compliance:ProfileId; defaultworld). These six IDs are the valid values perCryptoComplianceOptions. - Strict validation:
STELLAOPS_CRYPTO_STRICT_VALIDATION=true|false(or configCrypto:Compliance:StrictValidation; defaulttrue). Whentrue, non-compliant algorithm usage fails closed (CryptoComplianceOptions.ApplyEnvironmentOverrides). - Registry ordering: set
StellaOps:Crypto:Registry:ActiveProfile(env:STELLAOPS__CRYPTO__REGISTRY__ACTIVEPROFILE) andPreferredProviders. - RU provider gates (consumed by
CryptoProviderRegistryValidator.EnforceRuLinuxDefaults):STELLAOPS_CRYPTO_ENABLE_RU_OPENSSL(defaulttrueon Linux),STELLAOPS_CRYPTO_ENABLE_RU_PKCS11(defaulttrue),STELLAOPS_CRYPTO_ENABLE_RU_WINECSP(defaultfalse). The CryptoPro CSP in-process plugin is gated bySTELLAOPS_CRYPTO_ENABLE_RU_CSPand is compiled only under theSTELLAOPS_CRYPTO_PRObuild flag. - Operator selection (no manual config edit):
stella crypto profiles list/stella crypto profiles select <profile>andstella crypto profile set <id>. Persistence is hybrid — if a backend is configured it callsPUT /api/v1/admin/crypto-providers/preferences, otherwise it writes~/.stellaops/appsettings.crypto.yaml(CryptoProfilePreferenceStore). - Simulation toggle:
STELLAOPS_CRYPTO_ENABLE_SIM=1(ortrue; addssim.crypto.remoteto the active profile’s order, else to top-levelPreferredProviders);STELLAOPS_CRYPTO_SIM_URL=http://host:8080if the simulator runs remotely (overridesStellaOps:Crypto:Sim:BaseAddress).
Step-by-step: pick a region
- Choose the compliance profile ID and set
STELLAOPS_CRYPTO_COMPLIANCE_PROFILE. - Set
StellaOps:Crypto:Registry:ActiveProfileto the region (see table below) and order thePreferredProviders. - Decide on provider type:
- Free/OSS: OpenSSL GOST (RU), SM soft, PQ soft, FIPS/eIDAS/KCMVP soft baselines.
- Paid/licensed: CryptoPro (RU), QSCD (eIDAS), certified FIPS/KCMVP modules when available. See
docs/legal/crypto-compliance-review.mdfor licensing/export notes. - Simulation: enable
STELLAOPS_CRYPTO_ENABLE_SIM=1and pointSTELLAOPS_CRYPTO_SIM_URLtosim-crypto-service.
- Apply any provider-specific env (e.g.,
CRYPTOPRO_ACCEPT_EULA=1,SM_SOFT_ALLOWED=1,PQ_SOFT_ALLOWED=1, PKCS#11 PINs). - Capture evidence: JWKS export +
CryptoProviderMetrics+ fixed-message sign/verify logs. - If you only need a smoke check without full tests, run
dotnet run --project devops/services/crypto/sim-crypto-smoke/SimCryptoSmoke.csprojagainst a running simulator (seeSIM_PROFILE/SIM_ALGORITHMSbelow).
Operator selection via CLI / admin API
You do not have to hand-edit appsettings*.json to change profiles. The CLI exposes the regional-crypto surface under stella crypto (CryptoCommandGroup):
stella crypto profiles list— list registry profiles.stella crypto profiles select <profile>— set the active registry profile (StellaOps:Crypto:Registry:ActiveProfile).stella crypto profile set <world|fips|gost|sm|kcmvp|eidas>/stella crypto profile show— set/show the tenant compliance profile (thesetcommand accepts an optional re-seal walker to migrate existing tenant rows to the new algorithm).stella crypto profile validate— check the active profile is reachable / has no FIPS-mode disagreement (callsGET /api/v1/admin/crypto/profile/validate). The CLI verb is wired today, but until the backend endpoint lands (RP-028-013) the typed client returns anendpoint_not_implementedpayload with exit code 0 — adopt the verb in CI now; it will start producing a real verdict once the endpoint ships.stella crypto provider set|show,stella crypto status,stella crypto plugins status,stella crypto fips enable|disable,stella crypto kek rotate.
Persistence is hybrid (CryptoProfilePreferenceStore): when a backend URL is configured the CLI calls the platform admin endpoint PUT /api/v1/admin/crypto-providers/preferences (tenant-scoped); otherwise it falls back to a local YAML file at ~/.stellaops/appsettings.crypto.yaml that sets StellaOps:Crypto:Registry:ActiveProfile. This keeps the offline/air-gap bootstrap path working while converging on platform-managed state for connected deployments.
Choosing a region
| Region | Compliance profile | Registry profile / providers | Free vs paid | Simulation |
|---|---|---|---|---|
| RU (OSS) | gost | ActiveProfile: ru-offline; providers: ru.openssl.gost, ru.pkcs11 | Free (OpenSSL) path on Linux — ru.openssl.gost is auto-required when STELLAOPS_CRYPTO_ENABLE_RU_OPENSSL is set (default on Linux); ru.pkcs11 via STELLAOPS_CRYPTO_ENABLE_RU_PKCS11 (default on). Optional remote signer: see docs/security/openssl-gost-remote.md. (NOT a StellaOps-wired env var — STELLAOPS_RU_OPENSSL_REMOTE_URL is a deployment-level routing toggle described in that runbook; OpenSslGostProvider has no remote-URL option, so the host/gateway, not the provider, consumes it.) | STELLAOPS_CRYPTO_ENABLE_SIM=1; sim covers GOST12 + Magma/Kuznyechik when hardware/licensing is unavailable. |
| RU (CryptoPro paid) | gost | Same profile; ensure ru.cryptopro.csp registered. | Linux-only CSP service: bind customer .deb packages to /opt/cryptopro/downloads, set CRYPTOPRO_ACCEPT_EULA=1, run devops/services/cryptopro/linux-csp-service. Licensing model documented in docs/legal/crypto-compliance-review.md. | Use simulator until licenses are supplied. |
| CN (SM) | sm | ActiveProfile: sm; providers: cn.sm.soft (env SM_SOFT_ALLOWED=1), optional PKCS#11. | Hardware/PKCS#11 wiring in docs/security/sm-hardware-simulation.md. | sim-crypto-service handles SM2 (sim.crypto.remote). |
| FIPS (US) | fips | Providers: fips.ecdsa.soft (software-only, non-certified; signs ES256/384/512, hashes SHA-256/384/512; gate FIPS_SOFT_ALLOWED must be set to 1/true — defaults off), KMS/OpenSSL FIPS when available. | Certified module runbook: docs/security/fips-eidas-kcmvp-validation.md. | Simulator covers ES256/384/512 (sim.crypto.remote). |
| eIDAS (EU) | eidas | Providers: eu.eidas.soft (software-only, non-certified, QSCD not enforced; signs ES256/384, hashes SHA-256/384; gate EIDAS_SOFT_ALLOWED must be set to 1/true — defaults off). | QSCD bring-up in docs/security/fips-eidas-kcmvp-validation.md. | Simulator (sim.crypto.remote) until QSCD arrives. |
| KCMVP (KR) | kcmvp | Providers: kr.kcmvp.hash (SHA-256 hash-only baseline; gate KCMVP_HASH_ALLOWED — note this gate defaults to enabled when unset, unlike the FIPS/eIDAS gates which default off), future KCDSA/ARIA/SEED module. | Hardware flow in docs/security/fips-eidas-kcmvp-validation.md. | Simulator (sim.crypto.remote) while awaiting certified module. |
| PQ addenda | (overlay) | Enable via PQ_SOFT_ALLOWED=1; provider pq.soft. | Uses liboqs/BouncyCastle soft providers. | Simulator available via sim.crypto.remote if you want a remote signer. |
Sample config (appsettings.json)
Binding note: the registry/sim options bind under
StellaOps:Crypto:*(StellaOps:Crypto:Registry→CryptoProviderRegistryOptions,StellaOps:Crypto:Sim→SimRemoteProviderOptions), but the compliance options bind from the root-levelCrypto:Compliancesection (CryptoComplianceOptions.SectionKey = "Crypto:Compliance", bound byCryptoComplianceOptionsConfiguration).Complianceis therefore a sibling ofStellaOps, not a child of it — putting it underStellaOps:Compliancewould not be read.
{
"StellaOps": {
"Crypto": {
"Registry": {
"ActiveProfile": "ru-offline",
"PreferredProviders": [ "ru.openssl.gost", "ru.pkcs11", "sim.crypto.remote" ]
},
"Sim": {
"BaseAddress": "http://localhost:8080"
}
}
},
"Crypto": {
"Compliance": {
"ProfileId": "gost",
"StrictValidation": true
}
}
}
Licensing and hardware notes
- CryptoPro: customer-provided
.debpackages, Linux only. Accept EULA viaCRYPTOPRO_ACCEPT_EULA=1; service wrapper atdevops/services/cryptopro/linux-csp-service. Licensing/export posture is indocs/legal/crypto-compliance-review.md. - SM hardware: bring-up and PKCS#11 wiring in
docs/security/sm-hardware-simulation.md. - FIPS/eIDAS/KCMVP hardware/QSCD: runbook in
docs/security/fips-eidas-kcmvp-validation.md. - OpenSSL GOST remote signer (OSS baseline) in
docs/security/openssl-gost-remote.md.
Simulation guidance
Use simulation paths when licensed hardware or certified modules are unavailable. They keep the registry/profile contracts stable while waiting for customer licenses (CryptoPro), QSCD devices (eIDAS), KCMVP modules, or SM PKCS#11 tokens.
Unified simulator (sim-crypto-service)
- Location:
devops/services/crypto/sim-crypto-service/ - Provider ID:
sim.crypto.remote - Algorithms covered:
- GOST:
GOST12-256,GOST12-512,ru.magma.sim,ru.kuznyechik.sim(deterministic HMAC-SHA256) - SM:
SM2,sm.sim,sm2.sim(deterministic HMAC-SHA256) - PQ:
DILITHIUM3,FALCON512,pq.sim(deterministic HMAC-SHA256) - FIPS/eIDAS/KCMVP/world:
ES256,ES384,ES512,fips.sim,eidas.sim,kcmvp.sim,world.sim(deterministic HMAC-SHA256)
- GOST:
- The
SimRemoteProviderOptions.Algorithmsdefault list includes the IDs above; extend if you add new aliases. (Binds fromStellaOps:Crypto:SimviaSimRemoteProviderOptionsConfiguration;STELLAOPS_CRYPTO_SIM_URLthen overridesBaseAddressin a post-configure step.) All sim outputs are deterministicHMAC-SHA256overalgorithm‖0x00‖message— the IDs are routing labels, not the real GOST/SM/PQ primitives. - Note: the sim’s
GOST12-256/GOST12-512are signature algorithm IDs (SignatureAlgorithms.GostR3410_2012_256/512, the same IDs theru.openssl.gostprovider signs with). They are distinct from the hash algorithm IDs agostcompliance profile assigns to content/graph purposes (GOST3411-2012-256, prefixgost3411:). Likewise SM signing usesSM2while thesmcompliance profile hashes withSM3.
Quick simulation steps
Build and run:
docker build -t sim-crypto -f devops/services/crypto/sim-crypto-service/Dockerfile devops/services/crypto/sim-crypto-service docker run --rm -p 8080:8080 sim-cryptoConfigure environment:
- Set
STELLAOPS_CRYPTO_ENABLE_SIM=1to appendsim.crypto.remoteto registry ordering. - Point the client:
STELLAOPS_CRYPTO_SIM_URL=http://localhost:8080or bindStellaOps:Crypto:Sim:BaseAddress. - Keep
sim.crypto.remotefirst inPreferredProvidersfor the target profile.
- Set
Quick check (curl):
MESSAGE_BASE64=$(printf "stellaops-sim-check" | base64) curl -s -X POST http://localhost:8080/sign \ -H 'content-type: application/json' \ -d "{\"messageBase64\":\"${MESSAGE_BASE64}\",\"algorithm\":\"SM2\"}"Smoke harnesses (no VSTest):
- PowerShell:
devops/tools/run-sim-smoke.ps1(args:-BaseUrl http://localhost:5000 -SimProfile sm|ru-free|ru-paid|eidas|fips|kcmvp|pq) - Headless:
dotnet run --project devops/services/crypto/sim-crypto-smoke/SimCryptoSmoke.csproj -c ReleasewithSIM_PROFILEand optionalSIM_MESSAGE/SIM_ALGORITHMS=SM2,pq.sim,ES256.SIM_PROFILEdefaults toregional(an alias forall), which exercises the full regional set (SM2,sm.sim,sm2.sim,GOST12-256,GOST12-512,ru.magma.sim,ru.kuznyechik.sim,eidas.sim,fips.sim,pq.sim,DILITHIUM3,FALCON512). Single-region values map to one algorithm each (Program.cs::ResolveAlgorithm):sm/china/sm2→SM2;gost/russia/ru/ru-free/ru-paid→GOST12-256;eidas/eu→eidas.sim;fips→fips.sim;pq/post-quantum→pq.sim;kcmvp/kr→kcmvp.sim. An unrecognised value is passed through verbatim as the algorithm ID. The harness readsSTELLAOPS_CRYPTO_SIM_URL(defaulthttp://localhost:5000, not 8080).
- PowerShell:
Use the simulator to close sprints until certified evidence is available; keep “non-certified” labels in RootPack manifests.
Evidence expectations
- JWKS export from Authority/Signer for the active profile.
CryptoProviderMetricsshowing the chosen provider ID (oss, paid, or sim).- Fixed-message signing/verification logs (
stellaops-crypto-profile-check) for audit trails.
Last updated: 2025-12-11.
