Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

AlgTest Instructions & Applet Source Code

Automated testing tool for algorithms supported by particular smart card with JavaCard platform

Moderator: Ellisun

User avatar
JavaCardOS
Posts: 273
Joined: Thu Apr 30, 2015 12:00 pm
Points :2403
Contact:

AlgTest Instructions & Applet Source Code

Post by JavaCardOS » Thu Jul 02, 2015 2:02 am

JavaCard's algorithms support test

What it does:
  1. Provides list of supported algorithms from JavaCard API including supported lengths of keys
  2. Provides information about available RAM and EEPROM memory and garbage collection capabilities
  3. Provides basic speed tests for selected operations
Test possibility for using raw RSA for fast modular multiplication (usable to implement Diffie-Hellman for example)
The set of cryptographic algorithms supported by the particular Java smart card is sometimes hard obtain from vendor's specifications. Moreover, supported algorithms may change in more recent revisions of given type of card (typically, basic primitives like block cipher or asymmetric cryptography algorithm remains same as they are often implemented in hardware, but cryptographic constructions like particular MAC algorithm or supported key sizes may be added later). AlgTest application allows you to enumerate the support of cryptographic algorithms specified in JavaCard 2.2.2 and earlier.

The basic idea is simple - if the particular algorithm/key size is supported, then instance creation will succeed. Otherwise, CryptoException.NO_SUCH_ALGORITHM is thrown. This can be employed for fast test of supported algorithms. AlgTest applet tries to create instance of algorithms for all possible constants defined in JavaCard specification and eventually catch the exception (example for ALG_DES_CBC_NOPAD algorithm):

Code: Select all

    try {
      m_cipher = Cipher.getInstance(ALG_DES_CBC_NOPAD, false);
      // If this line is reached, than DES in CBC mode with no padding (ALG_DES_CBC_NOPAD) is supported.
      supported = true;
    }
    catch (CryptoException e) {
      if (e.getReason() == CryptoException.NO_SUCH_ALGORITHM)) {
        // algorithm is not supported
        supported = false;
      }
      else {
        // other error occured
      }
    }



For more information about this Applet, please see the attachment file.

Note:

  1. The Applet has been successfully compiled in JCIDE, can be directly use after download.
  2. For more details, you can visit "SourceForge" or "GitHub"
You do not have the required permissions to view the files attached to this post. Please login first.
Last edited by JavaCardOS on Mon Dec 28, 2015 9:08 am, edited 2 times in total.

User avatar
JavaCardOS
Posts: 273
Joined: Thu Apr 30, 2015 12:00 pm
Points :2403
Contact:

Re: AlgTest Instructions & Applet Source Code

Post by JavaCardOS » Tue Sep 08, 2015 2:50 am

This ALGTest version is V1.3, supporting Java Card Version is JC2.2.2.

Note:
  1. The project has been successfully compiled in JCIDE, The CAP file can be directly use.
  2. You can also visit GitHub or SourceForge.
You do not have the required permissions to view the files attached to this post. Please login first.
Last edited by JavaCardOS on Mon Dec 28, 2015 7:03 am, edited 3 times in total.

User avatar
Tolice
Posts: 40
Joined: Wed May 20, 2015 2:41 am
Points :254
Contact:

Re: AlgTest Instructions & Applet Source Code

Post by Tolice » Fri Sep 11, 2015 2:18 am

The Applet in github and this forum exists some questions, I hava already optimized the applet with the version V1.3, and added garbage collection after setOutgoingAndSend(). The new version will continue to update, more information you can visit the GitHub.

Everyone can download this attachment.
You do not have the required permissions to view the files attached to this post. Please login first.
Last edited by Tolice on Wed Sep 16, 2015 6:41 am, edited 1 time in total.

User avatar
Tolice
Posts: 40
Joined: Wed May 20, 2015 2:41 am
Points :254
Contact:

Re: AlgTest Instructions & Applet Source Code

Post by Tolice » Fri Sep 11, 2015 8:59 pm

The new apllet source code with version v1.6.
It also add the garbage collection mechanism and exception handling to adapt to to more cards.
You do not have the required permissions to view the files attached to this post. Please login first.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 3 guests

JavaCard OS : Disclaimer