Add sanity checks when generating new RSA keys.