Files
papers/post-quantum-securities/sections/03-evm-precompile-integration.tex
zeekay cb1155764d paper(ssb-partnership): Salaam Somali Bank — Shariah-native, diaspora-linked, Africa-wide modernisation
19-page paper (luxcover format) covering:
- SSB profile + diaspora corridor + why now (Honeycoin / VALR comparables)
- Partnership hypothesis (Simplici.io + Lux Network + SF Private Pay)
- Africa-at-Home concentric-rings deployment model
- Shariah-to-Lux primitive mapping (Murabahah, Mudharabah, Musharakah,
  Ijaarah, Sukuk, Takaful as typed on-chain objects with AAOIFI-aligned
  invariants)
- 5 augmentation workstreams (Shariah-native onboarding, on-chain
  Shariah contracts, diaspora corridor, drought-linked parametric
  Takaful, trade-finance digitisation)
- Commercial + compliance posture + phased roadmap
2026-06-10 22:35:36 -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}
%% =====================================================================