Thread overview
[Issue 13804] BigInt have no binary interface to be used in crypto
Dec 02, 2014
Don
Aug 07, 2016
tkook11@gmail.com
Mar 27, 2018
Jonathan Wilbur
Mar 27, 2018
Jonathan Wilbur
Apr 09, 2018
Jonathan Wilbur
Aug 24, 2019
Nathan S.
Jun 01, 2020
Nathan S.
Dec 17, 2022
Iain Buclaw
December 01, 2014
https://issues.dlang.org/show_bug.cgi?id=13804

bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc

--- Comment #1 from bearophile_hugs@eml.cc ---
(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.

--
December 02, 2014
https://issues.dlang.org/show_bug.cgi?id=13804

--- Comment #2 from Don <clugdbug@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.

--
August 07, 2016
https://issues.dlang.org/show_bug.cgi?id=13804

tkook11@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkook11@gmail.com

--- Comment #3 from tkook11@gmail.com ---
+1 because I need to serialize bigints over networks.

--
March 27, 2018
https://issues.dlang.org/show_bug.cgi?id=13804

Jonathan Wilbur <jonathan@wilbur.space> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://github.com/dlang/ph
                   |                            |obos/blob/master/std/bigint
                   |                            |.d
                 CC|                            |jonathan@wilbur.space
           Assignee|nobody@puremagic.com        |jonathan@wilbur.space

--
March 27, 2018
https://issues.dlang.org/show_bug.cgi?id=13804

--- Comment #4 from Jonathan Wilbur <jonathan@wilbur.space> ---
I am currently implementing a bytes() accessor for std.bigint. I will try to submit the pull request soon. Once done with that, I will create a bytes mutator for std.bigint. I just need to test on a big-endian system now, then I should be about ready to push it. I will close this issue when done, or if the idea is completely rejected.

Per the comments below, I will create a separate issue for implementing powMod. No promises, but I will *probably* implement that one, too.

--
April 09, 2018
https://issues.dlang.org/show_bug.cgi?id=13804

--- Comment #5 from Jonathan Wilbur <jonathan@wilbur.space> ---
Pull request #6437 submitted. Since it's the first commit, odds are, it will get rejected.

https://github.com/dlang/phobos/pull/6437

--
August 24, 2019
https://issues.dlang.org/show_bug.cgi?id=13804

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |n8sh.secondary@hotmail.com

--- Comment #6 from Nathan S. <n8sh.secondary@hotmail.com> ---
powmod (capitalized like that instead of "powMod" for consistency with std.math) was added in https://github.com/dlang/phobos/pull/7035 but the other things described still are not.

--
June 01, 2020
https://issues.dlang.org/show_bug.cgi?id=13804

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=20889

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=13804

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--