[tvla] Usability and performance improvements, code cleanup
@vrozic is already working on this.
Since Aug 10, 2023.
- Dominant language
- Jupyter Notebook
- Stars
- 43
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
With #71 we have moved our TVLA code to the public repo. Besides adding new features, we have so far identified the following things to improve:
- [x] Use typer (as in `capture.py`) to simplify the handling of input arguments.
- [ ] Allow specifying a command line argument to configure the logger, see https://github.com/lowRISC/ot-sca/pull/71#discussion_r879874972
- [ ] Refactor the main function to simplify it, e.g., by moving chunks of code into helper functions.
- [ ] Parallelize computation using `Ray` (see `ceca.py`).
- [x] Provide yaml config files to configure specific modes of the TVLA code.
- [x] Reduce number of command line arguments.
- [x] Add some form of CI support?
- [ ] Change naming of input arguments to make them more intuitive.
- [ ] Store keys and plaintexts in the `trace-file`. Currently we need to open project file even when we are using traces from the trace file.
- [ ] Allow for analysis of only a part of the trace (e.g. by specifying `start_sample` and `end_sample`)
- [x] Figure layouts for specific and general tests should be the same.
- [ ] Allow specifying the range of points in trace to be shown in `t_value` vs `number of samples` graphs. Currently constant range is used.
- [x] TVLA configuration file for aes `tvla_cfg_aes.yaml` should be added.
- [ ] Two arguments, namely `mode` and `general_test` are used to specify the type of test. This should be reworked to use only one argument with the value specifying either the general test or the type of the specific test.
- [x] An output file `tmp/ttest.npy` containing the analysis results is generated if and only if `cfg["input_file"]` is provided. This should be a separate option because it is not related to the input file.
- [x] Allow `ttest-step.npy` to be saved whenever n_steps != 0, regardless of the other input parameters
- [ ] Make separate input arguments for `save_to_disk_trace` and `save_to_disk_leakage`
- [x] Make trace filtering controllable from the command line / cfg file
- [x] At the moment, TVLA figures contain meta-data only for general TVLA test. We should enable the same for AES specific TVLA tests.
- [ ] At the moment, `tvla.py` cannot generate figures if data is loaded from histograms.
- [ ] At the moment, the total number of traces is not calculated correctly if data is loaded from histograms.
- [x] At the moment, `tvla.py` cannot generate some figures if data is loaded from the new database format.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.