importing RSA key to card

Is there any obscure (or other) way to generate a RSA keypair on the card from importing the two primes p, q and the public exponent e?

The mechanism for calculating the rest of the values needed for RSAPrivateKey, RSAPrivateCrtKey and RSAPublicKey should already be on the card since it would have to be used when generating the keys on the card. However the java card API doesn't seem to support it.

One solution would be to compute all parameters needed for the key pair off card. The problem is that Im trying to implement an existing specification on java card and thus can't easily change the specification nor existing implementations to work with another mode for importing keys to the card.

[720 byte] By [plugha] at [2007-11-27 11:30:28]
# 1

You're right, the mechanism is implemented on-card, but one level below you cannot reach. It is transparent and follows the JC specification. Why can't you just use the KeyBuilder factory?

lexdabeara at 2007-7-29 16:34:08 > top of Java-index,Java Mobility Forums,Consumer and Commerce...