konstantinullrich / crypton

A simple Dart library for asymmetric encryption and digital signatures
https://pub.dev/packages/crypton
MIT License
33 stars 12 forks source link

Adjustable Key size #7

Closed melewetwo closed 4 years ago

melewetwo commented 4 years ago

Make the key size adjustable. It should be possible to create a keypair using

RSAKeypair.fromRandom()

with adjustable key size.

maybe using an optional named param that defaults to 2048?

RSAKeypair.fromRandom({int keySize=2048})

konstantinullrich commented 4 years ago

Good Idea

Will be done :)

melewetwo commented 4 years ago

maybe even default to 4096 bits: It is recommend to use at least 3072 bits if security is required beyond 2030: https://en.wikipedia.org/wiki/Key_size#:~:text=NIST%20recommends%202048%2Dbit%20keys,to%20256%2Dbit%20symmetric%20keys.

konstantinullrich commented 4 years ago

Then we'll default to 3072 :)

melewetwo commented 4 years ago

just created a pull request, but didn't read your message before - i used 4096 as default. I can change it if you want to.

konstantinullrich commented 4 years ago

No worries I'll merge if the tests pass

konstantinullrich commented 4 years ago

I reviewed your PR