Kind greetings I would start by looking up information on the Java Cryptography Extension API and the Java Cryptography Architecture. Of interest may be java.security.KeyStore with methods getKey() and getCertificate().
Thanks for your response, but I'm working with J2ME and Bouncy Castle cripto libs, and I'm afraid that the KeyStore class is not available.
I'll reformulate my question: How can I read and use a .cer file (in X509 format) in a mobile application, so that I could extract its public key in order to extract its module and exponent, and generate a private key to sign some data?
Any help would be appreciated, cause I'm really stuck with this thing.
Raul I have just started to learn j2me. I have worked with Bouncy Castle as a provider in j2se. Using BC in j2se is a configuration change in the jvm, but the API remains the same. Is this not the case for j2me?
Additionally, did I understand correctly that you want to derive a private key from a public key?