SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
ttestengine.h
Go to the documentation of this file.
1 /*
2 * SICAK - SIde-Channel Analysis toolKit
3 * Copyright (C) 2018 Petr Socha, FIT, CTU in Prague
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18 
29 #ifndef TTESTENGINE_H
30 #define TTESTENGINE_H
31 
32 #include <QString>
33 #include "types_power.hpp"
34 #include "types_stat.hpp"
35 
43 class TTestEngine {
44 
45 public:
46 
47  virtual ~TTestEngine() {}
48 
50  virtual QString getPluginName() = 0;
52  virtual QString getPluginInfo() = 0;
53 
55  virtual void init(int platform, int device, size_t noOfTracesRandom, size_t noOfTracesConst, size_t samplesPerTrace, const char * param) = 0;
57  virtual void deInit() = 0;
58 
60  virtual QString queryDevices() = 0;
61 
63  virtual UnivariateContext<double> createContext(const PowerTraces<int16_t> & randTraces, const PowerTraces<int16_t> & constTraces) = 0;
65  virtual void mergeContexts(UnivariateContext<double> & firstAndOut, const UnivariateContext<double> & second) = 0;
67  virtual Matrix<double> finalizeContext(const UnivariateContext<double> & context) = 0;
68 };
69 
70 #define TTestEngine_iid "cz.cvut.fit.Sicak.TTestInterface/1.0"
71 
72 Q_DECLARE_INTERFACE(TTestEngine, TTestEngine_iid)
73 
74 
75 #endif /* TTESTENGINE_H */
A class representing a Two-population Univariate Moment-based statistical context.
Definition: types_stat.hpp:43
virtual Matrix< double > finalizeContext(const UnivariateContext< double > &context)=0
Compute t-values (stored in first row) and degrees of freedom (second row) based on the given context...
virtual void init(int platform, int device, size_t noOfTracesRandom, size_t noOfTracesConst, size_t samplesPerTrace, const char *param)=0
Initialize the CPA computation engine with specified parameters.
virtual QString getPluginInfo()=0
Plugin info.
virtual QString queryDevices()=0
Query available devices.
virtual UnivariateContext< double > createContext(const PowerTraces< int16_t > &randTraces, const PowerTraces< int16_t > &constTraces)=0
Create a t-test computation context based on given random and constant power traces.
virtual void mergeContexts(UnivariateContext< double > &firstAndOut, const UnivariateContext< double > &second)=0
Merge the two t-test contexts, stores the result in the first of the contexts.
This header file contains class templates of power traces and power consumption containers.
A class representing a matrix, stored in the machine's free space.
Definition: types_basic.hpp:305
t-test computation engine QT plugin interface
Definition: ttestengine.h:43
virtual void deInit()=0
Deinitialize the plugin.
This header file contains class templates of statistical computational contexts.
virtual QString getPluginName()=0
Plugin name.
A class representing a Matrix with 'noOfTraces' power traces, with 'samplesPerTrace' samples per powe...
Definition: types_power.hpp:44