Thread overview
Question on Password Encryption, using stdlib or third party lib
Jul 29, 2019
0xFFFFFFFF
Jul 29, 2019
Cym13
Jul 29, 2019
0xFFFFFFFF
July 29, 2019
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
July 29, 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.
July 29, 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

It is exponent not entropy