Files
papers/post-quantum-securities/sections/03-evm-precompile-integration.tex
zeekayandHanzo Dev 70f6883235 Restore the regulated-markets papers; Lux holds the licences
A July commit removed eight papers on the premise "no license — DEX/non-custodial
only". That premise is wrong: Lux operates an ATS, a broker-dealer, a transfer
agent and a bank, and this material is resold at lux.financial. The merge that
brought main in preserved the removal because the commit stated a reason, which
is how a stale reason outlives the fact it rested on.

Back, at the versions main carried — main never received the removal, so its
copies are the later ones: the ATS architecture, the security-token standard,
smart order routing, institutional custody, MPC custody, post-quantum securities,
the SSB partnership and the CoinBridge brief. 83 files.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-30 15:58:05 -07:00

62 lines
1.8 KiB
TeX

\section{EVM Precompile Integration}
\label{sec:precompiles}
%% =====================================================================
All three algorithms are exposed as native EVM precompiles at fixed
addresses in the Lux C-Chain and regulated EVM L1 genesis configuration:
\begin{table}[h]
\centering
\begin{tabular}{llr}
\toprule
\textbf{Address} & \textbf{Precompile} & \textbf{Gas (Verify)} \\
\midrule
\texttt{0x0300...0010} & ML-KEM & 50,000 (Decapsulate) \\
\texttt{0x0300...0020} & ML-DSA & 100,000 (Verify) \\
\texttt{0x0300...0030} & SLH-DSA & 150,000 (Verify) \\
\texttt{0x0300...0040} & PQCrypto & 10,000 (Parameter query) \\
\bottomrule
\end{tabular}
\caption{Post-quantum precompile gas costs.}
\label{tab:gas}
\end{table}
For comparison, a Solidity implementation of ML-DSA verification
consumes $>$15M gas (exceeding most block gas limits), while the
precompile provides the same operation for 100,000 gas---a $150\times$
reduction. The precompile executes compiled Go code with SIMD-optimized
NTT (Number Theoretic Transform) operations.
\subsection{Input/Output ABI}
Each precompile accepts ABI-encoded input:
\begin{verbatim}
ML-DSA Verify:
Input: abi.encode(bytes pk, bytes msg, bytes sig)
Output: abi.encode(bool valid)
ML-KEM Decapsulate:
Input: abi.encode(bytes sk, bytes ct)
Output: abi.encode(bytes32 sharedSecret)
SLH-DSA Verify:
Input: abi.encode(bytes pk, bytes msg, bytes sig)
Output: abi.encode(bool valid)
\end{verbatim}
A Solidity interface contract wraps each precompile for ergonomic use:
\begin{verbatim}
interface IMLDSA {
function verify(
bytes calldata pk,
bytes calldata msg,
bytes calldata sig
) external view returns (bool);
}
\end{verbatim}
%% =====================================================================