LPsLux Proposals
Q-Chain
LP-4044

lp-4044-post-quantum-gpu-acceleration


lp: 4044 title: Post-Quantum GPU Acceleration description: GPU paths for the NIST FIPS post-quantum algorithms with the Number Theoretic Transform as the shared primitive, and the measurement that keeps them out of the production verification path author: Lux Core Team (@luxfi) discussions-to: https://github.com/luxfi/lps/discussions status: Final implementation-rust: none implementation-cpp: shipped implementation-go: partial type: Standards Track category: Core tags: [pq, mldsa, mlkem, slhdsa, corona, fips-203, fips-204, fips-205, ntt, gpu]

  • lp-4040
  • lp-4042
  • lp-4076

Abstract

This LP specifies GPU acceleration paths for the NIST FIPS post-quantum algorithms, with the Number Theoretic Transform (LP-4076) as the shared primitive across ML-DSA, ML-KEM, SLH-DSA and Corona/Pulsar.

These kernels are optional overlays, not the production verification path. In production, PQ verification runs pure-Go on CPU — including P3Q ML-DSA verify at precompile slot 0x012205. The GPU NTT kernels are KAT-clean across CPU, Metal, CUDA and HIP, and they are deliberately unwired, for a reason that is worth stating plainly: a single-polynomial NTT is slower on the GPU than in Go. The transform is small, the dispatch is not free, and there is nothing to amortize it over. Batched workloads are where a GPU NTT earns its place; a per-signature verify is not one.

Algorithms

AlgorithmStandardOperationGPU kernel
ML-DSA-65FIPS 204Signature verifymldsa.metal
ML-KEM-768FIPS 203Key decapsulatemlkem.metal
SLH-DSAFIPS 205Signature verifyslhdsa.metal
CoronaModule-LWEThreshold signcorona.metal

Kernel names denote implemented shaders, not production-wired paths. The Corona NTT kernel (Module-LWE) is KAT-clean and unwired by the same performance argument. Earlier corona_sign / corona_verify kernels were built against the wrong prime and have no caller; they are dead.

Shared NTT

Six NTT variants, each tuned to a different access pattern:

  • ntt.metal — general-purpose butterfly
  • four_step_ntt.metal — large-degree polynomials
  • ntt_unified_memory.metal — Apple Silicon zero-copy
  • ntt_kernels.metal — fused NTT + pointwise multiply
  • poly_mul.metal — polynomial multiplication via NTT
  • twiddle_cache.metal — precomputed twiddle factors

Security Considerations

The CPU oracle stays authoritative behind any kernel that is wired in future. A PQ verify that disagrees with the CPU path is a consensus fault, not a performance result — which is why nothing here ships as the sole path to a verdict.

Copyright (C) 2024-2026, Lux Industries Inc. All rights reserved.

Licensed under the MIT License.