Skip to content

Commit

Permalink
chore: add banderwagon subgroup check
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Jun 18, 2024
1 parent cecc187 commit cf45280
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions banderwagon/src/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ mod tests {
hex_to_fq("38045b6a248d6f9bbb789cf86504ec70d2dde0b5467e13d795c55129d4cdf1d4"),
);

// Do the banderwagon subgroup checks
{
let g0 = Element(g0.into());
let g1 = Element(g1.into());
if !g0.subgroup_check() {
panic!("g0 element not in the right subgroup");
}
if !g1.subgroup_check() {
panic!("g1 element not in the right subgroup");
}
}

let a = hex_to_fr("0cfe04d11eada0fb11085a64613291830a60c6b7f4f1341e9b59f9867bd1bad5");

// def test1():
Expand Down

0 comments on commit cf45280

Please sign in to comment.