Skip to content

Commit

Permalink
chore: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Jun 18, 2024
1 parent 3063f83 commit 874c22c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion banderwagon/src/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ mod tests {

// Do the banderwagon subgroup checks
{
assert!(g0.is_on_curve());
assert!(g1.is_on_curve());

// assert!(g0.is_in_correct_subgroup_assuming_on_curve());
// assert!(g1.is_in_correct_subgroup_assuming_on_curve());

let g0 = Element(g0.into());
let g1 = Element(g1.into());
if !g0.subgroup_check() {
Expand Down Expand Up @@ -286,6 +292,8 @@ mod tests {

// test 1
let lhs = {
let g0 = g0 * Fr::from(4u64);
let g1 = g1 * Fr::from(4u64);
let mut t0 = g0 * s0;
let t1 = g1 * s1;

Expand All @@ -296,14 +304,16 @@ mod tests {

// test 2
let rhs = {
let g0 = g0 * Fr::from(4u64);
let g1 = g1 * Fr::from(4u64);
let v0 = a * s0;
let v1 = a * s1;
let mut t0 = g0 * v0;
let t1 = g1 * v1;
t0 += t1;
t0
};
assert_eq!(lhs, rhs)
assert_eq!(lhs, rhs);
}

#[test]
Expand Down

0 comments on commit 874c22c

Please sign in to comment.