Skip to content

Commit

Permalink
Add warning about c check
Browse files Browse the repository at this point in the history
  • Loading branch information
skaunov committed Oct 23, 2023
1 parent 15f5de2 commit c32efef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rust-k256/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ pub struct PlumeSignatureV1Fields<'a> {
pub hashed_to_curve_r: &'a ProjectivePoint,
}
impl PlumeSignature<'_> {
/// WARNING: panics when `self.c` isn't an `Output::<Sha256>`.
/// So catch it if it's a possible case for you.
// Verifier check in SNARK:
// g^[r + sk * c] / (g^sk)^c = g^r
// hash[m, gsk]^[r + sk * c] / (hash[m, pk]^sk)^c = hash[m, pk]^r
Expand Down

0 comments on commit c32efef

Please sign in to comment.