Encoding RSA keys was using secp256r1.
Add tests to ensure previous error is checked in testing.
Add test comments.