[Issue 13804] BigInt have no binary interface to be used in crypto

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Dec 2 01:54:04 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13804

--- Comment #2 from Don <clugdbug at yahoo.com.au> ---
(In reply to bearophile_hugs from comment #1)
> (In reply to Alexey G from comment #0)
> 
> > In step (2) we need access to underlying data BigDigit[] to implement absent
> > powMod method "(a pow b) mod c").
> 
> Beside the binary interface, having a powMod in std.bigint is very useful
> for all kind of usages.

Agreed. The intention was always to have powMod in std.bigint. I believe there
are even some comments in the code. Some quite amazing optimizations are
possible,
you can easily eliminate most of the multiplications.

--


More information about the Digitalmars-d-bugs mailing list