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.
Install / Use
/learn @crocs-muni/JCAlgTestREADME
JCAlgTest
An automated testing tool for cryptographic algorithms supported by a particular smart card with JavaCard platform.
Contribution with results for YOUR card is wanted. (and highly appreciated :))
The processed data are available at https://www.fi.muni.cz/~xsvenda/jcalgtest/
Usage
1. Prepare card with testing applet (AlgTest_*.cap)
Upload proper cap file (based on the supported JavaCard version) file to your smart card using uploader like GlobalPlatformPro.
java -jar gp.jar --install AlgTest_v1.8.2_jc305.cap
If unsure about the supported version for your card, simply try to upload from the highest version down to the lower one (e.g., start with AlgTest_v1.8.2_jc305.cap, then AlgTest_v1.8.2_jc304.cap, then AlgTest_v1.8.2_jc222.cap). Stop when the card upload succeed.
Check that the applet was correctly uploaded and installed:
java -jar gp.jar --list
Expected output:
ISD: A000000003000000 (OP_READY)
Parent: A000000003000000
From: A0000000620001
Privs: SecurityDomain, CardLock, CardTerminate, CardReset, CVMManagement, TrustedPath, AuthorizedManagement, TokenVerification, GlobalDelete, GlobalLock, GlobalRegistry, FinalApplication, ReceiptGeneration
APP: 4A43416C675465737431 (SELECTABLE)
Parent: A000000003000000
From: 4A43416C6754657374
Privs:
PKG: 4A43416C6754657374 (LOADED)
Applet: 4A43416C675465737431
2. Run data collection application (AlgTestJClient)
Run as interactive application and select from the offered options:
java -jar AlgTestJClient.jar
On Linux you might need to set the smartcardio library, for example use:
java -Dsun.security.smartcardio.library=/usr/lib64/libpcsclite.so.1 -jar AlgTestJClient.jar'
Choose the target reader for the card with the uploaded AlgTest applet, select the testing mode (e.g., 1 -> SUPPORTED ALGORITHMS) and let it run. CSV file with values separated by the semicolon is created (card_name_ALGSUPPORT__ATR....csv).
3. Contribute your results, please
Please consider to send us (petr@svenda.com) your results in case your card (*.csv and *.log file). The open database benefit both from the cards not yet in an open public database at https://www.fi.muni.cz/~xsvenda/jcalgtest/, but also from the new measurements for the already included ones (set of supported algorithms can expand in later revisions of the same card).
4. Automatization of data collection
The AlgTestJClient can be run in non-interactive mode for usage in scripts, see available options using --help option
java -jar AlgTestJClient.jar --help
Non-interactive measurement - supported algorithms
Run non-interactively (scripts) the algorithms support (-op ALG_SUPPORT_EXTENDED), with specified card name (-cardname your_card_name) and complete measurement (-fresh):
java -jar AlgTestJClient.jar -op ALG_SUPPORT_EXTENDED -cardname your_card_name -fresh
Non-interactive measurement - performance benchmark on fixed data length (typically 256 bytes)
Run non-interactively (scripts) the performance benchmark with 256 bytes of data (-op ALG_PERFORMANCE_STATIC), with specified card name (-cardname your_card_name) and complete measurement (-fresh):
java -jar AlgTestJClient.jar -op ALG_PERFORMANCE_STATIC -cardname your_card_name -fresh
Note: if '-fresh' option is omitted, you will be asked to continue previous measurement for same card, if found
Non-interactive measurement - performance benchmark on variable data length (16, 32, 64, 128, 256 and 512 bytes)
Run non-interactively (script usage) the performance benchmark with variable data (-op ALG_PERFORMANCE_VARIABLE), with specified card name (-cardname your_card_name) and complete measurement (-fresh):
java -jar AlgTestJClient.jar -op ALG_PERFORMANCE_VARIABLE -cardname your_card_name -fresh
Results data presentation and visualization
jcalgtest.org web page
We do periodically update the web page with visualization and sortable tables at http://jcalgtest.org. The raw source files with measurements are available in separate repository https://github.com/crocs-muni/jcalgtest_results/. Visit the page to see all results you also (possibly) contributed to.
Generate web page yourself
The webpage content can be generated with AlgTestProcess sub-project. If you want to generate webpage yourself, then:
- Clone jcalgtest_results repository
git clone https://github.com/crocs-muni/jcalgtest_results.git
- Run AlgTestProcess.jar application to generate algorithms support table
java -jar AlgTestProcess.jar ..\..\algtest_results\javacard\Profiles HTML
- Run AlgTestProcess.jar application to generate various performance measurements
java -jar AlgTestProcess.jar ..\..\algtest_results\javacard\Profiles\performance\fixed\ SIMILARITY ..\..\algtest_results\javacard\web\
java -jar AlgTestProcess.jar ..\..\algtest_results\javacard\Profiles\performance\fixed\ JCINFO ..\..\algtest_results\javacard\web\
java -jar AlgTestProcess.jar ..\..\algtest_results\javacard\Profiles\performance\fixed\ SORTABLE ..\..\algtest_results\javacard\web\
java -jar AlgTestProcess.jar ..\..\algtest_results\javacard\Profiles\performance\fixed\ RADAR ..\..\algtest_results\javacard\web\
java -jar AlgTestProcess.jar ..\..\algtest_results\javacard\Profiles\performance\variable\ SCALABILITY ..\..\algtest_results\javacard\web\
- Inspect results in \algtest_results\javacard\web\ folder
Future development
Important: We are now working on refactoring results data presentation and visualization from Java-based AlgTestProcess application to Python-based scripts and Jupyter notebooks and AlgTestProcess project will be depricated.
The data collection application AlgTestJClient and on-card javacard applet AlgTestJavaCard will continue to be maintained as Java applications.
Contributed cards
Results for (at least) the following smartcards are currently in the database (https://www.fi.muni.cz/~xsvenda/jcalgtest/):
c0 ACS ACOSJ (Combi) , ATR=3b 69 00 02 41 43 4f 53 4a 76 31 30 31 (provided by Alexandre Bouvier),
c1 ACS ACOSJ 40K , ATR=3b 69 00 02 41 43 4f 53 4a 76 31 30 31 (provided by PetrS),
c2 Athena IDprotect , ATR=3B D5 18 FF 80 91 FE 1F C3 80 73 C8 21 13 08 (provided by Cosmo),
c3 Athena IDProtect ICFabDate 2015 , ATR=3b d5 18 ff 81 91 fe 1f c3 80 73 c8 21 13 09 (provided by PetrS),
c4 Axalto Cyberflex32 , ATR=3B 75 94 00 00 62 02 02 02 01 (provided by PetrS),
c5 Axalto Cyberflex PalmeraV5 , ATR=3B E6 00 00 81 21 45 32 4B 01 01 01 01 7A (provided by PetrS),
c6 Credentsys Lite , ATR=3b df 95 ff 80 91 fe 1f c3 80 25 a0 00 00 00 68 53 19 00 01 73 c8 21 13 29 (provided by Kate Gray),
c7 Feitian-FTJCOS ICFabDate 2018 , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 01 00 87 06 00 00 00 00 ea (provided by Toporin),
c8 Feitian A40 ICFabDate 2018 , ATR=3b 9f 95 81 31 fe 9f 00 66 46 53 05 10 00 ff 71 df 00 00 00 00 00 ec (provided by Radboud University),
c9 Feitian A40CR ICFabDate 2018 , ATR=3b 9c 95 80 81 1f 03 90 67 46 4a 01 00 41 06 f2 72 7e 00 57,
c10 Feitian C21C Samsung S3FS91J , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 01 00 05 24 c0 72 7e 00 86 (provided by Thotheolh Tay),
c11 Feitian eJava Token , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 01 64 2f 70 c1 72 fe e0 fd (provided by Razvan Dragomirescu),
c12 Feitian Fingerprint card , ATR=3b 61 00 00 80 (provided by PetrS),
c13 Feitian Java Card D11CR , ATR=3b 6a 00 00 09 44 31 31 43 52 02 00 25 c3 (provided by PetrS),
c14 Feitian JavaCOS A22 ICFabDate 2015 , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 00 68 08 04 00 00 00 00 0e (provided by Ivo Kubjas and PetrS),
c15 Feitian JavaCOS A22CR-ECC-SHA-2 ICFabDate 2015 , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 01 00 10 04 f2 72 fe 00 01 (provided by Kenneth Benson),
c16 Feitian JavaCOS A22CR ICFabDate 2016 084 , ATR=3b 8c 80 01 90 67 46 4a 01 00 25 04 00 00 00 00 d6 (provided by Josh Harvey),
c17 Feitian JavaCOS A22CR ICFabDate 2016 257 , ATR=3b 9c 95 80 81 1f 03 90 67 46 4a 01 00 35 04 f2 72 fe 00 a1 (provided by PetrS),
c18 Feitian JavaCOS A40 ICFabDate 2016 201 , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 01 00 20 05 00 00 00 00 4e (provided by PetrS and Keneth Benson),
c19 Feitian JavaSD , ATR=3b 9f 95 81 31 fe 9f 00 66 46 53 05 10 00 ff 71 df 00 00 00 00 00 ec (provided by Thoth),
c20 Feitian K9 NXPJ3E081 , ATR=3b f9 13 00 00 81 31 fe 45 4a 43 4f 50 32 34 32 52 33 a2 (provided by Thotheolh Tay),
c21 FeiTian Ltd JavaCard Token V1.0 0 , ATR=3b fc 18 00 00 81 31 80 45 90 67 46 4a 01 01 68 06 00 00 00 00 04 (provided by Thoth Tay),
c22 G+D Smart Cafe Expert 4.x V2 ICFabDate 2007 079 , ATR=3b f8 18 00 00 80 31 fe 45 00 73 c8 40 13 00 90 00 92 (provided by PetrS), Performance, Graphs
c23 G+D Smartcafe 6.0 80K ICFabDate 2015 024 , ATR=3b fe 18 00 00 80 31 fe 45 53 43 45 36 30 2d 43 44 30 38 31 2d 6e 46 a9 (provided by PetrS),
c24 G+D SmartCafe 7.0 215K USB Token S , ATR=3b f9 96 00 00 81 31 fe 45 53 43 45 37 20 0e 00 20 20 28 (provided by PetrS),
c25 G+D Smartcafe 7.0 , ATR=3b f9 96 00 00 80 31 fe 45 53 43 45 37 20 00 00 20 20 27 (provided by Radboud University),
c26 G+D SmartCafe Expert 144k Dual , ATR=3b fd 18 00 00 80 31 fe 45 73 66 74 65 20 63 64 31 34 34 2d 6e 66 d8 (provided by Diego NdK),
c27 G+D Smartcafe Expert 3.2 7
