Generate 1024 or 2048 bits key

I will continue clean up of the code in my next commits. I just want to
add a small and easy feature. :)