← Back to Blog

PQC on RISC-V: Open ISA Implementation Status

PQC on RISC-V: Open ISA Implementation Status - QNSQY post-quantum encryption guide

RISC-V is the open instruction set architecture that has gone from academic curiosity to billion-shipped-cores reality in roughly fifteen years. Unlike ARM, which charges licensing fees for cores, RISC-V is freely available. That has made it the natural choice for new MCU designs, custom accelerators, and any project where the silicon designers wanted to extend the instruction set without paying royalties. The result is a fast-moving ecosystem with diverse implementations, from tiny embedded cores up to high-performance application processors.

Post-quantum cryptography on RISC-V is an active research area. Some of it tracks ARM Cortex-M closely (similar 32-bit register width, similar embedded constraints). Some of it goes its own way, exploiting RISC-V's vector extension (RVV) and the cryptography extension (Zk*) to accelerate lattice and hash operations. This article walks through what the RISC-V landscape looks like for PQC, what the relevant extensions are, and what the published performance numbers say.

What RISC-V Looks Like

RISC-V cores cover a wide range. Embedded cores like the SiFive E2 and the Andes N22 occupy the same space as Cortex-M0/M3, with 32-bit registers, no MMU, small caches. Application cores like SiFive U5 series and the Andes A45 are 64-bit, support Linux, and target embedded application class workloads. Server cores like SiFive P670 and the various RISC-V startups (Tenstorrent, Ventana, Esperanto) target high-performance computing.

For PQC, the embedded cores are the most pressured (memory and cycles are scarce), and the application cores are easier targets (similar to ARM Cortex-A or smaller server cores). The cryptography extension matters across both ends because it adds dedicated instructions for hash operations that PQC schemes use heavily.

The official RISC-V specifications and ratification status are published at riscv.org. The relevant extensions for PQC are Zkn (NIST-style scalar cryptography) and the V (vector) extension.

The Zkn Extension

RISC-V's cryptography extension, ratified as Zkn (along with Zks for non-NIST and Zkr for SHA-3), adds instructions for AES, SHA-256, SHA-512, and SM4. The instructions are scalar (no vectors) and target embedded cores that need cryptographic acceleration without the area cost of vector units.

For PQC, the most useful Zkn instructions are the SHA-256 and SHA-3/Keccak instructions. ML-KEM and ML-DSA both use SHAKE (a Keccak-based extendable-output function) heavily. SLH-DSA uses SHA-256 or SHAKE depending on the variant. Hardware acceleration of these primitives directly helps PQC throughput.

A Cortex-M4-class RISC-V core with Zkn extensions can run SHAKE-128 in roughly 25-40 cycles per byte, compared to 70-90 cycles per byte for a software-only Cortex-M4 implementation. That speedup translates directly into faster PQC operations, particularly for SLH-DSA where hash time dominates.

The Vector Extension (RVV)

The RISC-V Vector Extension, ratified as version 1.0 in late 2021, adds variable-length vector registers and a rich SIMD instruction set. RVV is conceptually similar to ARM's SVE (Scalable Vector Extension), with vectors that can be different lengths on different implementations. This makes RVV future-proof: code written for a 128-bit RVV implementation runs on a 512-bit implementation without recompilation.

For lattice-based PQC, RVV is a major win. ML-KEM and ML-DSA both rely on the Number Theoretic Transform (NTT), which is structurally similar to the FFT and benefits from SIMD. Polynomial multiplication, which dominates the runtime of lattice schemes, parallelizes well across vector lanes.

Published research on RVV-accelerated ML-KEM shows speedups of 2-4x compared to scalar implementations on the same RISC-V core, depending on the vector length. ML-DSA shows similar gains, with the rejection-sampling parts being slightly less SIMD-friendly than the polynomial arithmetic.

For more on the underlying math of these schemes, see our ML-KEM explained article.

Embedded RISC-V: Performance Numbers

The most direct comparison is RISC-V cores in the same performance class as Cortex-M4. SiFive's E31 and E76 are common embedded targets. Andes N22 and N25 are similar.

For ML-KEM-512 on a 100 MHz E31-class RISC-V core (rough numbers):

  • Keygen: ~700,000 cycles
  • Encapsulate: ~800,000 cycles
  • Decapsulate: ~800,000 cycles

That is roughly 30-40 percent slower than the same operation on a Cortex-M4 of similar clock speed, because the Cortex-M4 has DSP extensions (single-cycle multiply-accumulate) that the standard RISC-V ISA does not include. Adding the Zbb (basic bit manipulation) and Zbc (carry-less multiplication) extensions closes some of this gap. RISC-V cores with custom DSP extensions (some implementations include them) are competitive with Cortex-M4.

ML-DSA-44 on the same E31-class core:

  • Keygen: ~2 million cycles
  • Sign: ~5 million cycles (median)
  • Verify: ~2 million cycles

Again, this is somewhat slower than Cortex-M4 with the same clock speed, but it is still in the practical range for embedded applications.

Stack memory looks similar to Cortex-M4: roughly 3-4 KB for ML-KEM, 10-17 KB for ML-DSA. RISC-V's larger register set (32 GPRs versus 16 on Cortex-M) does not buy much for PQC, since the algorithms are dominated by working-set memory access, not register pressure.

For more on stack budgets, see our PQC stack memory analysis article.

Application-Class RISC-V

For 64-bit RISC-V cores in the application class (think Raspberry Pi-equivalent class), PQC performance is much better. A SiFive U74 or HiFive Unmatched at 1.2 GHz handles ML-KEM and ML-DSA in microseconds, not milliseconds.

With RVV present, the speedup is roughly 2-4x over scalar versions of the same algorithms. So a RISC-V application core with RVV can run ML-KEM-768 encapsulate in 100-200 microseconds, plenty fast for TLS handshakes or any other realistic workload.

The interesting comparison here is not RISC-V versus ARM Cortex-A, but rather RISC-V versus x86. Both architectures can leverage SIMD (RVV on RISC-V, AVX-512 on x86) to accelerate lattice arithmetic. Published benchmarks generally show modern RISC-V application cores roughly 30-50 percent of x86 performance per clock for PQC workloads, with the gap closing as RISC-V cores get more aggressive (out-of-order execution, wider issue, larger caches).

Hardware Accelerators on RISC-V SoCs

Many RISC-V SoCs include cryptographic accelerators, similar to the dedicated AES/SHA blocks common on ARM-based MCUs. These accelerators can dramatically speed up PQC by offloading the hash and AEAD operations.

Some specific accelerator patterns worth knowing:

  • Keccak/SHA-3 accelerator: directly speeds up SHAKE-based ML-KEM and ML-DSA. Can also speed up SLH-DSA's hash operations.
  • AES accelerator: useful for the symmetric-cipher side of hybrid encryption (ChaCha or AES-GCM after the KEM-derived key).
  • TRNG (true random number generator): required for key generation in any PQC scheme. The output rate matters for high-throughput systems.
  • Custom NTT accelerator: a few research SoCs include dedicated NTT hardware, achieving order-of-magnitude speedups for lattice arithmetic. None are widely available in production silicon yet.

For more on the FPGA side of PQC acceleration, see our PQC on FPGA article.

RISC-V in Production Today

RISC-V is shipping in real products. WD has shipped RISC-V cores in storage controllers for years. NXP has RISC-V coprocessors in some of its industrial parts. Microchip's PolarFire SoC FPGA includes RISC-V hard cores. Sipeed and various Chinese vendors ship RISC-V general-purpose computing boards.

Most of these production deployments have not yet enabled PQC, mostly because the broader ecosystem (TLS libraries, secure boot frameworks) has not yet integrated PQC at scale. As that changes (which is happening, with various TLS libraries adding ML-KEM support), RISC-V deployments will follow.

The interesting thing about RISC-V is that custom extensions are encouraged. A vendor designing a security-focused chip could add custom instructions for ML-KEM polynomial arithmetic, getting much better performance than the standard RVV implementation provides. Some research papers have demonstrated this kind of customization, achieving 5-10x speedups over standard RVV for specific PQC kernels.

This is a notable contrast to ARM, where adding custom instructions requires negotiating with ARM. On RISC-V, the architecture is open: vendors can customize as needed, as long as they accept that their custom code may not run on other RISC-V chips without porting.

Cryptographic Agility on RISC-V

One advantage of RISC-V is that its open ISA encourages cryptographic agility. New PQC algorithms (or future replacements for ML-KEM and ML-DSA, if those are needed) can be deployed in software without waiting for ISA changes. RVV's flexibility means SIMD-accelerated versions of new algorithms can ship as soon as the algorithms are designed.

This matters because the post-quantum cryptography landscape is still evolving. NIST has additional candidates in its ongoing analysis (BIKE, HQC, Classic McEliece for KEMs; FN-DSA which is Falcon, and the additional signature competition winners). RISC-V is well-positioned to support whatever wins the next round of standardization.

RISC-V Profiles and Extensions Status

RISC-V uses a profile system that bundles ratified extensions into a target specification. The RVA22 profile, ratified in late 2022, defines the application-class baseline. The RVA23 profile (under development) is expected to mandate the V (vector) extension, putting RVV-accelerated PQC within reach of any RVA23-compliant chip. Embedded RISC-V profiles (RVI20, RVM23) have different requirements and do not necessarily include vector or cryptography extensions.

Extension ratification in RISC-V is structured. An extension goes through public review, technical analysis, and a frozen state before it is ratified. After ratification, software toolchains can rely on the extension being available on chips that claim to support it. Zkn was ratified in 2022 along with the broader cryptography extension family. RVV was ratified in late 2021. Both are now standard pieces of the RISC-V ecosystem.

For chip vendors building PQC-friendly RISC-V parts, the path forward is clear: implement Zkn for hash acceleration, RVV for vector arithmetic, and any custom extensions needed for further optimization. Several chip vendors have public roadmaps that include this combination.

Open RISC-V PQC Implementations

The open-source RISC-V ecosystem includes several PQC implementations of varying quality. The pqcrypto library has portable C implementations that compile to any RISC-V target. The pqriscv project explores RISC-V-specific optimizations including custom assembly for embedded cores. Various academic research groups publish their RTL designs and software optimizations on github.

For developers integrating PQC into RISC-V projects, the recommendation is to start with portable implementations from a vetted library, profile the result, and only add architecture-specific optimizations if performance is inadequate. Many embedded RISC-V applications have plenty of cycle budget for portable PQC and do not need custom optimization.

What This Means for QNSQY Users

QNSQY runs on x86-64 desktop and server hardware with Linux or Windows. RISC-V desktop and server systems exist but are not yet mainstream, and QNSQY does not ship a RISC-V build.

Embedded RISC-V devices cannot open QNSQY files, because QNSQY does not run on them. For PQC on small RISC-V parts, the usual role is to verify and decrypt with a library on the device. Verification of ML-DSA signatures takes a few million cycles on an embedded RISC-V core, which is fast enough for occasional firmware update or configuration verification. Encryption and signing in real time on small RISC-V parts is generally not the right architecture: instead, do the heavy lifting on a more capable system and let the embedded device verify only.

For background on hybrid encryption, which QNSQY uses, see our hybrid encryption explainer.

FAQ

Is RISC-V slower than ARM for PQC? Without hardware extensions, embedded RISC-V cores are roughly 30-40 percent slower than same-clock Cortex-M4 cores for lattice-based PQC, because Cortex-M4 has DSP extensions that vanilla RISC-V lacks. With Zbb/Zbc extensions or custom DSP extensions, the gap closes. With RVV, application-class RISC-V cores are competitive with ARM Cortex-A.

Does RISC-V have a cryptography extension? Yes. The Zkn extension covers AES and SHA-2/SHA-3 acceleration. It is ratified and being implemented in production silicon. The Zkr extension covers SHA-3 specifically. The Zks extension covers non-NIST primitives (SM4).

Should I prefer RISC-V or ARM for new PQC-enabled designs? It depends on the volume, the licensing model, and the available toolchain support. ARM is more mature, has wider PQC library support today, and benefits from richer DSP extensions on Cortex-M. RISC-V is open, customizable, and has growing PQC support. Both will be capable PQC platforms within a few years.

Can I run ML-DSA on a small RISC-V core? Yes, on cores with at least 16 KB of SRAM. ML-DSA-44 needs about 10 KB of stack, so anything smaller is tight. ML-KEM-512 needs only 3 KB and runs on tinier parts.

Does QNSQY support RISC-V? Not today. QNSQY ships for x86-64 Linux (glibc 2.35 or newer) and x86-64 Windows 10 and 11 only, and there is no RISC-V build.

Sources

  1. NIST FIPS 203 (ML-KEM): https://csrc.nist.gov/pubs/fips/203/final
  2. NIST FIPS 204 (ML-DSA): https://csrc.nist.gov/pubs/fips/204/final
  3. NIST FIPS 205 (SLH-DSA): https://csrc.nist.gov/pubs/fips/205/final
  4. RISC-V International (Specifications): https://riscv.org/technical/specifications/
  5. RISC-V Cryptography Extensions Volume I: https://github.com/riscv/riscv-crypto
  6. RISC-V Vector Extension Specification: https://github.com/riscv/riscv-v-spec

Related Articles

Protect Your Data Before Q-Day Arrives

QNSQY's NIST-standardized post-quantum encryption protects files against both current and quantum-era threats.

Try QNSQY