-
Notifications
You must be signed in to change notification settings - Fork 44
Processing results
AlgTest_Process allows you to:
- Generate HTML table with results measured for multiple cards (table http://www.fi.muni.cz/~xsvenda/jcsupport.html produced this way)
- Compare results from two measurements and produce HTML table with highlighted differences.
- Generate GPShell scripts for JCAlgTest upload for various cards
Additionally (for developers mainly):
- Extract all JavaCard constants and methods for relevant classes (e.g., all fields and methods from javacard.security.Signature are extracted using Java reflection and formatted. File JCConsts.java was produced this way).
Import JavaCard library of the version you need and run AlgTestProcess.jar with argument "JCCONSTS" (generateJCConstantsFile() method). FIXME: cmd line...
This schema shows how the testing and processing does work. First you have to upload proper cap file to your smart card, then run JCAlgTest (you will get CSV file with results) and finally, you can use CSV for processing results.
Once you ran the test, you should have an output of the test in CSV file in your Current Working Directory. This file is used as input for processing into HTML files (tables, graphs).
There are 2 types of CSV output:
- fix data length output file
- variable data length output file
The output CSV file contains basic information about the test and your card (e.g. date, ATR, memory and CPLC info) and performance data of each tested function.
The result of processing CSV file is HTML page. To view this page correctly is necessary to have the "source" folder which contains CSS and JS files in the same folder as the HTML file.
Before you start any type of processing, you should know about Top Functions List file (top.txt). This file contains a list of the most used functions names + shortcuts of functions (used in table header) and type of functions (symmetric or asymmetric cryptography). You can edit this file so these functions will be highlighted in output file of processing.
If you want to use features of Top Functions List file (top.txt) it has to be present in your Current Working Directory.
Syntax of line in top.txt file: exact function name;shortcut;type
Example: ALG_SECURE_RANDOM RandomData_generateData();SECURE RANDOM;SYM
CSV file with fix data results is simply transformed info HTML page that contains information about test and list of all tested methods. All functions are divided into groups (e.g. CIPHER, AESKey, SIGNATURE). For more comfortable browsing there are links to these groups at the beginning of HTML page.
If you want to have Top Functions table at the beginning of HTML page (recommended) , just put top.txt file into the Current Working Directory. If not, make sure that the file is not in the Current Working Directory.
After processing you should find HTML file in your Current Working Directory.
USAGE: algProcess.jar path-to-fix-data-csv-file JCINFO
This page is perfect for quick comparison of different cards. It contains of two tables with symmetric and asymmetric functions which are listed in Top Functions List file (top.txt). It is necessary to the top.txt file be presentin the Current Working Directory during the generation of sort-able HTML page.
Data are collected from folder that contains only fix data CSV files.
USAGE: algProcess.jar path-to-fix-data-csvs-folder SORTABLE
Resulting sortable table can be found here: RESULTS PAGE
To generate graphs you have to use variable data CSV file. Output of processing contains information about test and list of all generated graphs. HTML file may be loading for longer time, depending on number of generated graphs (1 graph ~ 150 ms).
Graph is generated only if input data are valid so in the output HTML you find only valid graphs.
You can use Top Functions List file (top.txt) to specify which graphs you want to include in the HTML output, just put top.txt file into the Current Working Directory. If you want to generate all graphs, make sure that the file is not in the Current Working Directory.
USAGE: algProcess.jar path-to-variable-data-csv-file GRAPHSPAGE
Resulting page with graphs can be found here: RESULTS PAGE
For faster HTML files generating is also possible to process all files in folder in one invocation. This option is supported by Performance test - JCINFO and Graphs generator - CHARTSPAGE options.
USAGE: algProcess.jar path-to-fix-data-csvs-folderJCINFO ALL
algProcess.jar path-to-variable-data-csvs-folderGRAPHSPAGE ALL
Before running one of these options, we strongly recommend to check whether each processed CSV file contains card name value. This value should be present anywhere at the beginning of CSV file.
Example: Card name;NXP JCOP CJ2A081
(line 8)