EC key pairs are completely incompatible with RSA.
There is only one type of EC key for these specific curves (although there are different representations of the same point when encoded). The ones for ECDH (key agreement) / ECIES and ECDSA are exactly the same as well.
So if an EC key is generated for "RSA"
key pair generator you can be pretty sure that it is identical spec-wise to the one generated for the "EC"
one. Simply test by performing EC signature generation / verification or - slightly more complex - key agreement.
You can possibly test by creating your own deterministic SecureRandom
implementation and require the EC implementation to use that. This is also because the EC key pair generation doesn't have as many choices as the RSA key pair generator, so the algorithm implementations are likely to be the same. So if you start with the same values then it is likely that it produces identical key pairs. Then you could compare public key values or use one public key to verify a signature from the other private key.
It may be that the the underlying implementation ignores the SecureRandom
as given though, if the Android key store cannot handle it.
I don't have these Android versions here though.
Note that the given method of generating an EC key can be thought of to be a hack. And since Android 5 / API 22 is from 5 years back, you can ask yourself if you want to still support those versions.
Alternatively you can generate the EC key pairs completely in software using Bouncy Castle, but the Android key store is then not involved to keep your keys secure.