stella crypto — Command Guide

Distribution support: International, Russia (GOST), EU (eIDAS), China (SM)

The stella crypto command group provides signing and verification operations with regional compliance support. The available providers depend on which distribution you build or install (see the Distribution Matrix).

Audience: operators signing release artifacts and verifying signatures, and CI/CD pipelines that integrate signing into the release flow.

stella crypto sign resolves a real signing key from the configured provider set and emits a dsse, detached jws, or raw signature. stella crypto verify performs real verification either against provider-managed key material or a supplied trust policy.

Distribution Matrix

DistributionBuild FlagCrypto StandardsProviders
International(default)NIST/FIPSBouncyCastle (ECDSA, RSA, EdDSA)
RussiaStellaOpsEnableGOST=trueGOST R 34.10-2012
GOST R 34.11-2012
GOST R 34.12-2015
CryptoPro CSP
OpenSSL GOST
PKCS#11 GOST
EUStellaOpsEnableEIDAS=trueeIDAS Regulation 910/2014
ETSI EN 319 412
Remote TSP (QES)
Local PKCS#12 (AdES)
ChinaStellaOpsEnableSM=trueGM/T 0003-2012 (SM2)
GM/T 0004-2012 (SM3)
GM/T 0002-2012 (SM4)
Remote CSP
GmSSL

Commands

stella crypto sign

Sign artifacts using configured crypto provider.

The CLI selects a provider-exposed signing key at runtime. When multiple provider keys are available, use --provider and --key-id to make the selection explicit.

Usage:

stella crypto sign --input <file> [options]

Options:

Examples:

# Sign with default provider
stella crypto sign --input artifact.tar.gz

# Sign with specific GOST provider
stella crypto sign --input artifact.tar.gz --provider gost-cryptopro --key-id prod-signing-2025

# Sign with eIDAS QES
stella crypto sign --input contract.pdf --provider eidas-tsp --format jws

stella crypto verify

Verify signatures using configured crypto provider.

Verification behavior depends on the signature material:

Usage:

stella crypto verify --input <file> [options]

Options:

Examples:

# Verify with auto-detected signature
stella crypto verify --input artifact.tar.gz

# Verify with trust policy
stella crypto verify --input artifact.tar.gz --trust-policy ./policies/production-trust.yaml

# Verify specific provider signature
stella crypto verify --input contract.pdf --provider eidas-tsp --key-id prod-signing-2025 --signature contract.jws

# Verify a raw signature with explicit provider key selection
stella crypto verify --input artifact.tar.gz --signature artifact.tar.gz.sig --format raw --provider default --key-id prod-signing-2025

stella crypto profiles

List available crypto providers and their capabilities.

Usage:

stella crypto profiles [options]

Options:

Examples:

# List all providers
stella crypto profiles

# Show detailed capabilities
stella crypto profiles --details

# Test GOST provider connectivity
stella crypto profiles --provider gost --test

Output Distribution Info:

The profiles command shows which regional crypto plugins are enabled:

Distribution Information:
┌──────────────────┬─────────┐
│ Feature          │ Status  │
├──────────────────┼─────────┤
│ GOST (Russia)    │ Enabled │
│ eIDAS (EU)       │ Disabled│
│ SM (China)       │ Disabled│
│ BouncyCastle     │ Enabled │
└──────────────────┴─────────┘

Configuration

Quick Start

  1. Copy example configuration:
cp src/Cli/StellaOps.Cli/appsettings.crypto.yaml.example appsettings.crypto.yaml
  1. Set active profile:
StellaOps:
  Crypto:
    Registry:
      ActiveProfile: "russia-prod"  # or "eu-prod", "china-prod", "international"
  1. Configure provider credentials:
export STELLAOPS_CRYPTO_KEYSTORE_PASSWORD="your-password"
export STELLAOPS_GOST_CONTAINER_NAME="your-container"  # For GOST
export STELLAOPS_EIDAS_TSP_API_KEY="your-api-key"     # For eIDAS
export STELLAOPS_SM_CSP_API_KEY="your-api-key"        # For SM

Profile Configuration

See appsettings.crypto.yaml.example for detailed configuration examples for each distribution.

Key sections:

Build Instructions

International Distribution (Default)

dotnet build src/Cli/StellaOps.Cli/StellaOps.Cli.csproj

Russia Distribution (GOST)

dotnet build src/Cli/StellaOps.Cli/StellaOps.Cli.csproj \
  -p:StellaOpsEnableGOST=true

EU Distribution (eIDAS)

dotnet build src/Cli/StellaOps.Cli/StellaOps.Cli.csproj \
  -p:StellaOpsEnableEIDAS=true

China Distribution (SM)

dotnet build src/Cli/StellaOps.Cli/StellaOps.Cli.csproj \
  -p:StellaOpsEnableSM=true

Multi-Region Distribution

dotnet build src/Cli/StellaOps.Cli/StellaOps.Cli.csproj \
  -p:StellaOpsEnableGOST=true \
  -p:StellaOpsEnableEIDAS=true \
  -p:StellaOpsEnableSM=true

Note: Multi-region builds include all crypto plugins but only activate those configured in the active profile.

Compliance Notes

GOST (Russia)

eIDAS (EU)

SM/ShangMi (China)

Migration from cryptoru CLI

The standalone cryptoru CLI is deprecated. Functionality has been integrated into stella crypto:

Old CommandNew Command
cryptoru providersstella crypto profiles or stella crypto providers
cryptoru signstella crypto sign

Migration Steps:

  1. Update scripts to use stella crypto instead of cryptoru.
  2. Update configuration from cryptoru.yaml to appsettings.crypto.yaml.
  3. The cryptoru tool is scheduled for removal in Stella Ops 2.0 (sunset date: 2025-07-01).

Troubleshooting

“No crypto providers available”

Cause: CLI built without regional crypto flags, or providers not registered.

Solution:

  1. Check build flags: stella crypto profiles shows distribution info
  2. Rebuild with appropriate flag (e.g., -p:StellaOpsEnableGOST=true)
  3. Verify appsettings.crypto.yaml configuration

“Provider not found”

Cause: Active profile references unavailable provider.

Solution:

  1. List available providers: stella crypto profiles
  2. Update active profile in configuration
  3. Or override with --provider flag

GOST Provider Initialization Failed

Cause: CryptoPro CSP not installed or configured.

Solution:

  1. Install CryptoPro CSP 5.0+
  2. Configure container: csptest -keyset -enum_cont -fqcn -verifyc
  3. Set environment: export STELLAOPS_GOST_CONTAINER_NAME="your-container"

eIDAS TSP Connection Error

Cause: TSP endpoint unreachable or invalid API key.

Solution:

  1. Verify TSP endpoint: curl -I https://tsp.example.eu/api/v1
  2. Check API key: export STELLAOPS_EIDAS_TSP_API_KEY="valid-key"
  3. Review TSP logs for authentication errors

stella crypto secret-provider — inspect the secret registry

The unified secret provider (ADR-031) and URL-routed multi-provider registry (ADR-032) expose a read-only inspection surface. These verbs hit the Platform admin endpoints under /api/v1/admin/crypto/secret-providers and require the crypto:read scope (tenant-scoped). They never print secret bytespaths returns path names only, and --format json / --json carries no value field.

CommandPurposeEndpoint
secret-provider list [--format table|json] [--json]Enumerate configured provider instances (id / kind / reachable) so you can pick the provider-id segment of a reference URL.GET …/secret-providers
secret-provider status [--format …]Show the default backend, reachability, KEK id/version/source, and KEK fingerprint (non-secret), and the default AEAD algorithm.GET …/setup/crypto/secret-provider/status
secret-provider validate [--format …]Validate the provider: master key present + backend reachable (outcome: ok).GET …/setup/crypto/secret-provider/validate
secret-provider paths --provider <id> [--prefix P] [--page-token T] [--format …] [--json]Browse path names under a named provider (autocomplete/browse parity with the UI picker). Paged + tenant-scoped server-side. The older positional paths <id> form remains supported.GET …/secret-providers/{id}/paths
# List the configured registry (e.g. builtin + vault + openbao):
stella crypto secret-provider list
#   Id            Kind       Reachable
#   builtin       builtin    yes
#   prod-vault    vault      yes
#   bao           openbao    yes

# Browse path names under a provider (NAMES only, never values):
stella crypto secret-provider paths --provider prod-vault --prefix secret/app
#   app/db/password

# Fail-closed: an unconfigured provider id → HTTP 404 listing configured ids, exit 14:
stella crypto secret-provider paths --provider does-not-exist
#   Error: … "Secret provider id 'does-not-exist' is not configured.
#            Configured ids: builtin, prod-vault, bao." (exit 14)

A secret is referenced by a URL (<scheme>://[<provider-id>/]<path>[#<version>], e.g. vault://prod-vault/secret/app/db/password#5, openbao://bao/kv/notify/smtp/password, builtin://integration:<guid>). The URL is a non-secret pointer — safe to store, display, log, and audit. Full grammar: secret-reference URL scheme spec; operator runbook: multi-provider secret registry.

stella crypto master-key — provision the master KEK

Provisioning verbs for the master key that roots seal/open (ADR-031 §D3). These mutate provisioning state and require the crypto:kek:rotate scope. Secret material is never echoed — only the non-secret fingerprint is printed.

CommandPurpose
master-key probe [--format table|json]Round-trip seal/open probe against the resolved master key. This is the setup gate; safe on a running install (no key change).
master-key generate [--format symmetric|asymmetric] [--symmetric-bytes N] [--asymmetric-algorithm rsa|ec] [--asymmetric-bits N] [--private-key-out FILE]Generate a NEW master key. Asymmetric mode writes the one-time private-key PEM to --private-key-out (owner-only perms) — never to stdout.
master-key import --material-file FILE [--format symmetric|asymmetric]Import operator-provided key material from a file (symmetric raw/base64 secret, or asymmetric PEM/PKCS#8). Read from a file — never a CLI arg — so it does not leak into shell history.

WARNING. generate / import re-root the installation master key. On a running, data-bearing install this orphans every existing sealed secret unless a full re-seal walk follows (see KEK rotation runbook). Use master-key probe to health-check the live key; only generate/import on a fresh install or under a planned rotation.

# Health-check the live master key (no change):
stella crypto master-key probe
#   Master key probe: ok

# Fresh-install symmetric generate (default 32 bytes):
stella crypto master-key generate --format symmetric

# Import operator-provided asymmetric key material from a file:
stella crypto master-key import --format asymmetric --material-file ./kek.pem

This surface was proven end-to-end against a live, data-bearing stack on 2026-06-22 (builtin + 2× HashiCorp Vault + OpenBao): live-proof evidence.

Security Considerations

  1. Key protection — never commit private keys or credentials to version control.
  2. Secret management — keep credentials out of config files; source them from a self-hosted secret store such as HashiCorp Vault.
  3. Trust policies — validate certificate chains and revocation status.
  4. Audit trail — enable crypto-operation logging for compliance.
  5. Key rotation — implement periodic key-rotation policies.
  6. Disaster recovery — back up key material securely.

Support

For regional crypto compliance questions: