-
Notifications
You must be signed in to change notification settings - Fork 14
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
Create IBig from arrays/mod_pow? #6
Comments
According to #1, modular exponentiation is already implemented. |
I found the modular exponentiation here. It does however not support negative exponents. See the code above if you need that. |
@username223 This let's you create a |
To summarize: Conversion from bytes already exists as Modular exponentiation already exists as Integers bigger than 8 bytes (on 64-bit systems) currently allocate on the heap. This may change in the future, with something like 24 or 32 bytes not requiring an allocation (since this can be done without increasing |
Hello,
Thanks for the excellent library and bigint comparison. I'm unsure if this functionality is present since the docs do not mention it, but is it possible to create an IBig from an array/slice? It only seems to be possible to create them from strings, and since I already have my values as arrays on the stack it doesn't make much sense to allocate and convert to a string only to parse it and convert back.
I'm writing a small library with very well defined integer limits of at most 32 bytes, so if possible I would like to avoid allocations at all and just do operations on stack arrays.
I also can't find a mod_pow equivalent, is that included?
Thanks :)
The text was updated successfully, but these errors were encountered: