Skip to content

Commit

Permalink
Made mul_bits_be take a ref to self
Browse files Browse the repository at this point in the history
  • Loading branch information
rozbb committed Aug 28, 2023
1 parent c9e2b08 commit 82c5fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion curve25519-dalek/src/montgomery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl MontgomeryPoint {
/// Curve25519 uses _clamped multiplication_, explained
/// [here](https://neilmadden.blog/2020/05/28/whats-the-curve25519-clamping-all-about/).
/// When in doubt, use [`Self::mul_clamped`].
pub fn mul_bits_be(self, bits: impl Iterator<Item = bool>) -> MontgomeryPoint {
pub fn mul_bits_be(&self, bits: impl Iterator<Item = bool>) -> MontgomeryPoint {
// Algorithm 8 of Costello-Smith 2017
let affine_u = FieldElement::from_bytes(&self.0);
let mut x0 = ProjectivePoint::identity();
Expand Down

0 comments on commit 82c5fa3

Please sign in to comment.