Key generation works for 1024, 2048 and 3072 bit keys