Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tvla] Usability and performance improvements, code cleanup #72

Open
11 of 22 tasks
vogelpi opened this issue May 24, 2022 · 6 comments
Open
11 of 22 tasks

[tvla] Usability and performance improvements, code cleanup #72

vogelpi opened this issue May 24, 2022 · 6 comments
Assignees

Comments

@vogelpi
Copy link
Collaborator

vogelpi commented May 24, 2022

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:

  • Use typer (as in capture.py) to simplify the handling of input arguments.
  • Allow specifying a command line argument to configure the logger, see [tvla] Add histogram based TVLA #71 (comment)
  • Refactor the main function to simplify it, e.g., by moving chunks of code into helper functions.
  • Parallelize computation using Ray (see ceca.py).
  • Provide yaml config files to configure specific modes of the TVLA code.
  • Reduce number of command line arguments.
  • 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)
  • 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.
  • 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.
  • 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.
  • 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
  • Make trace filtering controllable from the command line / cfg file
  • 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.
  • At the moment, tvla.py cannot generate some figures if data is loaded from the new database format.
@m-temp
Copy link
Collaborator

m-temp commented Feb 24, 2023

  • Allow for analysis of only a part of the trace (e.g. by specifying start_sample and end_sample)

#125 adds this for otbn-vertical. In order to not break backwards compatibility, this feature is deactivated for aes, sha3 and kmac.

@vrozic
Copy link
Contributor

vrozic commented Jun 15, 2023

#135 adds the AES configuration file and changes the layout of the AES-specific test figures to be consistent with the general test figures.
I am marking these two items as done.

@vrozic
Copy link
Contributor

vrozic commented Oct 24, 2023

#185 Makes trace filtering controllable from the command line. I am therefore marking this item as done.

@m-temp
Copy link
Collaborator

m-temp commented Jan 5, 2024

#270 should address the plotting issues with the new database format

@wettermo
Copy link
Contributor

wettermo commented Jan 5, 2024

#270 also adds code in the tvla script to also include metadata in plots of aes specific tests.

@vrozic
Copy link
Contributor

vrozic commented Apr 5, 2024

Per discussion in #334, I've added an item to correctly calculate num_traces_used_total when histograms are added from an input file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants