Question on Password Encryption, using stdlib or third party lib
Cym13
cpicard at purrfect.fr
Mon Jul 29 14:48:55 UTC 2019
On Monday, 29 July 2019 at 14:37:54 UTC, 0xFFFFFFFF wrote:
> On a project I was asked to
>
> a- Compute SHA-256 of a password
> b- Do a BigInteger, convert to Hex String
> c- Encrypt the key using a public key with the following
> parameters
> Entropy: I'm given some numbers
> Modulus: also given long numbers
>
> [encrypt using RSA algorithm]
>
> So far I'm familiar with a and b in Dlang.
>
> how do I go about c) In Dlang ?
>
> Thanks
I hope it's for a school project since I wouldn't recommend doing
that in production.
However you can do c) either by implementing RSA (it's rather
easy to badly implement RSA which could be enough at school
level) or by using a library (I recommend the library).
There are several cryptographic libraries on
https://code.dlang.org that implement RSA, botan and crypto for
example. I'd trust botan more at the moment though I don't think
any D library has received a proper cryptographic audit at the
moment.
More information about the Digitalmars-d-learn
mailing list