-
Notifications
You must be signed in to change notification settings - Fork 0
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 exponentiation #38
Comments
Generating random strings of bits is currently supported under "rand_support", but I don't have a function for random modulo an arbitrary number. I have not implemented modular exponentiation or inverse before. I'm pretty busy right now but might find the time this weekend to implement it, how interested are you in seeing it implemented? Is this for constrained systems, or for high performance, or what purposes do you need it for? I see a possible way to make
|
Don't feel pressured to implement this because of me, if I really needed it I'd make a patch myself. (-: My own use case is high performance multi-party protocols, not constrained systems. You can do exponentiation by squaring without additional memory with something like For modular inverse I don't know of any algorithms without allocations, for a simple extended euclid you would need to destroy both arguments and have two additional numbers allocated. |
Does it not exist in these crates or could I not find it? If it doesn't exist, it would be really nice to have.
Same for modular inverse, and for generating random numbers (and random numbers modulo some other number), and generating primes.
Thanks!
The text was updated successfully, but these errors were encountered: