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

BoxedUint support #40

Merged
merged 5 commits into from
Dec 29, 2023
Merged

BoxedUint support #40

merged 5 commits into from
Dec 29, 2023

Conversation

fjarri
Copy link
Member

@fjarri fjarri commented Dec 29, 2023

This may supersede #39. It uses *_like constructors (see RustCrypto/crypto-bigint#533) instead of automatic widening, which I think is a safer approach.

The 1024 bit safe prime generation is about 30% slower for BoxedUint compared to Uint. Not too bad for a start, but clearly there is room for improvement.

@xuganyu96 sorry, tried to base it on your PR, but I guess I changed the first commit too much, and it's not assigned to you anymore.

Copy link

codecov bot commented Dec 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (752bdee) 99.20% compared to head (2b44a1f) 99.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
+ Coverage   99.20%   99.23%   +0.02%     
==========================================
  Files           9        9              
  Lines        1386     1433      +47     
==========================================
+ Hits         1375     1422      +47     
  Misses         11       11              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fjarri
Copy link
Member Author

fjarri commented Dec 29, 2023

@tarcieri I think this concludes the initial support stage for BoxedUint. If you release another pre version of crypto-bigint, I'll publish a pre version of this crate so that you could try it out in rsa.

@fjarri fjarri marked this pull request as ready for review December 29, 2023 19:21
@tarcieri
Copy link

@fjarri fjarri merged commit 875622c into entropyxyz:master Dec 29, 2023
12 checks passed
@fjarri fjarri deleted the boxed-support branch December 29, 2023 20:18
@fjarri
Copy link
Member Author

fjarri commented Dec 29, 2023

Published v0.6.0-pre.0.

Before 0.6.0 proper I may tweak the public API a little with respect to how bits_precision is passed.

Also filed #41 to investigate the BoxedUint performance.

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.

3 participants