pub struct LweBootstrapKeyView64<'a>(_);
Expand description

A structure representing an LWE bootstrap key with 64 bits of precision.

By view here, we mean that the entity does not own the data, but immutably borrows it.

Notes:

This view is not Clone as Clone for a slice is not defined. It is not Deserialize either, as Deserialize of a slice is not defined. Immutable variant.

Trait Implementations

The kind of the entity.
Formats the value using the given formatter. Read more
Example:
use concrete_core::prelude::{
    DecompositionBaseLog, DecompositionLevelCount, GlweDimension, LweDimension, PolynomialSize,
    *,
};

// DISCLAIMER: the parameters used here are only for test purpose, and are not secure.
let lwe_dimension = LweDimension(2);
let glwe_size = GlweSize(2);
let polynomial_size = PolynomialSize(256);
let level = DecompositionLevelCount(2);
let base_log = DecompositionBaseLog(1);

// Unix seeder must be given a secret input.
// Here we just give it 0, which is totally unsafe.
const UNSAFE_SECRET: u128 = 0;
let mut engine = DefaultEngine::new(Box::new(UnixSeeder::new(UNSAFE_SECRET)))?;

let owned_container =
    vec![0_u64; lwe_dimension.0 * level.0 * glwe_size.0 * glwe_size.0 * polynomial_size.0];

let slice = owned_container.as_slice();

let lwe_bootstrap_key: LweBootstrapKeyView64 =
    engine.create_lwe_bootstrap_key_from(slice, glwe_size, polynomial_size, base_log, level)?;
let retrieved_slice = engine.consume_retrieve_lwe_bootstrap_key(lwe_bootstrap_key)?;

assert_eq!(slice, retrieved_slice);
Unsafely retrieves the content of the container from an LWE bootstrap key, consuming it in the process. Read more
Example:
use concrete_core::prelude::{
    DecompositionBaseLog, DecompositionLevelCount, GlweDimension, LweDimension, PolynomialSize,
    *,
};

// DISCLAIMER: the parameters used here are only for test purpose, and are not secure.
let lwe_dimension = LweDimension(2);
let glwe_size = GlweSize(2);
let polynomial_size = PolynomialSize(256);
let level = DecompositionLevelCount(2);
let base_log = DecompositionBaseLog(1);

// Unix seeder must be given a secret input.
// Here we just give it 0, which is totally unsafe.
const UNSAFE_SECRET: u128 = 0;
let mut engine = DefaultEngine::new(Box::new(UnixSeeder::new(UNSAFE_SECRET)))?;

let owned_container =
    vec![0_u64; lwe_dimension.0 * level.0 * glwe_size.0 * glwe_size.0 * polynomial_size.0];

let slice = owned_container.as_slice();

let lwe_bootstrap_key: LweBootstrapKeyView64 =
    engine.create_lwe_bootstrap_key_from(slice, glwe_size, polynomial_size, base_log, level)?;
Unsafely creates an LWE bootstrap key from an existing container. Read more
Returns the GLWE dimension of the key.
Returns the polynomial size of the key.
Returns the input LWE dimension of the key.
Returns the number of decomposition levels of the key.
Returns the logarithm of the base used in the key.
Returns the output LWE dimension of the key.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.