pub struct ServerKey { /* private fields */ }
Available on crate feature
integer
only.Expand description
Key of the server
This key contains the different keys needed to be able to do computations for each data type.
For a server to be able to do some FHE computations, the client needs to send this key beforehand.
Keys are stored in an Arc, so that cloning them is cheap (compared to an actual clone hundreds of MB / GB), and cheap cloning is needed for multithreading with less overhead)
Implementations§
Source§impl ServerKey
impl ServerKey
pub fn new(keys: &ClientKey) -> Self
pub fn into_raw_parts( self, ) -> (ServerKey, Option<KeySwitchingKeyMaterial>, Option<CompressionKey>, Option<DecompressionKey>, Option<NoiseSquashingKey>, Tag)
pub fn from_raw_parts( key: ServerKey, cpk_key_switching_key_material: Option<KeySwitchingKeyMaterial>, compression_key: Option<CompressionKey>, decompression_key: Option<DecompressionKey>, noise_squashing_key: Option<NoiseSquashingKey>, tag: Tag, ) -> Self
pub fn noise_squashing_key(&self) -> Option<&NoiseSquashingKey>
Trait Implementations§
Source§impl Deprecable for ServerKey
impl Deprecable for ServerKey
Source§impl<'de> Deserialize<'de> for ServerKey
impl<'de> Deserialize<'de> for ServerKey
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ServerKey> for FheBoolConformanceParams
impl From<&ServerKey> for FheBoolConformanceParams
Source§impl ParameterSetConformant for ServerKey
impl ParameterSetConformant for ServerKey
type ParameterSet = IntegerServerKeyConformanceParams
fn is_conformant(&self, parameter_set: &Self::ParameterSet) -> bool
Source§impl Unversionize for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
impl Unversionize for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
Source§fn unversionize(
versioned: Self::VersionedOwned,
) -> Result<Self, UnversionizeError>
fn unversionize( versioned: Self::VersionedOwned, ) -> Result<Self, UnversionizeError>
Creates an object from a versioned enum, and eventually upgrades from previous
variants.
Source§impl UnversionizeVec for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
impl UnversionizeVec for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
fn unversionize_vec( versioned: Self::VersionedVec, ) -> Result<Vec<Self>, UnversionizeError>
Source§impl Version for ServerKeywhere
Arc<IntegerServerKey>: VersionizeOwned + Unversionize + Versionize,
Tag: VersionizeOwned + Unversionize + Versionize,
impl Version for ServerKeywhere
Arc<IntegerServerKey>: VersionizeOwned + Unversionize + Versionize,
Tag: VersionizeOwned + Unversionize + Versionize,
Source§impl Versionize for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
impl Versionize for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
Source§type Versioned<'vers> = <ServerKeyVersions as VersionsDispatch<ServerKey>>::Ref<'vers>
type Versioned<'vers> = <ServerKeyVersions as VersionsDispatch<ServerKey>>::Ref<'vers>
The equivalent versioned type. It should have a variant for each version.
It may own the underlying data or only hold a read-only reference to it.
Source§fn versionize(&self) -> Self::Versioned<'_>
fn versionize(&self) -> Self::Versioned<'_>
Wraps the object into a versioned enum with a variant for each version. This will
use references on the underlying types if possible.
Source§impl VersionizeOwned for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
impl VersionizeOwned for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
type VersionedOwned = <ServerKeyVersions as VersionsDispatch<ServerKey>>::Owned
Source§fn versionize_owned(self) -> Self::VersionedOwned
fn versionize_owned(self) -> Self::VersionedOwned
Wraps the object into a versioned enum with a variant for each version. This will
clone the underlying types.
Source§impl VersionizeSlice for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
impl VersionizeSlice for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
type VersionedSlice<'vers> = Vec<<ServerKey as Versionize>::Versioned<'vers>>
fn versionize_slice(slice: &[Self]) -> Self::VersionedSlice<'_>
Source§impl VersionizeVec for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
impl VersionizeVec for ServerKeywhere
ServerKeyVersions: VersionsDispatch<Self>,
type VersionedVec = Vec<<ServerKey as VersionizeOwned>::VersionedOwned>
fn versionize_vec(vec: Vec<Self>) -> Self::VersionedVec
Auto Trait Implementations§
impl Freeze for ServerKey
impl RefUnwindSafe for ServerKey
impl Send for ServerKey
impl Sync for ServerKey
impl Unpin for ServerKey
impl UnwindSafe for ServerKey
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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