Skip to content

Commit 47707eb

Browse files
carloskikiCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent db0553c commit 47707eb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/pairing.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ impl MillerLoopResult {
167167
Gt(Fp12(out))
168168
}
169169

170+
/// Efficiently compare two `MillerLoopResult`s for equality.
171+
///
172+
/// This method checks if two Miller loop results are equivalent in the
173+
/// context of the pairing function, without performing the full final
174+
/// exponentiation on both operands. It is faster than calling
175+
/// [`final_exponentiation()`] on both and then comparing the results.
176+
/// This is useful when you only need to check equivalence, not obtain
177+
/// the final pairing value.
170178
pub fn final_verify(&self, other: &MillerLoopResult) -> bool {
171179
unsafe { blst::blst_fp12_finalverify(&self.0.0, &other.0.0) }
172180
}

0 commit comments

Comments
 (0)