Paper 2026/2371 Original: eprint.iacr.org/2026/2371 ↗

DP-Guided Schedule Selection for $\mathbb{F}_2[x]$ Multiplication across ISAs

Junyu Zhou
Xiao Lan
Jing Wang
Hao Ren
Weiran Liu
Si Gao
Abstract

Efficient multiplication over $\mathbb{F}_2[x]$ is a core primitive in classical and post-quantum cryptographic software. As ARM and RISC-V become increasingly relevant for open-source cryptographic libraries such as OpenSSL and liboqs, arithmetic kernels must be retuned across a wider range of Instruction Set Architectures (ISAs). High-performance arithmetic libraries recursively apply Karatsuba- and Toom-style decomposition rules, each splitting the operands into smaller subproblems and recombining the resulting products. The resulting decomposition schedule is the recursive tree of rule choices from the top-level multiplication down to the base kernels. However, hand-tuned schedules can miss better decompositions at large operand sizes, while ISA-specific primitive costs complicate cross-platform retuning. In this paper, we formulate recursive $\mathbb{F}_2[x]$ multiplication as a schedule-selection problem. The recursive rule space has optimal substructure, allowing dynamic programming (DP) over a compact ISA profile that accounts for base multiplication, XORs, memory traffic, and recursive overhead. The resulting schedules are materialized as dispatch tables or fixed-size kernels. Across x86-64, ARM64, RISC-V64, and RP2040, DP costs track runtime trends across input sizes, and the full rule set achieves $1.04$–$1.18\times$ geomean speedup over gf2x. HQC and BIKE integrations on the three 64-bit platforms yield $1.06$–$1.21\times$ and $1.01$–$1.70\times$ end-to-end speedups, respectively, against their platform baselines. We also evaluate Classic McEliece on these platforms. With prepared profiles, HQC/BIKE schedule selection takes 0.075–0.762 seconds, avoiding candidate compilation and benchmarking during search. The scheme provides a systematic alternative to hand tuning and measurement-driven per-size empirical search, reducing the effort required to port and retune carry-less multiplication kernels.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint.
History
2026-10-06: last updated
2026-10-06: published
Short URL
https://ia.cr/2026/2371
License
https://creativecommons.org/licenses/by/4.0/

BibTeX

@misc{cryptoeprint:2026/2371,
      author = {Junyu Zhou and Xiao Lan and Jing Wang and Hao Ren and Weiran Liu and Si Gao},
      title = {DP-Guided Schedule Selection for $\mathbb{F}_2[x]$ Multiplication across ISAs},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/2371},
      year = {2026},
      url = {https://eprint.iacr.org/2026/2371}
}
Note: In order to protect the privacy of readers, this archive does not use cookies or embedded third party content.