## digitalmars.D.learn - Question on Password Encryption, using stdlib or third party lib

- 0xFFFFFFFF (11/11) Jul 29 2019 On a project I was asked to
- Cym13 (11/22) Jul 29 2019 I hope it's for a school project since I wouldn't recommend doing
- 0xFFFFFFFF (2/13) Jul 29 2019 It is exponent not entropy

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

Jul 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 ? ThanksI 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.

Jul 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 ? ThanksIt is exponent not entropy

Jul 29 2019