Skip to main content

Security Architecture

QuantumLockβ„’ security design and implementation details.


Overview​

QuantumLockβ„’ is designed with a defense-in-depth approach, using multiple layers of cryptographic protection to ensure license integrity and prevent tampering.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SECURITY LAYERS β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ Layer 1: Post-Quantum Cryptography β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚ β”‚ ML-DSA-65 (FIPS 204) - Quantum-resistant signatures β”‚β”‚
β”‚ β”‚ Hybrid RSA-PSS + ML-DSA for transition security β”‚β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚ β”‚
β”‚ Layer 2: Revocation & Anti-Rollback β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚ β”‚ Epoch-based revocation with cryptographic proofs β”‚β”‚
β”‚ β”‚ OS-level secure storage for epoch state β”‚β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚ β”‚
β”‚ Layer 3: Device Binding β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚ β”‚ Hardware fingerprinting with SHA-256 binding β”‚β”‚
β”‚ β”‚ Salt-based fingerprint protection β”‚β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚ β”‚
β”‚ Layer 4: Binary Protection (SDK/CLI) β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚ β”‚ Nuitka compilation to native code β”‚β”‚
β”‚ β”‚ Anti-debugging and obfuscation β”‚β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Post-Quantum Cryptography​

Why Post-Quantum?​

Quantum computers threaten current cryptographic algorithms:

AlgorithmStatusQuantum Threat
RSA-2048⚠️ TransitionBroken by Shor's algorithm
ECDSA⚠️ TransitionBroken by Shor's algorithm
AES-256βœ… SafeGrover reduces to 128-bit (still secure)
SHA-256βœ… SafeGrover reduces to 128-bit (still secure)
ML-DSAβœ… PQCDesigned for quantum resistance

ML-DSA (FIPS 204)​

QuantumLockβ„’ uses ML-DSA-65 (Module-Lattice Digital Signature Algorithm):

  • Based on lattice problems (hard for quantum computers)
  • NIST standardized (FIPS 204)
  • Security level: 192-bit classical, 128-bit quantum
# ML-DSA signature in license artifact
{
"header": {
"alg": "RSA-PSS-SHA256", # Classical signature
"alg_pqc": "ML-DSA-65" # Post-quantum signature
},
"signatures": {
"classic": "RSA-PSS signature...",
"pqc": "ML-DSA signature..."
}
}

Hybrid Signing​

We use hybrid signatures for transition security:

  1. RSA-PSS-SHA256: Current standard, widely trusted
  2. ML-DSA-65: Future-proof against quantum attacks

Both signatures must verify for the license to be valid.

Verification:
βœ“ RSA-PSS signature valid
βœ“ ML-DSA signature valid
β†’ License accepted

If either fails:
βœ— Signature verification failed
β†’ License rejected

Revocation System​

Epoch-Based Revocation​

Traditional CRL (Certificate Revocation Lists) have issues:

  • Large lists to download
  • Stale data problems
  • Easy to bypass offline

QuantumLockβ„’ uses epoch-based revocation:

Epoch 0: Initial state (no revocations)
↓
Epoch 1: License A revoked
↓
Epoch 2: License B revoked
↓
Epoch 3: License A restored
...

How It Works​

  1. Each license stores the minimum valid epoch
  2. Client stores the current epoch securely
  3. On validation, client checks: current_epoch >= license.min_epoch
  4. If client epoch < server epoch, sync is required

Anti-Rollback Protection​

Prevents attackers from using old revocation sets:

# Secure epoch storage per platform
macOS: Keychain Services
Windows: DPAPI (Data Protection API)
Linux: Secret Service (libsecret)
Attack attempt:
1. Attacker captures epoch 40 revocation set
2. License X is revoked at epoch 42
3. Attacker tries to use old epoch 40 set

Defense:
1. Client stored epoch 42 securely
2. Epoch 40 < stored epoch 42
3. Rollback detected β†’ validation fails

Device Binding​

Hardware Fingerprinting​

Licenses can be bound to specific devices:

binding = {
"type": "hardware",
"value": "sha256:9f86d081884c7d659a2feaa0c55ad015...",
"algorithm": "SHA-256",
"salt": "random-salt-value",
"properties": ["cpu_id", "motherboard_serial", "disk_serial"]
}

Fingerprint Generation​

# Client-side fingerprint generation
fingerprint = {
"cpu_id": get_cpu_id(),
"motherboard_serial": get_motherboard_serial(),
"disk_serial": get_disk_serial(),
"mac_address": get_primary_mac()
}

# Hash with salt
fingerprint_json = json.dumps(fingerprint, sort_keys=True)
salted = salt + fingerprint_json
binding_value = "sha256:" + sha256(salted).hexdigest()

Binding Verification​

During validation:

# Server-side verification
client_fingerprint = request.device_fingerprint
expected_hash = license.binding.value

computed_hash = compute_fingerprint_hash(
fingerprint=client_fingerprint,
salt=license.binding.salt,
algorithm=license.binding.algorithm
)

if computed_hash != expected_hash:
return ValidationResult(
is_valid=False,
error="BINDING_MISMATCH"
)

License Artifact Structure​

JWT-like Format​

header.payload.signature_classic.signature_pqc
{
"typ": "QL-LICENSE",
"ver": "1.0",
"alg": "RSA-PSS-SHA256",
"alg_pqc": "ML-DSA-65",
"kid": "ql-api-v2-default"
}

Payload​

{
"jti": "unique-license-id",
"sub": "customer:acme-corp",
"iss": "quantumlock.softquantus.com",
"iat": 1735570068,
"nbf": 1735570068,
"exp": 1767106068,
"grace_until": 1768315668,
"revocation_epoch": 0,
"entitlements": [...],
"binding": {...},
"metadata": {...}
}

Canonical Serialization​

For signature verification, payload is canonicalized:

  1. Keys sorted alphabetically
  2. No whitespace
  3. UTC timestamps as Unix epoch
  4. UTF-8 encoding

Key Management​

Key Hierarchy​

Root Key (HSM-stored, offline)
β”‚
β”œβ”€β”€ Issuing Key (ql-api-v2-default)
β”‚ β”œβ”€β”€ RSA-4096 private key
β”‚ └── ML-DSA-65 private key
β”‚
└── Backup Key (ql-api-v2-backup)
β”œβ”€β”€ RSA-4096 private key
└── ML-DSA-65 private key

Key Rotation​

  1. New key pair generated
  2. New key marked active
  3. Old key marked rotated (still valid for verification)
  4. Grace period for clients to update
  5. Old key marked expired

Key Storage​

EnvironmentStorage
ProductionAzure Key Vault HSM
StagingAzure Key Vault
DevelopmentFile-based (encrypted)

Binary Protection​

SDK/CLI Compilation​

The SDK and CLI are compiled with Nuitka for protection:

Python Source β†’ Nuitka β†’ Native Binary (.so/.pyd/.exe)

Protection Layers​

  1. Code Compilation: Python bytecode β†’ machine code
  2. String Encryption: Sensitive strings encrypted
  3. Anti-Debug: Detection of debuggers/reversing tools
  4. Integrity Checks: Binary self-verification

Limitations​

Binary protection is not a security boundaryβ€”it's a deterrent:

  • Determined attackers can still reverse engineer
  • Server-side validation is always authoritative
  • Offline validation has inherent trust limitations

Threat Model​

What We Protect Against​

ThreatMitigation
License key guessingCryptographic signatures
License forgeryDual RSA + ML-DSA signatures
License modificationSignature verification
Revocation bypassEpoch-based anti-rollback
Device cloningHardware fingerprint binding
Replay attacksTimestamps + nonces
Quantum attacksML-DSA-65 signatures

What We Don't Protect Against​

ThreatReason
Full system compromiseAttacker has root access
Memory dumpingRuntime decryption visible
Hardware keyloggersOut of scope
Social engineeringHuman factor

Compliance​

Standards​

  • NIST FIPS 204: ML-DSA signature algorithm
  • NIST FIPS 203: ML-KEM (future key exchange)
  • RFC 7518: JSON Web Algorithms
  • RFC 7519: JWT structure (adapted)

Certifications​

  • SOC 2 Type II (in progress)
  • ISO 27001 (planned)

Security Recommendations​

For Implementers​

  1. Always verify both signatures (RSA + ML-DSA)
  2. Sync revocation epoch regularly
  3. Use device binding for high-value licenses
  4. Store proofs securely for offline validation
  5. Monitor for anomalies in validation patterns

For Users​

  1. Protect API keys like passwords
  2. Use environment variables not hardcoded keys
  3. Implement rate limiting in your application
  4. Log validation failures for security monitoring
  5. Report suspicious activity to support

Reporting Security Issues​

Found a vulnerability? Please report responsibly:

πŸ“§ security@softquantus.com

We offer a bug bounty program for qualifying issues.