Skip to content

Commit

Permalink
Relax semi-honest reveal bounds
Browse files Browse the repository at this point in the history
It shouldn't require fields, semi-honest reveal works with shared values just fine.
  • Loading branch information
akoshelev committed Oct 7, 2023
1 parent bb1d517 commit 7a4c052
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/protocol/basics/reveal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
malicious::{AdditiveShare as MaliciousReplicated, ExtendableField},
semi_honest::AdditiveShare as Replicated,
},
SecretSharing,
SecretSharing, SharedValue,
},
};

Expand Down Expand Up @@ -47,10 +47,10 @@ pub trait Reveal<C: Context, B: RecordBinding>: Sized {
/// i.e. their own shares and received share.
#[async_trait]
#[embed_doc_image("reveal", "images/reveal.png")]
impl<C: Context, F: Field> Reveal<C, RecordId> for Replicated<F> {
type Output = F;
impl<C: Context, V: SharedValue> Reveal<C, RecordId> for Replicated<V> {
type Output = V;

async fn reveal<'fut>(&self, ctx: C, record_id: RecordId) -> Result<F, Error>
async fn reveal<'fut>(&self, ctx: C, record_id: RecordId) -> Result<V, Error>
where
C: 'fut,
{
Expand Down

0 comments on commit 7a4c052

Please sign in to comment.