pakery-crypto
Concrete cryptographic implementations for the pakery PAKE workspace.
This crate provides implementations of the traits defined in pakery-core, backed by well-known cryptographic libraries. Select the primitives you need via feature flags.
Usage
[]
= { = "0.1", = ["ristretto255"] }
Available types
Ristretto255 (ristretto255 feature)
| Type | Implements |
|---|---|
Ristretto255Group |
CpaceGroup |
Ristretto255Dh |
DhGroup |
Ristretto255Oprf |
Oprf |
Sha512Hash |
Hash |
HkdfSha512 |
Kdf |
HmacSha512 |
Mac |
SPAKE2_M_COMPRESSED |
SPAKE2 M constant |
SPAKE2_N_COMPRESSED |
SPAKE2 N constant |
P-256 (p256 feature)
| Type | Implements |
|---|---|
P256Group |
CpaceGroup |
P256Dh |
DhGroup |
P256Oprf |
Oprf |
Sha256Hash |
Hash |
HkdfSha256 |
Kdf |
HmacSha256 |
Mac |
SPAKE2_P256_M_COMPRESSED |
SPAKE2 M constant (P-256) |
SPAKE2_P256_N_COMPRESSED |
SPAKE2 N constant (P-256) |
Argon2 (argon2 feature)
| Type | Implements |
|---|---|
Argon2idKsf |
Ksf |
Example: defining a ciphersuite
use CpaceCiphersuite;
use ;
;
Features
| Feature | Description |
|---|---|
std (default) |
Enable std support |
ristretto255 (default) |
Ristretto255 / SHA-512 primitives |
p256 |
P-256 / SHA-256 primitives |
argon2 |
Argon2id key-stretching function |
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
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.