From c286b9ebbe035dbcdba624d1224760645048d54e Mon Sep 17 00:00:00 2001 From: Pierre Tholoniat Date: Wed, 5 Aug 2026 12:53:49 -0700 Subject: [PATCH] Avoid computing an expensive zero-knowledge proof that is not verified by anyone in the single-decryptor setting. PiperOrigin-RevId: 959818810 --- willow/protocol/single_decryptor.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/willow/protocol/single_decryptor.rs b/willow/protocol/single_decryptor.rs index 848ac39..74ba6b4 100644 --- a/willow/protocol/single_decryptor.rs +++ b/willow/protocol/single_decryptor.rs @@ -49,13 +49,17 @@ where Vahe: VaheBase + VerifiableKeyGen + KeyGenVerify + PartialDec + AheKeygen, { /// Generates the public key directly for single-decryptor mode. + /// + /// This method bypasses the committee setup contribution to avoid computing an expensive + /// zero-knowledge proof that is not verified by anyone in the single-decryptor setting. pub fn create_public_key( &self, decryptor_state: &mut DecryptorState, ) -> Result, StatusError> { - let setup_contribution = self.decryptor.create_setup_contribution(decryptor_state)?; - let public_key_share = setup_contribution.key_contribution.public_key_share; - self.decryptor.vahe().aggregate_public_key_shares(std::iter::once(&public_key_share)) + let (sk_share, pk_share, _) = + self.decryptor.vahe().key_gen(&mut self.decryptor.prng.borrow_mut())?; + decryptor_state.sk_share = Some(sk_share); + self.decryptor.vahe().aggregate_public_key_shares(std::iter::once(&pk_share)) } /// Handles a partial decryption request by decrypting the accumulated partial dec ciphertexts.