tags:

views:

67

answers:

1

I'm trying to learn about how does Java access smart cards, due to a project analysis. I wonder if there is any kind of virtual smart card which I could use to make some tests with Java?

By the way, I've read about Java Card, and looks like it is used to run Java in cards, not to smart card data access using Java, right?

+1  A: 

Look at this tutorial + example. And related. (I have used these examples and they work fine).

An important point is that you can't get anything out of the smart card. You can only send things to its processor. So whenever you get a PrivateKey object, you don't actually have the private key - this is only a proxy to the SmartCard processor, and calling methods on it, calls the processor.

I'm not aware of virtual smart cards, though.

An API of interest is javax.smartcardio

Bozho
I "can't get anything out of the smart card" doesn't mean I can't get its public key, I hope
Tom Brito
Ok, I found further about: http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Core/smartcardio/javax.smartcardio.htm
Tom Brito
you can get the public key, yes
Bozho