pub trait Compress: Debug + Sized + Clone {
type Output: Sized + AsRef<[u8]>;
const OUTPUT_SIZE: usize;
// Required methods
fn to_bytes(&self) -> Self::Output;
fn from_bytes(output: &Self::Output) -> CtOption<Self>;
}
Expand description
Artifacts of the system that can be compressed should implement this trait.
Secret artifacts such as the master secret key, user secret key should implement this in constant-time.
Required Associated Types§
Required Associated Constants§
sourceconst OUTPUT_SIZE: usize
const OUTPUT_SIZE: usize
The size of the compressed output.
Required Methods§
sourcefn to_bytes(&self) -> Self::Output
fn to_bytes(&self) -> Self::Output
Compresses this artifact to a short serialized byte representation.
sourcefn from_bytes(output: &Self::Output) -> CtOption<Self>
fn from_bytes(output: &Self::Output) -> CtOption<Self>
Decompresses a serialized artifact.
Implementors§
source§impl Compress for ibe::ibe::boyen_waters::CipherText
Available on crate feature boyen_waters
only.
impl Compress for ibe::ibe::boyen_waters::CipherText
Available on crate feature
boyen_waters
only.source§impl Compress for ibe::ibe::boyen_waters::PublicKey
Available on crate feature boyen_waters
only.
impl Compress for ibe::ibe::boyen_waters::PublicKey
Available on crate feature
boyen_waters
only.source§impl Compress for ibe::ibe::boyen_waters::SecretKey
Available on crate feature boyen_waters
only.
impl Compress for ibe::ibe::boyen_waters::SecretKey
Available on crate feature
boyen_waters
only.source§impl Compress for ibe::ibe::boyen_waters::UserSecretKey
Available on crate feature boyen_waters
only.
impl Compress for ibe::ibe::boyen_waters::UserSecretKey
Available on crate feature
boyen_waters
only.source§impl Compress for ibe::ibe::cgw::CipherText
Available on crate feature cgw
only.
impl Compress for ibe::ibe::cgw::CipherText
Available on crate feature
cgw
only.source§impl Compress for ibe::ibe::cgw::UserSecretKey
Available on crate feature cgw
only.
impl Compress for ibe::ibe::cgw::UserSecretKey
Available on crate feature
cgw
only.source§impl Compress for ibe::ibe::waters::CipherText
Available on crate feature waters
only.
impl Compress for ibe::ibe::waters::CipherText
Available on crate feature
waters
only.source§impl Compress for ibe::ibe::waters::UserSecretKey
Available on crate feature waters
only.
impl Compress for ibe::ibe::waters::UserSecretKey
Available on crate feature
waters
only.source§impl Compress for ibe::ibe::waters_naccache::CipherText
Available on crate feature waters_naccache
only.
impl Compress for ibe::ibe::waters_naccache::CipherText
Available on crate feature
waters_naccache
only.source§impl Compress for ibe::ibe::waters_naccache::PublicKey
Available on crate feature waters_naccache
only.
impl Compress for ibe::ibe::waters_naccache::PublicKey
Available on crate feature
waters_naccache
only.source§impl Compress for ibe::ibe::waters_naccache::SecretKey
Available on crate feature waters_naccache
only.
impl Compress for ibe::ibe::waters_naccache::SecretKey
Available on crate feature
waters_naccache
only.source§impl Compress for ibe::ibe::waters_naccache::UserSecretKey
Available on crate feature waters_naccache
only.
impl Compress for ibe::ibe::waters_naccache::UserSecretKey
Available on crate feature
waters_naccache
only.source§impl Compress for ibe::kem::cgw_fo::UserSecretKey
Available on crate feature cgwfo
only.
impl Compress for ibe::kem::cgw_fo::UserSecretKey
Available on crate feature
cgwfo
only.source§impl Compress for ibe::kem::cgw_kv::CipherText
Available on crate feature cgwkv
only.
impl Compress for ibe::kem::cgw_kv::CipherText
Available on crate feature
cgwkv
only.source§impl Compress for ibe::kem::cgw_kv::UserSecretKey
Available on crate feature cgwkv
only.
impl Compress for ibe::kem::cgw_kv::UserSecretKey
Available on crate feature
cgwkv
only.source§impl Compress for ibe::kem::kiltz_vahlis_one::CipherText
Available on crate feature kv1
only.
impl Compress for ibe::kem::kiltz_vahlis_one::CipherText
Available on crate feature
kv1
only.source§impl Compress for ibe::kem::kiltz_vahlis_one::UserSecretKey
Available on crate feature kv1
only.
impl Compress for ibe::kem::kiltz_vahlis_one::UserSecretKey
Available on crate feature
kv1
only.source§impl Compress for Ciphertext<CGWFO>
Available on crate feature mkem
only.
impl Compress for Ciphertext<CGWFO>
Available on crate feature
mkem
only.source§impl Compress for Ciphertext<CGWKV>
Available on crate feature mkem
only.
impl Compress for Ciphertext<CGWKV>
Available on crate feature
mkem
only.