TL;DR
This paper presents optimized implementations of the post-quantum Supersingular Isogeny Diffie-Hellman (SIDH) and Key Encapsulation (SIKE) protocols for ARM processors. By developing novel, highly efficient modular multiplication routines that intricately blend ARM and NEON instructions, the authors achieve significant speedups, making these promising quantum-resistant cryptographic schemes more practical for widespread adoption on mobile and embedded devices.
What Problem Does This Paper Address?
The advent of quantum computers poses a significant threat to current public-key cryptography. Post-quantum cryptography (PQC) aims to develop new cryptographic algorithms resistant to quantum attacks. Among the leading PQC candidates are schemes based on supersingular isogenies, such as SIDH and SIKE. While these schemes offer attractive features like small public keys, they are computationally intensive, particularly their core modular multiplication operations. This slowness hinders their practical deployment on resource-constrained devices like smartphones and embedded systems, which are increasingly prevalent. This paper addresses this performance bottleneck by optimizing the fundamental modular multiplication routines for widely used ARM architectures (ARMv7-A and ARMv8-A), aiming to bridge the gap between the theoretical promise of isogeny-based cryptography and its real-world applicability.
Methods
The core of this work lies in developing highly optimized modular multiplication algorithms for ARM processors, specifically targeting the SIDH and SIKE protocols. The authors employ a hybrid approach that leverages both the general-purpose ARM instructions and the Single Instruction Multiple Data (SIMD) NEON instructions.
For 32-bit ARMv7-A processors, they introduce a "unified ARM/NEON multiprecision multiplication" that finely interleaves ARM and NEON instructions. This strategy aims to maximize instruction-level parallelism (ILP) and minimize pipeline stalls and memory accesses. They utilize Karatsuba multiplication for multiprecision multiplication and a novel variant of the hybrid-scanning approach for Montgomery reduction, specifically designed to work efficiently with the UMAAL instruction.
For 64-bit ARMv8-A processors, they develop efficient multiprecision multiplication and Montgomery reduction algorithms that exploit the power of 64-bit instructions.
A key aspect of their approach is the use of non-redundant representations for operands. This choice facilitates integration with existing cryptographic libraries, such as the Microsoft SIDH library, by avoiding the need for costly conversion routines.
The authors also highlight their focus on security against side-channel attacks, stating that their software does not use conditional branches over secret data or secret memory addresses.
Datasets
Not discussed in the paper. The paper focuses on algorithmic optimization and performance evaluation on specific hardware, rather than training or evaluating on datasets.
Key Insights and Ideas
- ARM and NEON Synergy: The most significant insight is the effectiveness of carefully interleaving ARM and NEON instructions. Instead of treating them as separate entities, the authors demonstrate that a synergistic approach, where operations are strategically distributed between the two instruction sets, yields superior performance compared to using either set in isolation. This is achieved by minimizing data dependencies and maximizing the utilization of processor pipelines.
- UMAAL Instruction's Power: The UMAAL (unsigned multiplication with double accumulation) instruction on ARMv7-A is identified as a crucial component. Its ability to perform a 32x32-bit multiplication followed by two 32-bit accumulations in a single instruction, with minimal latency impact, is heavily exploited.
- Montgomery Reduction Optimization: The paper introduces a novel variant of the hybrid-scanning approach for Montgomery reduction, tailored for ARMv7-A and UMAAL. This, combined with the COS method for NEON, leads to significant speedups.
- "SIDH-Friendly" Primes Advantage: The authors leverage the properties of "SIDH-friendly" primes (primes of the form $2^{2^k} \pm 1$ or similar) to simplify Montgomery reduction. These primes allow for optimizations like replacing multiplications with shifts and subtractions, further boosting performance.
- Non-Redundant Representation is Practical: The decision to use non-redundant representations, while potentially less straightforward for some low-level optimizations, proves beneficial for library integration, making the optimized routines more readily usable in existing SIDH/SIKE implementations.
Key Results
The paper reports substantial performance improvements for SIDH and SIKE implementations on ARM processors:
- ARMv7-A (Cortex-A15): A full SIDHp503 key exchange is performed in approximately 176 million cycles (88 ms at 2.0 GHz). This is about 1.8x faster than previous NEON-based implementations for p503 and approximately 13x faster than an unoptimized C reference implementation.
- ARMv8-A (Cortex-A72): The same SIDHp503 key exchange takes about 90 million cycles (45 ms at 1.992 GHz). This is about 1.23x faster than another assembly-optimized ARMv8-A implementation and about 5-6x faster than the unoptimized C reference.
- Generic Multiprecision Multiplication: For 512-bit multiplication on ARM Cortex-A15, their ARM/NEON approach achieves a timing of 1,034 cycles, which is roughly 1.3x to 1.4x faster than previous ARM-only or NEON-only methods.
Limitations and Future Work
- Energy and Power Consumption: The authors acknowledge that their analysis does not take into account energy and power consumption. They suggest that while NEON instructions might consume more power individually, their use could lead to overall power reduction due to reduced execution time and memory accesses. This is identified as a direction for future work.
- Broader Applicability of Techniques: While the focus is on SIDH/SIKE, the developed modular multiplication techniques have broad applicability to other cryptographic schemes that rely on similar arithmetic operations. Further exploration of these applications is a potential future avenue.
- Generalized Moduli: The paper primarily focuses on "SIDH-friendly" primes. While some prior work has explored generalized moduli, the paper notes that it's still unclear how parameter choices for generalized moduli affect the full SIDH protocol's performance. Future work could investigate optimizations for these broader classes of moduli.
Summary updated