#crypto #opaque #passwords #authentication

no-std opaque-ke

An implementation of the OPAQUE password-authenticated key exchange protocol

20 releases (5 stable)

3.0.0-pre.4 Jul 25, 2023
3.0.0-pre.2 Mar 15, 2023
2.0.0 Sep 22, 2022
2.0.0-pre.3 Jul 11, 2022
0.1.0 Jun 5, 2020

#260 in No standard library

Download history 2522/week @ 2023-10-31 3122/week @ 2023-11-07 2162/week @ 2023-11-14 1809/week @ 2023-11-21 2433/week @ 2023-11-28 2024/week @ 2023-12-05 2614/week @ 2023-12-12 1434/week @ 2023-12-19 1013/week @ 2023-12-26 2470/week @ 2024-01-02 1927/week @ 2024-01-09 2889/week @ 2024-01-16 2439/week @ 2024-01-23 2721/week @ 2024-01-30 2661/week @ 2024-02-06 2230/week @ 2024-02-13

11,033 downloads per month
Used in 6 crates (5 directly)

Apache-2.0 OR MIT


The OPAQUE key exchange protocol Build Status

OPAQUE is an asymmetric password-authenticated key exchange protocol. It allows a client to authenticate to a server using a password, without ever having to expose the plaintext password to the server.

This implementation is based on the Internet Draft for OPAQUE.


Asymmetric Password Authenticated Key Exchange (aPAKE) protocols are designed to provide password authentication and mutually authenticated key exchange without relying on PKI (except during user/password registration) and without disclosing passwords to servers or other entities other than the client machine.

OPAQUE is a PKI-free aPAKE that is secure against pre-computation attacks and capable of using a secret salt.


The API can be found here along with an example for usage. More examples can be found in the examples directory.


Add the following line to the dependencies of your Cargo.toml:

opaque-ke = "3.0.0-pre.4"

Minimum Supported Rust Version

Rust 1.65 or higher.


This library was audited by NCC Group in June of 2021. The audit was sponsored by WhatsApp for its use in enabling end-to-end encrypted backups.

The audit found issues in release v0.5.0, and the fixes were subsequently incorporated into release v1.2.0. See the full audit report here.



The authors of this code are Kevin Lewi (@kevinlewi) and François Garillot (@huitseeker). To learn more about contributing to this project, see this document.


Special thanks go to Hugo Krawczyk and Chris Wood for helping to clarify discrepancies and making suggestions for improving this implementation. Additional credit goes to @daxpedda for adding no_std support, p256 support, and making other general improvements to the library.


This project is dual-licensed under either the MIT license or the Apache License, Version 2.0. You may select, at your option, one of the above-listed licenses.


~99K SLoC