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

NCC audit fixes #26

Merged
merged 7 commits into from
Jun 28, 2023
Merged

NCC audit fixes #26

merged 7 commits into from
Jun 28, 2023

Conversation

fjarri
Copy link
Member

@fjarri fjarri commented Jun 19, 2023

  • Fixed some comment typos
  • Added a max_bit_length == 0 check in Sieve::new() (NCC-E008526-K2E)
  • Replaced wrapping_add() with checked_add() calls to detect possible contract violations early (NCC-E008526-QTR)
  • Removed a check for a == i32::MIN in jacobi_symbol() (abs_diff() handles this case just fine)
  • Using A* by default for the Lucas test

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (c6bbdf3) 98.63% compared to head (e1fdbe6) 98.65%.

❗ Current head e1fdbe6 differs from pull request most recent head 537a097. Consider uploading reports for the commit 537a097 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   98.63%   98.65%   +0.01%     
==========================================
  Files          10       10              
  Lines        1320     1339      +19     
==========================================
+ Hits         1302     1321      +19     
  Misses         18       18              
Impacted Files Coverage Δ
src/hazmat/jacobi.rs 100.00% <100.00%> (ø)
src/hazmat/lucas.rs 98.63% <100.00%> (ø)
src/hazmat/miller_rabin.rs 99.46% <100.00%> (+<0.01%) ⬆️
src/hazmat/sieve.rs 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fjarri fjarri mentioned this pull request Jun 28, 2023
@fjarri fjarri merged commit 22a0c81 into entropyxyz:master Jun 28, 2023
10 checks passed
@fjarri fjarri deleted the ncc-audit branch June 28, 2023 20:40
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.

None yet

1 participant