Page 1 of 1

How to know supported encryption/sign algorithms in a Javacard

Posted: Fri Jun 19, 2015 7:05 am
by NikerCR
As the subject mentioned, how can i know all the encryption algorithms the Javacard supports?

Re: How to know supported encryption/sign algorithms in a Javacard

Posted: Thu Jul 02, 2015 4:39 am
by horse dream
The code below can check the specified algorithm your card supports or not. If the algorithm is supported, the instance creation will succeed. Otherwise,CryptoException.NO_SUCH_ALGORITHM is thrown. e.g. ALG_DES_CBC_NOPAD algorithm:

Code: Select all

try {
    m_cipher = Cipher.getInstance(ALG_DES_CBC_NOPAD, false);
    supported = true;
   }
catch (CryptoException e) {
    if (e.getReason() == CryptoException.NO_SUCH_ALGORITHM))
           {
             supported = false;
            }
   else {
             // other errors
         }
   }

Re: How to know supported encryption/sign algorithms in a Javacard

Posted: Thu Jul 02, 2015 5:04 am
by NikerCR
That's so nice of you. But,it takes too long to test all the possible algorithms successively . Is there any method to know all the algorithms supported by the given card at a time ?

Re: How to know supported encryption/sign algorithms in a Javacard

Posted: Thu Jul 02, 2015 5:32 am
by horse dream
Of course,you can see JavaCard Algorithms Support Test Tool, which can meet your need. Hope to help you.

Re: How to know supported encryption/sign algorithms in a Javacard

Posted: Tue Aug 25, 2015 8:52 am
by UNKNwYSHSA
So simple, ask your card provider. If you did not know the card provider, you can only test yourself.

Re: How to know supported encryption/sign algorithms in a Javacard

Posted: Tue Aug 25, 2015 11:50 pm
by NikerCR
UNKNwYSHSA wrote:So simple, ask your card provider. If you did not know the card provider, you can only test yourself.

Hi,UNKNwYSHSA
Thanks for your answer anyway.