pub struct DistributedTranscryptor { /* private fields */ }Expand description
A distributed PEP transcryptor system that extends super::types::Transcryptor with blinding factor support
for generating session key shares in a distributed transcryptor setup.
All methods from super::types::Transcryptor are directly accessible via Deref.
Implementations§
Source§impl DistributedTranscryptor
impl DistributedTranscryptor
Sourcepub fn new(
pseudonymisation_secret: PseudonymizationSecret,
rekeying_secret: EncryptionSecret,
blinding_factor: BlindingFactor,
) -> Self
pub fn new( pseudonymisation_secret: PseudonymizationSecret, rekeying_secret: EncryptionSecret, blinding_factor: BlindingFactor, ) -> Self
Create a new distributed PEP system with the given secrets and blinding factor.
Sourcepub fn system(&self) -> &Transcryptor
pub fn system(&self) -> &Transcryptor
Get a reference to the underlying PEP system.
Generate a pseudonym session key share for the given session.
Generate an attribute session key share for the given session.
Generate both pseudonym and attribute session key shares for the given session. This is a convenience method that returns both shares together.
Methods from Deref<Target = Transcryptor>§
Sourcepub fn attribute_rekey_info(
&self,
session_from: &EncryptionContext,
session_to: &EncryptionContext,
) -> AttributeRekeyInfo
pub fn attribute_rekey_info( &self, session_from: &EncryptionContext, session_to: &EncryptionContext, ) -> AttributeRekeyInfo
Generate an attribute rekey info to rekey attributes from a given EncryptionContext to another.
Sourcepub fn pseudonym_rekey_info(
&self,
session_from: &EncryptionContext,
session_to: &EncryptionContext,
) -> PseudonymRekeyInfo
pub fn pseudonym_rekey_info( &self, session_from: &EncryptionContext, session_to: &EncryptionContext, ) -> PseudonymRekeyInfo
Generate a pseudonym rekey info to rekey pseudonyms from a given EncryptionContext to another.
Sourcepub fn pseudonymization_info(
&self,
domain_from: &PseudonymizationDomain,
domain_to: &PseudonymizationDomain,
session_from: &EncryptionContext,
session_to: &EncryptionContext,
) -> PseudonymizationInfo
pub fn pseudonymization_info( &self, domain_from: &PseudonymizationDomain, domain_to: &PseudonymizationDomain, session_from: &EncryptionContext, session_to: &EncryptionContext, ) -> PseudonymizationInfo
Generate a pseudonymization info to pseudonymize from a given PseudonymizationDomain
and EncryptionContext to another.
Sourcepub fn transcryption_info(
&self,
domain_from: &PseudonymizationDomain,
domain_to: &PseudonymizationDomain,
session_from: &EncryptionContext,
session_to: &EncryptionContext,
) -> TranscryptionInfo
pub fn transcryption_info( &self, domain_from: &PseudonymizationDomain, domain_to: &PseudonymizationDomain, session_from: &EncryptionContext, session_to: &EncryptionContext, ) -> TranscryptionInfo
Generate a transcryption info to transcrypt from a given PseudonymizationDomain
and EncryptionContext to another.
Sourcepub fn rekey<E>(&self, encrypted: &E, rekey_info: &E::RekeyInfo) -> Ewhere
E: Rekeyable,
pub fn rekey<E>(&self, encrypted: &E, rekey_info: &E::RekeyInfo) -> Ewhere
E: Rekeyable,
Rekey encrypted data from one session to another. Automatically works with any rekeyable type (attributes, long attributes, etc.)
Sourcepub fn pseudonymize<E>(
&self,
encrypted: &E,
pseudonymization_info: &PseudonymizationInfo,
) -> Ewhere
E: Pseudonymizable,
pub fn pseudonymize<E>(
&self,
encrypted: &E,
pseudonymization_info: &PseudonymizationInfo,
) -> Ewhere
E: Pseudonymizable,
Pseudonymize encrypted data from one domain/session to another. Automatically works with any pseudonymizable type (pseudonyms, long pseudonyms, etc.)
Sourcepub fn transcrypt<E>(
&self,
encrypted: &E,
transcryption_info: &TranscryptionInfo,
) -> Ewhere
E: Transcryptable,
pub fn transcrypt<E>(
&self,
encrypted: &E,
transcryption_info: &TranscryptionInfo,
) -> Ewhere
E: Transcryptable,
Transcrypt (rekey or pseudonymize) encrypted data from one domain/session to another. Automatically works with any transcryptable type (pseudonyms, attributes, JSON values, records, etc.)
Sourcepub fn rekey_batch<E, R>(
&self,
encrypted: &mut [E],
rekey_info: &E::RekeyInfo,
rng: &mut R,
) -> Result<Box<[E]>, BatchError>
pub fn rekey_batch<E, R>( &self, encrypted: &mut [E], rekey_info: &E::RekeyInfo, rng: &mut R, ) -> Result<Box<[E]>, BatchError>
Rekey a batch of encrypted data from one session to another. Automatically works with any rekeyable type (attributes, long attributes, etc.)
§Errors
Returns an error if the encrypted data do not all have the same structure.
Sourcepub fn pseudonymize_batch<E, R>(
&self,
encrypted: &mut [E],
pseudonymization_info: &PseudonymizationInfo,
rng: &mut R,
) -> Result<Box<[E]>, BatchError>
pub fn pseudonymize_batch<E, R>( &self, encrypted: &mut [E], pseudonymization_info: &PseudonymizationInfo, rng: &mut R, ) -> Result<Box<[E]>, BatchError>
Pseudonymize a batch of encrypted data from one domain/session to another. Automatically works with any pseudonymizable type (pseudonyms, long pseudonyms, etc.)
§Errors
Returns an error if the encrypted data do not all have the same structure.
Sourcepub fn transcrypt_batch<E, R>(
&self,
encrypted: &mut [E],
transcryption_info: &TranscryptionInfo,
rng: &mut R,
) -> Result<Box<[E]>, BatchError>
pub fn transcrypt_batch<E, R>( &self, encrypted: &mut [E], transcryption_info: &TranscryptionInfo, rng: &mut R, ) -> Result<Box<[E]>, BatchError>
Transcrypt a batch of encrypted data from one domain/session to another. Automatically works with any transcryptable type (records, JSON values, long records, etc.)
§Errors
Returns an error if the encrypted data do not all have the same structure.
Trait Implementations§
Source§impl Clone for DistributedTranscryptor
impl Clone for DistributedTranscryptor
Source§fn clone(&self) -> DistributedTranscryptor
fn clone(&self) -> DistributedTranscryptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more