Thread overview | |||||
---|---|---|---|---|---|
|
July 29, 2019 Question on Password Encryption, using stdlib or third party lib | ||||
---|---|---|---|---|
| ||||
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 Re: Question on Password Encryption, using stdlib or third party lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to 0xFFFFFFFF | 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 Re: Question on Password Encryption, using stdlib or third party lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to 0xFFFFFFFF | 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
|
Copyright © 1999-2021 by the D Language Foundation