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

Slow extraction and improvements to Minerva analysis #901

Closed
GeorgePantelakis opened this issue Jan 19, 2024 · 5 comments
Closed

Slow extraction and improvements to Minerva analysis #901

GeorgePantelakis opened this issue Jan 19, 2024 · 5 comments
Assignees
Labels
complex Issues that require good knowledge of tlsfuzzer internals enhancement new feature to be implemented

Comments

@GeorgePantelakis
Copy link
Contributor

GeorgePantelakis commented Jan 19, 2024

Bug Report

Problem description

In the analysis for the Minerva / bit size attack, the confidence intervals for each bit size are calculated twice. This makes the analysis twice as slow for no reason. Also, the nonce extraction takes a lot of time, but then one extraction doesn't depend on the other, it could be run in parallel on multiple CPU cores to speed up the process. Moreover, the individual k-size folder creation probably can be parallelized in analysis.

Expected behavior

The extraction and analysis could be much faster.

Include errors or backtraces

...
[i] Wilcoxon signed-rank test done in 10.5s
[i] Calculating confidence intervals of central tendencies
Done: 100.00%, elapsed:  6m 58.66s, speed: 14.78 bootstraps/s, avg speed: 11.94 bootstraps/s, remaining:  0.00s, ETA: 12:59:44 08-01-2024              
[i] Confidence intervals of central tendencies done in 4.2e+02s
Creating graphs for k size 519...
[i] Graphing confidence interval plots
Done: 100.00%, elapsed:  6m 52.65s, speed: 14.93 bootstraps/s, avg speed: 12.12 bootstraps/s, remaining:  0.00s, ETA: 13:06:39 08-01-2024          
[i] Confidence interval plots done in 4.14e+02s
...

Additional context

Add any other context about the problem here.

@GeorgePantelakis GeorgePantelakis self-assigned this Jan 19, 2024
@tomato42
Copy link
Member

tomato42 commented Jan 19, 2024

The measurements-invert.csv should also be processed when the test-tls13-minerva.py is executed (the analysis.py should still probably process one file at a time)

@GeorgePantelakis
Copy link
Contributor Author

GeorgePantelakis commented Jan 30, 2024

Other optimizations possible:

  • Calculate how many samples will produce around 1ns CI and analyze only them.
  • More advance method of not dividing by 0 in analysis
  • In analysis be able to provide the measurements file name

@tomato42 tomato42 changed the title Slow extraction and analysis on Minerva attack Slow extraction and improvements to Minerva analysis Feb 9, 2024
@tomato42
Copy link
Member

tomato42 commented Feb 9, 2024

The other thing that we probably should do, is create a report.txt, similar to what the regular analysis does, i.e. one that includes:

  • average, max and min p-values for the sign test and Wilcoxon signed rank test
  • result of the Skillings-Mack test
  • statistics for the 10-or-so biggest k-values: the p-test for sign test and Wilcoxon signed rank test, the 5% and 45% trimmed means and their confidence intervals
  • layperson explanation of the result (side-channel possible, side-channel confirmed, or side-channel unlikely)

In general it should be fairly small (fit in 80-100 columns by 15-20 rows)

@tomato42 tomato42 added enhancement new feature to be implemented complex Issues that require good knowledge of tlsfuzzer internals labels Feb 16, 2024
@GeorgePantelakis
Copy link
Contributor Author

All the bugs and new features mentioned in this issue were done.

@tomato42
Copy link
Member

tomato42 commented Mar 8, 2024

@GeorgePantelakis are we analysing measurements-invert.csv by default in the TLS script now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex Issues that require good knowledge of tlsfuzzer internals enhancement new feature to be implemented
Projects
None yet
Development

No branches or pull requests

2 participants