RSA: fix `generateKey`, add key components test