A whimsical STROBE based encryption protocol
1#![no_std]
2#![forbid(unsafe_code)]
3
4use ml_kem::{MlKem512, MlKem768};
5pub use wharrgarbl_neko::{Neko128, Neko192, Neko256};
6
7pub mod handshake;
8pub mod transport;
9
10extern crate alloc;
11
12/// Version of WHARRGARBL that this crate implements.
13pub static WHARRGHARBL_PROTO: &str = "WGBLv0.2";
14
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
16#[repr(u8)]
17enum Role {
18 Sender = 0,
19 Receiver = 1,
20}
21
22impl core::ops::BitXor for Role {
23 fn bitxor(self, rhs: Self) -> Self::Output {
24 (self as u8) ^ (rhs as u8)
25 }
26
27 type Output = u8;
28}
29
30pub mod utils {
31 pub use wharrgarbl_utils::{Buffer, BufferSlice};
32}
33
34pub type NekoClientHandshake128 = handshake::ClientHandshake<Neko128, MlKem512>;
35pub type NekoServerHandshake128 = handshake::ServerHandshake<Neko128, MlKem512>;
36pub type NekoClientHandshake192 = handshake::ClientHandshake<Neko192, MlKem768>;
37pub type NekoServerHandshake192 = handshake::ServerHandshake<Neko192, MlKem768>;
38pub type NekoClientHandshake256 = handshake::ClientHandshake<Neko256, MlKem768>;
39pub type NekoServerHandshake256 = handshake::ServerHandshake<Neko256, MlKem768>;