crocs-muni / JCAlgTest

Automated testing tool for algorithms from JavaCard API supported by particular smart card. Performance testing of almost all available methods. The results for more than 100+ cards.
http://jcalgtest.org
MIT License
112 stars 44 forks source link

Incorrect HMAC key lengths displayed in the test results #260

Open nc-adnan opened 1 year ago

nc-adnan commented 1 year ago

The following HMAC key lengths are present in AlgTestJClient test results (list all supported JC API algorithms):

javacard.security.KeyBuilder
...
TYPE_HMAC LENGTH_HMAC_SHA_384_BLOCK_64;yes;     0.044000;72;0;0
TYPE_HMAC LENGTH_HMAC_SHA_512_BLOCK_64;yes;     0.043000;72;0;0

The HMAC key lengths LENGTH_HMAC_SHA_384_BLOCK_64 and LENGTH_HMAC_SHA_512_BLOCK_64 are not defined in the Java Card API but LENGTH_HMAC_SHA_384_BLOCK_128 and LENGTH_HMAC_SHA_512_BLOCK_128 are. The block size is incorrect.

petrs commented 1 year ago

Thank you @nc-adnan for reporting. To fully resolve this issue, it also requires:

  1. Fix existing collected files with results https://github.com/crocs-muni/jcalgtest_results/
  2. Fix related issue https://github.com/jlord/sheetsee.js/issues/26 which made six HMAC-related values possibly incorrectly measured (needs to rerun measurements for these cards)

So I will keep this issue open for now.