-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: switch from num-bigint-dig to crypto-bigint #394
base: master
Are you sure you want to change the base?
Conversation
@dignifiedquire |
no, haven't had time to fix the afformentioned issues yet |
@dignifiedquire |
@tarcieri current benchmarks
|
@dignifiedquire created #462 for fixing these issues. Take a look. Feel free to change anything. |
The `n` in both cases is 257 bytes, with first element being 0 Re-encoded the number into 256 bytes and now the decoding works. Note that ff you want to keep the previous Base64 `n`, then the BoxedUint must take 2056 as the `bits_precision` parameter
CI is finally green again, time for lots of review and cleanup |
@zeerooth |
let mut pi = prime_limit / (prime_limit.ln() - 1f64); | ||
#[cfg(not(feature = "std"))] | ||
let mut pi = prime_limit / (libm::logf(prime_limit as f32) as f64 - 1f64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not entirely correct or optimal, but I am not sure what other way there is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fjarri is there anything in crypto-primes
for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, nothing like that currently
@dignifiedquire seems like you can remove "Very, very WIP" now |
🤣 yeah, finally |
Very, very WIPNot anymore, this is ready for review.
Replaces all usage of
num-bigint-dig
basedBigInt
usage with the newcrypto-bigint
crate, usingBoxedUint
Current known issue is that we do have a performance regression, which will be able to get rid of over time:
TODOs
RsaPrivateKey
RsaPublicKey
decrypt
implementationBigUint
to return owned versions