Skip to content

Commit

Permalink
test(crypto): CRP-1473 add local vault tests for idkg_load_transcript
Browse files Browse the repository at this point in the history
  • Loading branch information
altkdf committed Feb 5, 2024
1 parent 2211428 commit a414123
Show file tree
Hide file tree
Showing 3 changed files with 458 additions and 11 deletions.
Expand Up @@ -499,9 +499,12 @@ impl CommitmentOpening {
/// * The dealings must have already been verified
///
/// # Errors
/// * `ComplaintShouldBeIssued` if upon decrypting a ciphertext,
/// the embedded secret was invalid with the dealing commitment.
/// In this case a complaint must be issued.
/// * `ComplaintShouldBeIssued` if upon decrypting a ciphertext, the
/// embedded secret was invalid with the dealing commitment. In this case
/// a complaint must be issued.
/// * `InvalidCiphertext`: if a ciphertext cannot be decrypted.
/// * `UnableToCombineOpenings`: internal error denoting that the decrypted
/// share cannot be combined.
pub(crate) fn from_dealings(
verified_dealings: &BTreeMap<NodeIndex, IDkgDealingInternal>,
transcript_commitment: &CombinedCommitment,
Expand Down
Expand Up @@ -158,7 +158,7 @@ impl<R: Rng + CryptoRng, S: SecretKeyStore, C: SecretKeyStore, P: PublicKeyStore
})?;
let internal_transcript = IDkgTranscriptInternal::deserialize(transcript.as_ref())
.map_err(|e| IDkgLoadTranscriptError::SerializationError {
internal_error: e.0,
internal_error: format!("failed to deserialize internal transcript: {:?}", e.0),
})?;
let result = self.idkg_load_transcript_internal(
&internal_dealings,
Expand Down

0 comments on commit a414123

Please sign in to comment.