pub struct ThresholdDecryptionRequest {
pub ritual_id: u32,
pub ciphertext: Ciphertext,
pub conditions: Option<Conditions>,
pub context: Option<Context>,
pub variant: FerveoVariant,
}Expand description
A request for an Ursula to derive a decryption share.
Fields§
§ritual_id: u32The ID of the ritual.
ciphertext: CiphertextThe ciphertext to generate a decryption share for.
conditions: Option<Conditions>A blob of bytes containing decryption conditions for this message.
context: Option<Context>A blob of bytes containing context required to evaluate conditions.
variant: FerveoVariantThe ferveo variant to use for the decryption share derivation.
Implementations§
source§impl ThresholdDecryptionRequest
impl ThresholdDecryptionRequest
sourcepub fn new(
ritual_id: u32,
ciphertext: &Ciphertext,
conditions: Option<&Conditions>,
context: Option<&Context>,
variant: FerveoVariant
) -> Self
pub fn new( ritual_id: u32, ciphertext: &Ciphertext, conditions: Option<&Conditions>, context: Option<&Context>, variant: FerveoVariant ) -> Self
Creates a new decryption request.
sourcepub fn encrypt(
&self,
shared_secret: &SessionSharedSecret,
requester_public_key: &SessionStaticKey
) -> EncryptedThresholdDecryptionRequest
pub fn encrypt( &self, shared_secret: &SessionSharedSecret, requester_public_key: &SessionStaticKey ) -> EncryptedThresholdDecryptionRequest
Encrypts the decryption request.
Trait Implementations§
source§impl Clone for ThresholdDecryptionRequest
impl Clone for ThresholdDecryptionRequest
source§fn clone(&self) -> ThresholdDecryptionRequest
fn clone(&self) -> ThresholdDecryptionRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ThresholdDecryptionRequest
impl Debug for ThresholdDecryptionRequest
source§impl<'de> Deserialize<'de> for ThresholdDecryptionRequest
impl<'de> Deserialize<'de> for ThresholdDecryptionRequest
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 PartialEq<ThresholdDecryptionRequest> for ThresholdDecryptionRequest
impl PartialEq<ThresholdDecryptionRequest> for ThresholdDecryptionRequest
source§fn eq(&self, other: &ThresholdDecryptionRequest) -> bool
fn eq(&self, other: &ThresholdDecryptionRequest) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> ProtocolObject<'a> for ThresholdDecryptionRequest
impl<'a> ProtocolObject<'a> for ThresholdDecryptionRequest
impl Eq for ThresholdDecryptionRequest
impl StructuralEq for ThresholdDecryptionRequest
impl StructuralPartialEq for ThresholdDecryptionRequest
Auto Trait Implementations§
impl RefUnwindSafe for ThresholdDecryptionRequest
impl Send for ThresholdDecryptionRequest
impl Sync for ThresholdDecryptionRequest
impl Unpin for ThresholdDecryptionRequest
impl UnwindSafe for ThresholdDecryptionRequest
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more