use opaque_ke::{Ristretto255, TripleDh, ServerSetup, CredentialResponse, RegistrationUploadLen, RegistrationResponse}; use opaque_ke::keypair::{OprfSeed, PrivateKey}; use sha2::Sha512; use opaque_ke::CipherSuite; use opaque_ke::argon2::Argon2; use opaque_ke::generic_array::GenericArray; use uuid::Uuid; pub const NONCE_SIZE: usize = 12; pub const SESSION_KEY_SIZE: usize = 32; pub const SECRET_KEY_SIZE: usize = 16; pub struct NKodeCipherSuite; impl CipherSuite for NKodeCipherSuite { type OprfCs = Ristretto255; type KeyExchange = TripleDh; type Ksf = Argon2<'static>; } pub type NKodeServerSetup = ServerSetup, OprfSeed>; pub type PasswordFile = GenericArray>; #[derive(Debug, Clone, PartialEq, Eq)] pub struct LoginSession { pub response: CredentialResponse, pub session_id: Uuid } #[derive(Debug, Clone, PartialEq, Eq)] pub struct RegisterSession { pub response: RegistrationResponse, pub session_id: Uuid }