stella CLI — Regional Cryptographic Compliance Guide

The Stella Ops CLI supports regional cryptographic algorithms so that signing and verification operations meet national and international cryptographic standards. This guide covers the compliance requirements, providers, algorithms, and configuration for each supported region:

Audience: operators and compliance owners deploying Stella Ops in a regulated jurisdiction.

Important: each regional provider ships in its own CLI distribution. See the Distribution Matrix for the builds.


eIDAS (European Union)

Overview

eIDAS (electronic IDentification, Authentication and trust Services) is the EU regulation (No 910/2014) governing electronic signatures, seals, and trust services across EU member states.

Applicable Jurisdictions: All 27 EU member states + EEA (Norway, Iceland, Liechtenstein)

Legal Basis:


Signature Levels

LevelNameDescriptionRecommended Use
QESQualified Electronic SignatureEquivalent to handwritten signatureContracts, legal documents
AESAdvanced Electronic SignatureHigh assurance, not qualifiedInternal approvals, workflows
AdESAdvanced Electronic SignatureBasic electronic signatureGeneral document signing

Crypto Providers

The stella-eu distribution includes eIDAS-compliant providers:

1. TSP Client (Remote Qualified Signature)

Provider: Trust Service Provider remote signing client Certification: Depends on TSP (must be EU-qualified) License: Subscription-based (per TSP)

Configuration:

StellaOps:
  Crypto:
    Providers:
      Eidas:
        TspClient:
          Enabled: true
          TspUrl: "https://tsp.example.eu/api/v1/sign"
          ApiKey: "${EIDAS_TSP_API_KEY}"
          CertificateId: "qes-cert-2024"

Usage:

# Sign with QES (Qualified Electronic Signature)
stella crypto sign \
  --provider eidas \
  --algorithm ECDSA-P256-QES \
  --key-id qes-cert-2024 \
  --file contract.pdf \
  --output contract.pdf.sig

2. Local Signer (Advanced Signature)

Provider: Local signing with software keys Certification: Not qualified (AES/AdES only) License: Open source

Configuration:

StellaOps:
  Crypto:
    Providers:
      Eidas:
        LocalSigner:
          Enabled: true
          KeyStorePath: "/etc/stellaops/eidas-keys"

Standards

StandardNamePurpose
ETSI EN 319 412Certificate ProfilesRequirements for certificates (QES, AES)
ETSI EN 319 102Signature PoliciesSignature policy requirements
ETSI EN 319 142PAdES (PDF Signatures)PDF Advanced Electronic Signatures
ETSI TS 119 432Remote SigningRemote signature creation protocols
ETSI EN 319 401Trust Service ProvidersTSP requirements and policies

Algorithms

AlgorithmDescriptionSignature LevelRecommended
ECDSA-P256-QESECDSA with P-256 curve (QES)QES✅ Yes
ECDSA-P384-QESECDSA with P-384 curve (QES)QES✅ Yes
RSA-2048-QESRSA 2048-bit (QES)QES⚠️ Use ECDSA
ECDSA-P256-AESECDSA with P-256 curve (AES)AES✅ Yes

Recommendation: Use ECDSA P-256 or P-384 for new implementations. RSA is supported but ECDSA is preferred.


Configuration Example

# appsettings.eidas.yaml

StellaOps:
  Backend:
    BaseUrl: "https://api.stellaops.eu"

  Crypto:
    DefaultProvider: "eidas"

    Profiles:
      - name: "eidas-qes"
        provider: "eidas"
        algorithm: "ECDSA-P256-QES"
        keyId: "qes-cert-2024"

      - name: "eidas-aes"
        provider: "eidas"
        algorithm: "ECDSA-P256-AES"
        keyId: "aes-cert-2024"

    Providers:
      Eidas:
        TspClient:
          Enabled: true
          TspUrl: "https://tsp.example.eu/api/v1/sign"
          ApiKey: "${EIDAS_TSP_API_KEY}"

          # Qualified Trust Service Provider
          TspProfile:
            Name: "Example Trust Services Provider"
            QualifiedStatus: true
            Country: "DE"
            TrustedListUrl: "https://tsp.example.eu/tsl.xml"

        Keys:
          - KeyId: "qes-cert-2024"
            Algorithm: "ECDSA-P256-QES"
            Source: "tsp"
            SignatureLevel: "QES"
            FriendlyName: "Qualified Electronic Signature 2024"

          - KeyId: "aes-cert-2024"
            Algorithm: "ECDSA-P256-AES"
            Source: "local"
            SignatureLevel: "AES"
            FriendlyName: "Advanced Electronic Signature 2024"

EU Trusted List Validation

Verify TSP is on the EU Trusted List:

# Download EU Trusted List
wget https://ec.europa.eu/tools/lotl/eu-lotl.xml

# Validate TSP certificate against trusted list
stella crypto verify-tsp \
  --tsp-cert tsp-certificate.pem \
  --trusted-list eu-lotl.xml

Official EU Trusted List:


Compliance Checklist

For QES (Qualified Electronic Signature):

For AES (Advanced Electronic Signature):


Cross-border Recognition:

Long-term Validation:

Data Protection (GDPR):


SM (China)

Overview

SM (ShāngMì, 商密, Commercial Cipher) refers to China’s national cryptographic algorithms mandated by OSCCA (Office of State Commercial Cryptography Administration).

Applicable Jurisdiction: People’s Republic of China

Legal Basis:


SM Standards

StandardNamePurpose
GM/T 0003-2012 (SM2)Public Key Cryptographic AlgorithmElliptic curve signatures and encryption (256-bit)
GM/T 0004-2012 (SM3)Cryptographic Hash AlgorithmHash function (256-bit output)
GM/T 0002-2012 (SM4)Block Cipher AlgorithmSymmetric encryption (128-bit key)
GM/T 0009-2012 (SM9)Identity-Based CryptographyIdentity-based encryption and signatures

Crypto Providers

The stella-china distribution includes SM providers:

1. GmSSL (Open Source)

Provider: GmSSL library Certification: Not OSCCA-certified (development/testing only) License: Apache 2.0

Installation:

# Install GmSSL
sudo apt install gmssl

# Verify installation
gmssl version

Configuration:

StellaOps:
  Crypto:
    Providers:
      Sm:
        GmSsl:
          Enabled: true
          LibraryPath: "/usr/lib/libgmssl.so"

2. Commercial CSP (OSCCA-certified)

Provider: OSCCA-certified commercial CSP Certification: OSCCA-certified (required for production) License: Commercial (vendor-specific)

Configuration:

StellaOps:
  Crypto:
    Providers:
      Sm:
        CommercialCsp:
          Enabled: true
          VendorId: "vendor-name"
          DeviceId: "device-serial"

Algorithms

AlgorithmDescriptionGM StandardKey SizeRecommended
SM2Elliptic curve signature and encryptionGM/T 0003-2012256-bit✅ Yes
SM3Cryptographic hashGM/T 0004-2012256-bit output✅ Yes
SM4Block cipherGM/T 0002-2012128-bit key✅ Yes
SM9Identity-based cryptoGM/T 0009-2012256-bit⚠️ Specialized

Configuration Example

# appsettings.sm.yaml

StellaOps:
  Backend:
    BaseUrl: "https://api.stellaops.cn"

  Crypto:
    DefaultProvider: "sm"

    Profiles:
      - name: "sm-prod-signing"
        provider: "sm"
        algorithm: "SM2"
        keyId: "sm-prod-key-2024"

    Providers:
      Sm:
        GmSsl:
          Enabled: true
          LibraryPath: "/usr/lib/libgmssl.so"

        Keys:
          - KeyId: "sm-prod-key-2024"
            Algorithm: "SM2"
            Source: "file"
            FilePath: "/etc/stellaops/keys/sm-key.pem"
            FriendlyName: "Production SM2 Signing Key 2024"

Usage Example

# Sign with SM2
stella crypto sign \
  --provider sm \
  --algorithm SM2 \
  --key-id sm-prod-key-2024 \
  --file document.pdf \
  --output document.pdf.sig

# Verify SM2 signature
stella crypto verify \
  --provider sm \
  --algorithm SM2 \
  --key-id sm-prod-key-2024 \
  --file document.pdf \
  --signature document.pdf.sig

Test Vectors (OSCCA Compliance)

Verify your SM implementation with official test vectors:

# Test vector from GM/T 0004-2012 (SM3 hash)
echo -n "abc" | gmssl sm3

# Expected output:
# 66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0

Official Test Vectors:


Compliance Checklist


Export Control:

MLPS 2.0 Requirements:

Commercial Cipher Regulations:


Distribution Selection

Your LocationRequired ComplianceDistribution
EU Member StateeIDAS QES (legal documents)stella-eu
ChinaSM2/SM3/SM4 (MLPS 2.0 Level 3+)stella-china
OtherNone (international standards)stella-international

See also