Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 8:41 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Feb 24, 2014 5:57 pm 
Offline

Joined: Tue May 28, 2013 1:14 pm
Posts: 26
Hi,

I already have complete toolchain with JCKit, ant, Eclipse + eclipse-jcde, gpshell that allows me to build and upload an applet such as OpenPGP to the Yubikey.

I was wondering if you use any tools for simulation/debugging before the applet is put on the card. So far I've seen three tools - jcardsim, CREF and JCWDE. I'm not sure though if any of these can be used not just as simulators, but to debug as well (e.g. set breakpoints, inspect variables).

I've seen several mentions of Eclipse JCOP tools on this forum, but haven't found where to get them (all links I googled seem to be outdated or gone).


Last edited by hiviah on Mon Mar 03, 2014 1:56 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Mon Feb 24, 2014 8:27 pm 
Offline

Joined: Mon Jan 20, 2014 9:22 pm
Posts: 22
hiviah wrote:
Hi,

I already have complete toolchain with JCKit, ant, Eclipse + eclipse-jcde, gpshell that allows me to build and upload an applet such as OpenPGP to the Yubikey.

I was wondering if you use any tools for simulation/debugging before the applet is put on the card. So far I've seen three tools - jcardsim, CREF and JCWDE. I'm not sure though if any of these can be used not just as simulators, but to debug as well (e.g. set breakpoints, inspect variables).

I've seen several mentions of Eclipse JCOP tools on this forum, but haven't found where to get them (all links I googled seem to be outdated or gone).



Shameless plug: I believe the easiest tool for working with applets from command line on any JavaCard (including NEO) is my GlobalPlatform tool:

https://github.com/martinpaljak/GlobalP ... om-openkms

No need for scripts or specifying cryptic hex constants all over the place unless you have to. Simple command line options that should do the trick 99% of the time.

For debugging applets I think jcardsim might have the best chance of becoming something useful. I have my own "mock javacard classes" that allow to run unit tests. You might get "debugger cards" from some vendor with a 500€ SDK as well.

_________________
OpenKMS GlobalPlatform - simple way to manage applications on your NEO
Applet Playground - explore open source JavaCard applications
PGP: 0x307E3452


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2014 2:42 pm 
Offline

Joined: Tue May 28, 2013 1:14 pm
Posts: 26
Thanks for the tip, Martin.

Do you perhaps also know if jsimcard could simulate they Neo button keypress? I've found that the button state should be accessible from applet, but requires JCOP tools - that's why I asked how to get them. Actually I just noticed it was coincidentally you who asked the linked Neo button question.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2014 2:48 pm 
Offline

Joined: Mon Jan 20, 2014 9:22 pm
Posts: 22
hiviah wrote:
Thanks for the tip, Martin.

Do you perhaps also know if jsimcard could simulate they Neo button keypress? I've found that the button state should be accessible from applet, but requires JCOP tools - that's why I asked how to get them. Actually I just noticed it was coincidentally you who asked the linked Neo button question.


You need a NDA with NXP as well I suspect. JCOP tools itself is not the point, it is just a toolkit (but I don't know as I don't have JCOP tools). You could emulate a full-blown 102 key keyboard, but that is not the point either, the final hardware/firmware matters.

_________________
OpenKMS GlobalPlatform - simple way to manage applications on your NEO
Applet Playground - explore open source JavaCard applications
PGP: 0x307E3452


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2014 6:08 pm 
Offline

Joined: Tue May 28, 2013 1:14 pm
Posts: 26
Quote:
You need a NDA with NXP as well I suspect.

Do I understand it right that if I want to use detecting the button state from applet on an actual Yubikey, I need NDA? Does is require some proprietary code from NXP to be used in my applet?

EDIT: seems that way - NDA is required for the button.


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 04, 2014 2:23 am 
Offline

Joined: Mon Jan 20, 2014 9:22 pm
Posts: 22
hiviah wrote:
Thanks for the tip, Martin.

Do you perhaps also know if jsimcard could simulate they Neo button keypress? I've found that the button state should be accessible from applet, but requires JCOP tools - that's why I asked how to get them. Actually I just noticed it was coincidentally you who asked the linked Neo button question.


Not really related, but after looking at the jcardsim code I decided it is not fit for my purposes and made my own emulator:

https://github.com/martinpaljak/vJCRE#i ... avacardvre

It is still a bit raw and doesn't implement many algorithms, but the javacard*.* codebase is complete, from covering all basic API-s up to JC3.0.4. So once I get to releasing a JAR file it can easily be used inside an IDE instead of the api.jar. Right now only RSA is implemented, but that is due to change ASAP.

The main motivator for this is the ability to run on Android, which I'll add later this week.
Talking about the button - I could easily add whatever extensions to the emulator, but I don't know what purposes this would serve. It would only matter if you would actually have a device where the emulated API would *do* something.

Nevertheless, as I want to use some weirdo integration with Android, I'll be experimenting with extending the API in a "meaningful and portable way" so maybe providing something for "external keyboard" as wel.

_________________
OpenKMS GlobalPlatform - simple way to manage applications on your NEO
Applet Playground - explore open source JavaCard applications
PGP: 0x307E3452


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group