Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle mul_assign scalar zero #1077

Merged
merged 3 commits into from
Jul 10, 2024
Merged

fix: handle mul_assign scalar zero #1077

merged 3 commits into from
Jul 10, 2024

Conversation

mattstam
Copy link
Contributor

@mattstam mattstam commented Jul 10, 2024

fixes #1024

@mattstam mattstam marked this pull request as ready for review July 10, 2024 02:03
@@ -53,12 +53,17 @@ impl<C: CurveOperations<NUM_WORDS> + Copy, const NUM_WORDS: usize> AffinePoint<C
C::double(&mut self.limbs);
}

pub fn mul_assign(&mut self, scalar: &[u32]) {
pub fn mul_assign(&mut self, scalar: &[u32]) -> Option<()> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to return a reuslt here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@mattstam mattstam changed the title fix: return None if mul_assign scalar is zero fix: handle mul_assign scalar zero Jul 10, 2024
@mattstam mattstam merged commit 36b565e into dev Jul 10, 2024
5 checks passed
@mattstam mattstam deleted the mattstam/mul-zero branch July 10, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants