# pakery-core
[](https://crates.io/crates/pakery-core)
[](https://docs.rs/pakery-core)
[](LICENSE-MIT)
Shared traits and types for the [`pakery`](https://github.com/djx-y-z/pakery) PAKE workspace.
This crate defines the cryptographic trait abstractions that all protocol crates depend on. Concrete implementations are provided by [`pakery-crypto`](https://crates.io/crates/pakery-crypto).
## Traits
| `Hash` | Cryptographic hash function |
| `Kdf` | Key derivation function |
| `Mac` | Message authentication code |
| `CpaceGroup` | Group operations for CPace |
| `DhGroup` | Diffie-Hellman group operations |
| `Oprf` | Oblivious pseudorandom function |
| `Ksf` | Key-stretching function |
## Usage
```toml
[dependencies]
pakery-core = "0.1"
```
```rust
use pakery_core::crypto::{Hash, Kdf, Mac, CpaceGroup, DhGroup, Oprf, Ksf};
use pakery_core::{PakeError, SharedSecret};
```
## Features
| `std` (default) | Enable `std` support |
| `getrandom` | Enable OS-backed RNG via `rand_core/getrandom` |
## Security
- `#![forbid(unsafe_code)]`
- Constant-time comparisons via [`subtle`](https://crates.io/crates/subtle)
- Secret values zeroized on drop via [`zeroize`](https://crates.io/crates/zeroize)
## MSRV
The minimum supported Rust version is **1.79**.
## License
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT License](LICENSE-MIT) at your option.