> I'm trying to use the public key from my GPK-8000 with the JCE. I can read
> the key from the card, but it can't be used to initialize f.ex. RSA
> signatures in the JCE.
>
> Is my feeling correct that in order for an instance of a class
> implementing
> a sub-interface of PublicKey to be really useful for anything it
> needs to be
> associated with an entire crypto provider. I.e. there is no easy way to
> "insert" a key into an existing crypto provider like Sun's provider? I can
> get the exponent and modulus; shouldn't I at least be able to
> instantiate a
> class from the JCE with this?

the standard way in JCE to do this is:

      RSAPublicKeySpec   publicKeySpec = new RSAPublicKeySpec(modulus,
publicExponent);
      KeyFactory         keyFactory = KeyFactory.getInstance("RSA", "IAIK");
      RSAPublicKey       rsaPublicKey = (RSAPublicKey)
keyFactory.generatePublic(publicKeySpec);

this should work with any provider that implements RSA correctly. but i am
sure that it works with the JCE from IAIK (http://jcewww.iaik.at) ;).

regards

  Karl Scheibelhofer

--

Karl Scheibelhofer, <mailto:[EMAIL PROTECTED]>
Institute for Applied Information Processing and Communications (IAIK)
at Technical University of Graz, Austria, http://www.iaik.at
Phone: (+43) (316) 873-5540



---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to