10 releases

0.3.0 Apr 14, 2022
0.2.4 Nov 25, 2021
0.2.3 Sep 20, 2021
0.2.1 Jun 10, 2021
0.1.1 Nov 20, 2019

#2420 in Cryptography

Download history 9/week @ 2024-02-25 1/week @ 2024-03-03 94/week @ 2024-03-31

94 downloads per month



GNU Style Assembly 567K SLoC // 0.0% comments C 354K SLoC // 0.2% comments Bitbake 59K SLoC // 0.0% comments Rust 4K SLoC // 0.0% comments Python 1.5K SLoC // 0.1% comments SWIG 348 SLoC // 0.0% comments Jinja2 204 SLoC INI 5 SLoC


This (implementation of an) cryptographic algorithm is insecure.
This crate will only compile if you enable the "cryptographically-insecure" feature.

Only use this crate and algorithm for research and educational purposes.

This crate contains bindings to the C implementations of the following schemes, from PQClean.

This project packages Post-Quantum cryptographic algorithms that participate in the NIST PQC standardization effort. It is currently a collection of wrappers around C implementations from the PQClean project.


If you want serde support, enable the serialization feature.

Included implementations from PQClean

Below is a list of the included schemes and the corresponding implementations sourced from PQClean. The "default" implementation is used in the Rust-friendly interface, alternative implementations are exposed as ffi methods only.

  • rainbowI-circumzenithal
    • clean
  • rainbowI-classic
    • clean
  • rainbowI-compressed
    • clean
  • rainbowIII-circumzenithal
    • clean
  • rainbowIII-classic
    • clean
  • rainbowIII-compressed
    • clean
  • rainbowV-circumzenithal
    • clean
  • rainbowV-classic
    • clean
  • rainbowV-compressed
    • clean


This implementation requires a lot of stack space. You need to specify RUST_MIN_STACK=800000000, probably.

Rainbow does no longer get the claimed security, see https://eprint.iacr.org/2022/214.pdf


The wrappers and wrapper generation scripts in this project are covered by the MIT or Apache 2.0 licenses, at your choice.

The implementations we link to are not, however. Please see the PQClean project for the appropriate licenses.