#[cfg(all(feature = "cpace", feature = "ristretto255"))]
pub struct CpaceRistretto255;
#[cfg(all(feature = "cpace", feature = "ristretto255"))]
impl pakery_cpace::CpaceCiphersuite for CpaceRistretto255 {
type Group = crate::Ristretto255Group;
type Hash = crate::Sha512Hash;
const DSI: &'static [u8] = b"CPaceRistretto255";
const HASH_BLOCK_SIZE: usize = 128;
const FIELD_SIZE_BYTES: usize = 32;
}
#[cfg(all(feature = "cpace", feature = "p256"))]
pub struct CpaceP256;
#[cfg(all(feature = "cpace", feature = "p256"))]
impl pakery_cpace::CpaceCiphersuite for CpaceP256 {
type Group = crate::P256Group;
type Hash = crate::Sha512Hash;
const DSI: &'static [u8] = b"CPaceP256";
const HASH_BLOCK_SIZE: usize = 128;
const FIELD_SIZE_BYTES: usize = 32;
}
#[cfg(all(feature = "spake2", feature = "ristretto255"))]
pub struct Spake2Ristretto255;
#[cfg(all(feature = "spake2", feature = "ristretto255"))]
impl pakery_spake2::Spake2Ciphersuite for Spake2Ristretto255 {
type Group = crate::Ristretto255Group;
type Hash = crate::Sha512Hash;
type Kdf = crate::HkdfSha512;
type Mac = crate::HmacSha512;
const NH: usize = 64;
const M_BYTES: &'static [u8] = &crate::SPAKE2_M_COMPRESSED;
const N_BYTES: &'static [u8] = &crate::SPAKE2_N_COMPRESSED;
}
#[cfg(all(feature = "spake2", feature = "p256"))]
pub struct Spake2P256;
#[cfg(all(feature = "spake2", feature = "p256"))]
impl pakery_spake2::Spake2Ciphersuite for Spake2P256 {
type Group = crate::P256Group;
type Hash = crate::Sha256Hash;
type Kdf = crate::HkdfSha256;
type Mac = crate::HmacSha256;
const NH: usize = 32;
const M_BYTES: &'static [u8] = &crate::SPAKE2_P256_M_COMPRESSED;
const N_BYTES: &'static [u8] = &crate::SPAKE2_P256_N_COMPRESSED;
}
#[cfg(all(feature = "spake2plus", feature = "ristretto255"))]
pub struct Spake2PlusRistretto255;
#[cfg(all(feature = "spake2plus", feature = "ristretto255"))]
impl pakery_spake2plus::Spake2PlusCiphersuite for Spake2PlusRistretto255 {
type Group = crate::Ristretto255Group;
type Hash = crate::Sha512Hash;
type Kdf = crate::HkdfSha512;
type Mac = crate::HmacSha512;
const NH: usize = 64;
const M_BYTES: &'static [u8] = &crate::SPAKE2_M_COMPRESSED;
const N_BYTES: &'static [u8] = &crate::SPAKE2_N_COMPRESSED;
}
#[cfg(all(feature = "spake2plus", feature = "p256"))]
pub struct Spake2PlusP256;
#[cfg(all(feature = "spake2plus", feature = "p256"))]
impl pakery_spake2plus::Spake2PlusCiphersuite for Spake2PlusP256 {
type Group = crate::P256Group;
type Hash = crate::Sha256Hash;
type Kdf = crate::HkdfSha256;
type Mac = crate::HmacSha256;
const NH: usize = 32;
const M_BYTES: &'static [u8] = &crate::SPAKE2_P256_M_COMPRESSED;
const N_BYTES: &'static [u8] = &crate::SPAKE2_P256_N_COMPRESSED;
}
#[cfg(all(feature = "opaque", feature = "ristretto255"))]
pub struct OpaqueRistretto255;
#[cfg(all(feature = "opaque", feature = "ristretto255"))]
impl pakery_opaque::OpaqueCiphersuite for OpaqueRistretto255 {
type Hash = crate::Sha512Hash;
type Kdf = crate::HkdfSha512;
type Mac = crate::HmacSha512;
type Dh = crate::Ristretto255Dh;
type Oprf = crate::Ristretto255Oprf;
type Ksf = pakery_core::crypto::IdentityKsf;
const NN: usize = 32;
const NSEED: usize = 32;
const NOE: usize = 32;
const NOK: usize = 32;
const NM: usize = 64;
const NH: usize = 64;
const NPK: usize = 32;
const NSK: usize = 32;
const NX: usize = 64;
}
#[cfg(all(feature = "opaque", feature = "p256"))]
pub struct OpaqueP256;
#[cfg(all(feature = "opaque", feature = "p256"))]
impl pakery_opaque::OpaqueCiphersuite for OpaqueP256 {
type Hash = crate::Sha256Hash;
type Kdf = crate::HkdfSha256;
type Mac = crate::HmacSha256;
type Dh = crate::P256Dh;
type Oprf = crate::P256Oprf;
type Ksf = pakery_core::crypto::IdentityKsf;
const NN: usize = 32;
const NSEED: usize = 32;
const NOE: usize = 33;
const NOK: usize = 32;
const NM: usize = 32;
const NH: usize = 32;
const NPK: usize = 33;
const NSK: usize = 32;
const NX: usize = 32;
}
#[cfg(all(feature = "opaque", feature = "ristretto255", feature = "argon2"))]
pub struct OpaqueRistretto255Argon2;
#[cfg(all(feature = "opaque", feature = "ristretto255", feature = "argon2"))]
impl pakery_opaque::OpaqueCiphersuite for OpaqueRistretto255Argon2 {
type Hash = crate::Sha512Hash;
type Kdf = crate::HkdfSha512;
type Mac = crate::HmacSha512;
type Dh = crate::Ristretto255Dh;
type Oprf = crate::Ristretto255Oprf;
type Ksf = crate::Argon2idKsf;
const NN: usize = 32;
const NSEED: usize = 32;
const NOE: usize = 32;
const NOK: usize = 32;
const NM: usize = 64;
const NH: usize = 64;
const NPK: usize = 32;
const NSK: usize = 32;
const NX: usize = 64;
}
#[cfg(all(feature = "opaque", feature = "p256", feature = "argon2"))]
pub struct OpaqueP256Argon2;
#[cfg(all(feature = "opaque", feature = "p256", feature = "argon2"))]
impl pakery_opaque::OpaqueCiphersuite for OpaqueP256Argon2 {
type Hash = crate::Sha256Hash;
type Kdf = crate::HkdfSha256;
type Mac = crate::HmacSha256;
type Dh = crate::P256Dh;
type Oprf = crate::P256Oprf;
type Ksf = crate::Argon2idKsf;
const NN: usize = 32;
const NSEED: usize = 32;
const NOE: usize = 33;
const NOK: usize = 32;
const NM: usize = 32;
const NH: usize = 32;
const NPK: usize = 33;
const NSK: usize = 32;
const NX: usize = 32;
}