www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13804] New: BigInt have no binary interface to be used in


          Issue ID: 13804
           Summary: BigInt have no binary interface to be used in crypto
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: golovanov_alexey mail.ru

We have no properties and methods in BigInt to work with binary data to use
BigInt in crypto (for example in RSA).

BigInt have no constructor from binary data - ubyte[], uint[], etc.

To use BigInt in crypto, we need ability:
1 - create BigInt from bytes;
2 - make calculations;
3 - get bytes from result BigInt.

In step (2) we need access to underlying data BigDigit[] to implement absent
powMod method "(a pow b) mod c").

Programmers cant't use std.bigint and forced to reimplement biguintcore.d and
bigint.d .

For example https://github.com/apartridge/crypto/tree/master/crypto/asymmetric

Dec 01 2014