title: How to get a RSA PublicKey by giving a PrivateKey?
body: <p>I am looking for a Java function that will get an RSA PrivateKey and will return the correct RSA PublicKey?</p>
  
  <p>Alternatively, is there a function that will tell us if the RSA PrivateKey/PublicKey is valid?</p>