java and smart cards?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

java and smart cards?

Andreas Jellinghaus-2
Hi,

I completely forgot out java.
How can java applications use smart card?

I guess they have their own do everything in
java system? Or can they also load pkcs#11
modules?

Does anyone have experience with this?

I think it would be nice to add a page about java
to the documentation, but I have no clue.
Feel free to do so, or send me an email with
what you know and I will try to put things together.

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: java and smart cards?

Jonsy (teleline)
El jue, 22-09-2005 a las 21:48 +0200, Andreas Jellinghaus escribió:
> Hi,
> I completely forgot out java.
> How can java applications use smart card?
> I guess they have their own do everything in
> java system? Or can they also load pkcs#11
> modules?

Very quick and simple response for java-1.5:

The Sun Java Pkcs#11 reference guide
http://java.sun.com/j2se/1.5.0/docs/guide/security/p11guide.html

Just a simple API to act as a frontend for native pkcs11 modules

Cheers
Juan Antonio

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: java and smart cards?

Martin Paljak
In reply to this post by Andreas Jellinghaus-2
On 9/22/05, Andreas Jellinghaus <[hidden email]> wrote:
> Hi,
>
> I completely forgot out java.
> How can java applications use smart card?
>
> I guess they have their own do everything in
> java system? Or can they also load pkcs#11
> modules?
http://jce.iaik.tugraz.at/products/14_PKCS11_Wrapper/index.php

java 1.5 includes a sun pkcs#11 provider something i don't know that
much about...


--
Martin Paljak
[hidden email]
http://martin.paljak.pri.ee/
+372.5156495 - phone
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: java and smart cards?

David Corcoran
You can also use JPC/SC.  It is a Java class wrapper for PC/SC [Lite]

http://www.musclecard.com/middleware/files/jpcsc-0.8.0-src.zip

Dave

------------------------------------------------------------------------
------------
David Corcoran        [hidden email]
   Identity Alliance        http://www.identityalliance.com
   phone: 260-488-3099   fax: 260-488-2455

   Smart Cards, Biometrics, Training, Identity Management
------------------------------------------------------------------------
-------------



On Sep 22, 2005, at 2:49 PM, Martin Paljak wrote:

> On 9/22/05, Andreas Jellinghaus <[hidden email]> wrote:
>
>> Hi,
>>
>> I completely forgot out java.
>> How can java applications use smart card?
>>
>> I guess they have their own do everything in
>> java system? Or can they also load pkcs#11
>> modules?
>>
> http://jce.iaik.tugraz.at/products/14_PKCS11_Wrapper/index.php
>
> java 1.5 includes a sun pkcs#11 provider something i don't know that
> much about...
>
>
> --
> Martin Paljak
> [hidden email]
> http://martin.paljak.pri.ee/
> +372.5156495 - phone
> _______________________________________________
> opensc-devel mailing list
> [hidden email]
> http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
>
>






_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: java and smart cards?

Ville Skyttä-2
In reply to this post by Andreas Jellinghaus-2
On Thu, 2005-09-22 at 21:48 +0200, Andreas Jellinghaus wrote:

> I think it would be nice to add a page about java
> to the documentation, but I have no clue.
> Feel free to do so, or send me an email with
> what you know and I will try to put things together.

http://java.sun.com/j2se/1.5.0/docs/guide/security/p11guide.html

I did some _very_ limited testing (not much more than read certs on a
card) some time ago with the Sun PKCS #11 provider and the OpenSC PKCS
#11 module, success.  Haven't tried anything more advanced.

The configuration was IIRC just a matter of configuring the Sun PKCS #11
provider in java.security and adding the name and library for the OpenSC
module to a properties file referred to in the java.security config, and
it worked.  See section 2.2 in the above guide.

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: java and smart cards?

Lauri Laanmets
In reply to this post by Martin Paljak
Hi,

I have used Java PKCS#11 wrapper a little bit and it works fine yeah. Is it just my imagination or did I heard from somewhere that Sun took over much IAIK code and put it into JRE 1.5 - anyway they look quite similar.

Some examples to load opensc for example:

sun.security.pkcs11.wrapper.PKCS11 pk = sun.security.pkcs11.wrapper.PKCS11.getInstance("opensc-pkcs11", null, false);

I have also a small example program that was ment to be IDUtil for Java. IDUtil is Estonian ID card util for catching cad insert and remove and to read personal data from it. I have never made signing jet...

Source code and example .jar is available at:

http://www.pacta.ee/jIDUtil.zip

It should look like this in action:



Regards,
Lauri

Martin Paljak wrote:
On 9/22/05, Andreas Jellinghaus [hidden email] wrote:
  
Hi,

I completely forgot out java.
How can java applications use smart card?

I guess they have their own do everything in
java system? Or can they also load pkcs#11
modules?
    
http://jce.iaik.tugraz.at/products/14_PKCS11_Wrapper/index.php

java 1.5 includes a sun pkcs#11 provider something i don't know that
much about...


--
Martin Paljak
[hidden email]
http://martin.paljak.pri.ee/
+372.5156495 - phone
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
  


_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: java and smart cards?

Ludovic Rousseau
In reply to this post by Andreas Jellinghaus-2
On 22/09/05, Andreas Jellinghaus <[hidden email]> wrote:
> Hi,
>
> I completely forgot out java.
> How can java applications use smart card?

You can use Open Card Framework (OCF [1]) which is a (more or less)
equivalent of PC/SC.

The Java community is also working on JSR 268: Java Smart Card I/O API
[2] to replace OCF.

> I guess they have their own do everything in
> java system? Or can they also load pkcs#11
> modules?

No idea about PKCS#11.

Maybe have a look at JSR 177: Security and Trust Services API for J2ME
[3]. I don't know any equivalent for J2SE.

Bye,

[1] http://www.opencard.org/
[2] http://www.jcp.org/en/jsr/detail?id=268
[3] http://www.jcp.org/en/jsr/detail?id=177

--
 Dr. Ludovic Rousseau
 For private mail use [hidden email] and not "big brother" Google
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel