-
Notifications
You must be signed in to change notification settings - Fork 38
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
modular arithmetic #11
Comments
I'm not against them. Both look like like good candidates to implement in the low-level part of the library, especially if I decide to implement modular arbitrary-precision integers as a separate type. The low-level part is mostly all unsafe code and raw pointers, but it shouldn't be too difficult to work with. |
Currently I have transformed my num::bigint mod_pow extension to use ramp. It can be found here: But I don't know really how to do this in the low level part, maybe you can give me some hints like possible function signatures or something like that. By the way, the implementation using ramps Int is much much faster than the same implementation using nums BigInt, so thanks for this great and fast library. |
a low-level extended gcd function like |
This one already exists, or did I miss something? |
That's a GCD implementation. The extended GCD |
Oh sorry, I missed the |
I'm working on a Rust implementation of Paillier cryptosystem (https://github.com/kunerd/rpaillier). After I started I realised a lag of fundamental big number arithmetic functions like
mod_pow
andmod_inverse
. At the moment there is also no way to generate probably primes. So I started to implement them by myself.Now I want to ask, if there is an interest to add these algorithms to this project?
current state of my implementation:
mod_pow
: Implementation of LR-k-ary algorithm as described in the "Handbook of Applied Cryptography, 14.82".mod_inverse
: Implementation of "Extended Euclidean Algorithm" as described by KnuthThe text was updated successfully, but these errors were encountered: