pakery-cpace
CPace balanced PAKE protocol implementation (draft-irtf-cfrg-cpace).
Part of the pakery workspace.
CPace is a balanced (symmetric) PAKE: both parties share the same password and derive a shared session key. It is simple, efficient, and provably secure in the UC model.
Usage
[]
= "0.1"
= { = "0.1", = ["ristretto255"] }
Example
use ;
use ;
;
let mut rng = OsRng;
// Initiator starts the exchange
let = start.unwrap;
// Responder processes initiator's share and responds
let = respond.unwrap;
// Initiator finishes
let init_out = state.finish.unwrap;
// Both sides derive the same intermediate session key
assert_eq!;
Features
| Feature | Description |
|---|---|
std (default) |
Enable std support |
getrandom |
Enable OS-backed RNG via rand_core/getrandom |
Security
#![forbid(unsafe_code)]- Constant-time comparisons via
subtle - Secret values zeroized on drop via
zeroize - Validated against draft-irtf-cfrg-cpace test vectors
MSRV
The minimum supported Rust version is 1.79.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.