返回资讯中心
外部精选
软件工程
#开发者实时流

Faster Post-Quantum Cryptography with JDK Intrinsics

News and views from members of the Java team at Oracle

Hacker News 最新ejboy2026/10/16 · 2026/10/166 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

News and views from members of the Java team at Oracle

The JDK supports modern post-quantum cryptography: ML-KEM, specified in FIPS 203; ML-DSA, specified in FIPS 204; and the hash-based HSS/LMS algorithms described in RFC 8554. These algorithms are implemented in Java, which provides portability and a reliable functional baseline. For particularly performance-sensitive operations, however, HotSpot can replace selected Java methods with optimized, platform-specific machine code known as an intrinsic. This code can take advantage of CPU features such as SHA-3 acceleration, SHA-256 acceleration, vector instructions, and efficient modular-arithmetic operations.

An intrinsic does not permanently replace the Java implementation. The Java method remains the portable fallback. The @IntrinsicCandidate annotation identifies methods that HotSpot may replace when a suitable implementation is available on the current platform.

Not every method benefits from becoming an intrinsic. A good candidate is both computationally expensive and frequently used, and its platform-specific implementation must provide a meaningful improvement over the Java fallback.

ML-KEM has several methods annotated with @IntrinsicCandidate. They are in the hot paths for key generation, encapsulation, and decapsulation. The most promising operations have highly regular computation over polynomials with exactly 256 coefficients. This means the same small set of arithmetic steps can be applied to each coefficient:

Forward and inverse number theoretic transforms (NTTs): many independent butterfly operations¹.

NTT-domain polynomial multiplication: repeated modular multiply-and-add operations.

Polynomial addition: straightforward to vectorize.

Barrett reduction: the same modular reduction across many coefficients.

Bit packing and unpacking: well suited to CPU byte-shuffle and bit-extraction instructions.

Assembly code is not inherently faster than Java; these operations are good candidates because their structure lets modern CPUs exploit the same patterns directly and repeatedly.

ML-DSA and ML-KEM are both lattice-based cryptographic schemes and share several broad categories of polynomial operations:

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →