lazart.analysis.ccpo module¶
The module lazart.analysis.ccpo contains definitions for Countermeasure Check Points Optimization (detectors optimization).
Note: countermeasures analysis are not migrated to Lazart 4.0 for now and may by unusable.
- since
3.1
- note
Not updated.
- author
Etienne Boespflug
- class lazart.analysis.ccpo.CCPOResults(analysis: lazart.core.analysis.Analysis, classification: lazart.analysis.ccpo_classification.CCPOClassificationResults, selection: lazart.analysis.ccpo_selection.CCPOSelectionResults, duration: float, **kwargs)¶
Bases:
object
The CCPOResults class represents results for an CCP Optimization analysis.
It holds the results of the two steps: CCPO classification and CCPO selection.
__init__ (ctor): Constructs a new CCPOResults object from an analysis and results of classification and optional selection steps.
- Parameters
analysis (Analysis) – the Analysis object from which the traces will be read.
classification (CCPOClassificationResults) – the results of classification step.
selection (CCPOSelectionResults) – the results of selection step (None if no selection was computed).
duration (float) – duration of the analysis computing in millisecond.
- classification¶
The results of classification step.
- selection¶
The results of selection step (None if no selection was computed).
- Type
- _duration¶
The duration of the ccpo.
- Type
float
- duration() float ¶
Returns the duration in second of the attacks redundancy analysis computations.
- Returns
duration of the analysis computing in second.
- Return type
float
- lazart.analysis.ccpo.ccpo_analysis(analysis: lazart.core.analysis.Analysis, **kwargs) lazart.analysis.ccpo.CCPOResults ¶
Runs CCPO analysis by executing the classification and selection steps.
Requires that the traces parsing step (see
traces_results()
) has been computed for this analysis.This function uses log to display progress, reduce verbosity level to reduce output.
- Kwargs: (forwarded to inner steps)
satisfies_fct (trace -> bool): boolean predicate determining if a trace should be considered. default: lambda trace: trace.satisfies().
det_list (List[str]): the list of detectors to consider. default: triggering_points(analysis).
weight_fct (Callable[[str], int]): weight_fct: the weight function for computing detector set weight. default: lambda det: 1.
quiet (bool): if true, output is reduced despite current verbosity level (unused). default: False.
- Parameters
analysis (Analysis) – the Analysis object from which the traces will be read.
- Returns
the computed CCPO results.
- Return type
- class lazart.analysis.ccpo.CCPOStep(analysis: lazart.core.analysis.Analysis)¶
Bases:
lazart._internal_.extensions.AnalysisStep
Subclass of CCPOStep for the CCPO analysis, see
lazart._internal_.extensions.AnalysisStep
.__init__ (ctor): Constructs a new CCPOStep object associated to the specified analysis.
- Parameters
analysis (Analysis) – the analysis of the step.
- execute(**kwargs)¶
- init()¶
- save_disk()¶
- clean()¶
- lazart.analysis.ccpo.ccpo(analysis: lazart.core.analysis.Analysis, **kwargs) lazart.analysis.ccpo.CCPOResults ¶
Returns an CCPOResults from an analysis object performing CCPO analysis.
Requires that the traces parsing step (see
traces_results()
) and CCPO classification step (seeccpo_classification()
) has been computed for this analysis.Uses extension (ccpo_classification_ext, see
lazart._internal_.extensions.AnalysisStep
) system to reuse disk/RAM cache if available. This function uses log to display progress, reduce verbosity level to reduce output.- Kwargs: (forwarded to inner steps)
satisfies_fct (trace -> bool): boolean predicate determining if a trace should be considered. default: lambda trace: trace.satisfies().
det_list (List[str]): the list of detectors to consider. default: triggering_points(analysis).
weight_fct (Callable[[str], int]): weight_fct: the weight function for computing detector set weight. default: lambda det: 1.
quiet (bool): if true, output is reduced despite current verbosity level (unused). default: False.
- Parameters
analysis (Analysis) – the Analysis object from which the traces will be read.
- Returns
the computed CCPO results.
- Return type