Trait ibe::Compress

source ·
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§

source

type Output: Sized + AsRef<[u8]>

The type of the output.

Required Associated Constants§

source

const OUTPUT_SIZE: usize

The size of the compressed output.

Required Methods§

source

fn to_bytes(&self) -> Self::Output

Compresses this artifact to a short serialized byte representation.

source

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.
source§

const OUTPUT_SIZE: usize = 528usize

§

type Output = [u8; 528]

source§

impl Compress for Gt

source§

const OUTPUT_SIZE: usize = 288usize

§

type Output = [u8; 288]

source§

impl Compress for ibe::ibe::boyen_waters::PublicKey

Available on crate feature boyen_waters only.
source§

const OUTPUT_SIZE: usize = 768usize

§

type Output = [u8; 768]

source§

impl Compress for ibe::ibe::boyen_waters::SecretKey

Available on crate feature boyen_waters only.
source§

const OUTPUT_SIZE: usize = 160usize

§

type Output = [u8; 160]

source§

impl Compress for ibe::ibe::boyen_waters::UserSecretKey

Available on crate feature boyen_waters only.
source§

const OUTPUT_SIZE: usize = 480usize

§

type Output = [u8; 480]

source§

impl Compress for ibe::ibe::cgw::CipherText

Available on crate feature cgw only.
source§

const OUTPUT_SIZE: usize = 480usize

§

type Output = [u8; 480]

source§

impl Compress for ibe::ibe::cgw::PublicKey

Available on crate feature cgw only.
source§

const OUTPUT_SIZE: usize = 576usize

§

type Output = [u8; 576]

source§

impl Compress for ibe::ibe::cgw::SecretKey

Available on crate feature cgw only.
source§

const OUTPUT_SIZE: usize = 384usize

§

type Output = [u8; 384]

source§

impl Compress for ibe::ibe::cgw::UserSecretKey

Available on crate feature cgw only.
source§

const OUTPUT_SIZE: usize = 384usize

§

type Output = [u8; 384]

source§

impl Compress for ibe::ibe::waters::CipherText

Available on crate feature waters only.
source§

const OUTPUT_SIZE: usize = 432usize

§

type Output = [u8; 432]

source§

impl Compress for ibe::ibe::waters::PublicKey

Available on crate feature waters only.
source§

const OUTPUT_SIZE: usize = 12_576usize

§

type Output = [u8; 12576]

source§

impl Compress for ibe::ibe::waters::SecretKey

Available on crate feature waters only.
source§

const OUTPUT_SIZE: usize = 48usize

§

type Output = [u8; 48]

source§

impl Compress for ibe::ibe::waters::UserSecretKey

Available on crate feature waters only.
source§

const OUTPUT_SIZE: usize = 144usize

§

type Output = [u8; 144]

source§

impl Compress for ibe::ibe::waters_naccache::CipherText

Available on crate feature waters_naccache only.
source§

const OUTPUT_SIZE: usize = 432usize

§

type Output = [u8; 432]

source§

impl Compress for ibe::ibe::waters_naccache::PublicKey

Available on crate feature waters_naccache only.
source§

const OUTPUT_SIZE: usize = 1_824usize

§

type Output = [u8; 1824]

source§

impl Compress for ibe::ibe::waters_naccache::SecretKey

Available on crate feature waters_naccache only.
source§

const OUTPUT_SIZE: usize = 96usize

§

type Output = [u8; 96]

source§

impl Compress for ibe::ibe::waters_naccache::UserSecretKey

Available on crate feature waters_naccache only.
source§

const OUTPUT_SIZE: usize = 144usize

§

type Output = [u8; 144]

source§

impl Compress for ibe::kem::cgw_fo::UserSecretKey

Available on crate feature cgwfo only.
source§

const OUTPUT_SIZE: usize = 448usize

§

type Output = [u8; 448]

source§

impl Compress for ibe::kem::cgw_kv::CipherText

Available on crate feature cgwkv only.
source§

const OUTPUT_SIZE: usize = 224usize

§

type Output = [u8; 224]

source§

impl Compress for ibe::kem::cgw_kv::PublicKey

Available on crate feature cgwkv only.
source§

const OUTPUT_SIZE: usize = 672usize

§

type Output = [u8; 672]

source§

impl Compress for ibe::kem::cgw_kv::SecretKey

Available on crate feature cgwkv only.
source§

const OUTPUT_SIZE: usize = 512usize

§

type Output = [u8; 512]

source§

impl Compress for ibe::kem::cgw_kv::UserSecretKey

Available on crate feature cgwkv only.
source§

const OUTPUT_SIZE: usize = 576usize

§

type Output = [u8; 576]

source§

impl Compress for ibe::kem::kiltz_vahlis_one::CipherText

Available on crate feature kv1 only.
source§

const OUTPUT_SIZE: usize = 144usize

§

type Output = [u8; 144]

source§

impl Compress for ibe::kem::kiltz_vahlis_one::PublicKey

Available on crate feature kv1 only.
source§

const OUTPUT_SIZE: usize = 25_056usize

§

type Output = [u8; 25056]

source§

impl Compress for ibe::kem::kiltz_vahlis_one::SecretKey

Available on crate feature kv1 only.
source§

const OUTPUT_SIZE: usize = 48usize

§

type Output = [u8; 48]

source§

impl Compress for ibe::kem::kiltz_vahlis_one::UserSecretKey

Available on crate feature kv1 only.
source§

const OUTPUT_SIZE: usize = 192usize

§

type Output = [u8; 192]

source§

impl Compress for Ciphertext<CGWFO>

Available on crate feature mkem only.
source§

const OUTPUT_SIZE: usize = 540usize

§

type Output = [u8; 540]

source§

impl Compress for Ciphertext<CGWKV>

Available on crate feature mkem only.
source§

const OUTPUT_SIZE: usize = 284usize

§

type Output = [u8; 284]

source§

impl Compress for Ciphertext<KV1>

Available on crate feature mkem only.
source§

const OUTPUT_SIZE: usize = 204usize

§

type Output = [u8; 204]