@@ -14,7 +14,7 @@ use crate::nodes::{Nodes, PartyId};
1414use crate :: polynomial:: { Eval , Poly } ;
1515use crate :: random_oracle:: RandomOracle ;
1616use crate :: threshold_schnorr:: bcs:: BCSSerialized ;
17- use crate :: threshold_schnorr:: complaint:: { ComplaintResponse , RecoveryProof } ;
17+ use crate :: threshold_schnorr:: complaint:: RecoveryProof ;
1818use crate :: threshold_schnorr:: Extensions :: Encryption ;
1919use crate :: threshold_schnorr:: { random_oracle_from_sid, EG , G , S } ;
2020use crate :: types;
@@ -71,6 +71,14 @@ pub struct Complaint {
7171 pub proof : RecoveryProof ,
7272}
7373
74+ /// A response to a [Complaint], containing the responder's shares so the accuser can
75+ /// Lagrange-interpolate their own.
76+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
77+ pub struct ComplaintResponse {
78+ pub responder_id : PartyId ,
79+ pub shares : SharesForNode ,
80+ }
81+
7482/// The output of a receiver after a single instance of AVSS: The shares for each nonce + commitments for the next round.
7583#[ derive( Debug , Clone , Serialize , Deserialize ) ]
7684pub struct PartialOutput {
@@ -311,7 +319,7 @@ impl Receiver {
311319 message : & Message ,
312320 complaint : & Complaint ,
313321 my_output : & PartialOutput ,
314- ) -> FastCryptoResult < ComplaintResponse < SharesForNode > > {
322+ ) -> FastCryptoResult < ComplaintResponse > {
315323 complaint. proof . check (
316324 complaint. accuser_id ,
317325 & self . nodes . node_id_to_node ( complaint. accuser_id ) ?. pk ,
@@ -333,7 +341,7 @@ impl Receiver {
333341 pub fn recover (
334342 & self ,
335343 message : & Message ,
336- responses : Vec < ComplaintResponse < SharesForNode > > ,
344+ responses : Vec < ComplaintResponse > ,
337345 ) -> FastCryptoResult < PartialOutput > {
338346 // Sanity check that we have enough responses (by weight) to recover the shares.
339347 let total_response_weight = self
0 commit comments