Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions polyfuzzy/src/fmd2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ pub struct FlagCiphertexts {
c: Vec<u8>,
}

impl FlagCiphertexts {
/// Return the bits of the flag ciphertext.
#[inline]
pub fn bits(&self) -> &[u8] {
&self.c
}
}

impl From<GenericFlagCiphertexts> for FlagCiphertexts {
fn from(value: GenericFlagCiphertexts) -> Self {
FlagCiphertexts {
Expand Down
8 changes: 8 additions & 0 deletions polyfuzzy/src/fmd2_compact/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ pub struct FmdPublicKey(PointEvaluations);
#[derive(Debug, Clone)]
pub struct FlagCiphertexts(GenericFlagCiphertexts);

impl FlagCiphertexts {
/// Return the bits of the flag ciphertext.
#[inline]
pub fn bits(&self) -> &[u8] {
&self.0.c.0
}
}

/// Cache of expanded FMD public keys.
#[derive(Debug, Clone)]
struct ExpandedKeyCache {
Expand Down