pub struct CompressedKeySwitchingKey { /* private fields */ }shortint only.Expand description
A structure containing the casting public key.
The casting key is generated by the client and is meant to be published: the client sends it to the server so it can cast from one set of parameters to another.
Implementations§
Source§impl CompressedKeySwitchingKey
impl CompressedKeySwitchingKey
pub fn new<'input_key, InputEncryptionKey>(
input_key_pair: (InputEncryptionKey, Option<&CompressedServerKey>),
output_key_pair: (&ClientKey, &CompressedServerKey),
params: ShortintKeySwitchingParameters,
) -> Selfwhere
InputEncryptionKey: Into<SecretEncryptionKeyView<'input_key>>,
pub fn decompress(&self) -> KeySwitchingKey
Sourcepub fn into_raw_parts(
self,
) -> (CompressedKeySwitchingKeyMaterial, CompressedServerKey, Option<CompressedServerKey>)
pub fn into_raw_parts( self, ) -> (CompressedKeySwitchingKeyMaterial, CompressedServerKey, Option<CompressedServerKey>)
Deconstruct a CompressedKeySwitchingKey into its constituents.
Sourcepub fn from_raw_parts(
key_switching_key_material: CompressedKeySwitchingKeyMaterial,
dest_server_key: CompressedServerKey,
src_server_key: Option<CompressedServerKey>,
) -> Self
pub fn from_raw_parts( key_switching_key_material: CompressedKeySwitchingKeyMaterial, dest_server_key: CompressedServerKey, src_server_key: Option<CompressedServerKey>, ) -> Self
Construct a CompressedKeySwitchingKey from its constituents.
§Panics
Panics if the provided raw parts are not compatible with each other, i.e.:
if the provided source CompressedServerKey ciphertext
LweDimension does not match the
input LweDimension of the
SeededLweKeyswitchKeyOwned in the provided CompressedKeySwitchingKeyMaterial or if
the provided destination CompressedServerKey ciphertext
LweDimension does not match
the output LweDimension of
the SeededLweKeyswitchKeyOwned in the provided CompressedKeySwitchingKeyMaterial.
Trait Implementations§
Source§impl Clone for CompressedKeySwitchingKey
impl Clone for CompressedKeySwitchingKey
Source§fn clone(&self) -> CompressedKeySwitchingKey
fn clone(&self) -> CompressedKeySwitchingKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompressedKeySwitchingKey
impl Debug for CompressedKeySwitchingKey
Source§impl<'de> Deserialize<'de> for CompressedKeySwitchingKey
impl<'de> Deserialize<'de> for CompressedKeySwitchingKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Unversionize for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
impl Unversionize for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
Source§fn unversionize(
versioned: Self::VersionedOwned,
) -> Result<Self, UnversionizeError>
fn unversionize( versioned: Self::VersionedOwned, ) -> Result<Self, UnversionizeError>
Source§impl UnversionizeVec for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
impl UnversionizeVec for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
fn unversionize_vec( versioned: Self::VersionedVec, ) -> Result<Vec<Self>, UnversionizeError>
Source§impl Version for CompressedKeySwitchingKey
impl Version for CompressedKeySwitchingKey
Source§impl Versionize for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
impl Versionize for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
Source§type Versioned<'vers> = <CompressedKeySwitchingKeyVersions as VersionsDispatch<CompressedKeySwitchingKey>>::Ref<'vers>
type Versioned<'vers> = <CompressedKeySwitchingKeyVersions as VersionsDispatch<CompressedKeySwitchingKey>>::Ref<'vers>
Source§fn versionize(&self) -> Self::Versioned<'_>
fn versionize(&self) -> Self::Versioned<'_>
Source§impl VersionizeOwned for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
impl VersionizeOwned for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
type VersionedOwned = <CompressedKeySwitchingKeyVersions as VersionsDispatch<CompressedKeySwitchingKey>>::Owned
Source§fn versionize_owned(self) -> Self::VersionedOwned
fn versionize_owned(self) -> Self::VersionedOwned
Source§impl VersionizeSlice for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
impl VersionizeSlice for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
type VersionedSlice<'vers> = Vec<<CompressedKeySwitchingKey as Versionize>::Versioned<'vers>>
fn versionize_slice(slice: &[Self]) -> Self::VersionedSlice<'_>
Source§impl VersionizeVec for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
impl VersionizeVec for CompressedKeySwitchingKeywhere
CompressedKeySwitchingKeyVersions: VersionsDispatch<Self>,
type VersionedVec = Vec<<CompressedKeySwitchingKey as VersionizeOwned>::VersionedOwned>
fn versionize_vec(vec: Vec<Self>) -> Self::VersionedVec
Auto Trait Implementations§
impl Freeze for CompressedKeySwitchingKey
impl RefUnwindSafe for CompressedKeySwitchingKey
impl Send for CompressedKeySwitchingKey
impl Sync for CompressedKeySwitchingKey
impl Unpin for CompressedKeySwitchingKey
impl UnwindSafe for CompressedKeySwitchingKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more