Files
zeekay abf99d05fc papers: reorganize into per-paper dirs, add Antje Worring as co-author
Restructured from flat .tex/.pdf files into per-paper subdirectories.
Added Antje Worring as co-author on all papers.
Synced PDFs to pdfs/ for download site.
2026-04-18 21:50:07 -07:00

38 lines
1.1 KiB
TeX

\section{Solidity Interface Contracts}
We provide Solidity libraries for type-safe precompile access:
\begin{lstlisting}[language=Solidity,caption={Solidity interface library}]
library PQCrypto {
address constant DILITHIUM = address(0x0230);
address constant FALCON = address(0x0231);
function verifyDilithium(
bytes memory pubKey,
bytes memory signature,
bytes memory message
) internal view returns (bool) {
(bool ok, bytes memory result) = DILITHIUM.staticcall(
abi.encodePacked(pubKey, signature, message)
);
if (!ok || result.length != 32) return false;
return abi.decode(result, (uint256)) == 1;
}
function verifyFalcon(
bytes memory pubKey,
bytes memory signature,
bytes memory message
) internal view returns (bool) {
(bool ok, bytes memory result) = FALCON.staticcall(
abi.encodePacked(pubKey, signature, message)
);
if (!ok || result.length != 32) return false;
return abi.decode(result, (uint256)) == 1;
}
}
\end{lstlisting}
%% ============================================================