SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
localttest.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 LOCALTTEST_H
30 #define LOCALTTEST_H
31 
32 #include <QObject>
33 #include <QtPlugin>
34 #include "ttestengine.h"
35 #include "exceptions.hpp"
36 #include "ompttest.hpp"
37 
45 class LocalTTest : public QObject, TTestEngine {
46 
47  Q_OBJECT
48  Q_PLUGIN_METADATA(IID "cz.cvut.fit.Sicak.TTestInterface/1.0" FILE "localttest.json")
49  Q_INTERFACES(TTestEngine)
50 
51 public:
52 
53  LocalTTest();
54  virtual ~LocalTTest() override;
55 
56  virtual QString getPluginName() override;
57  virtual QString getPluginInfo() override;
58 
59  virtual void init(int platform, int device, size_t noOfTracesRandom, size_t noOfTracesConst, size_t samplesPerTrace, const char * param) override;
60  virtual void deInit() override;
61 
62  virtual QString queryDevices() override;
63 
64  virtual UnivariateContext<double> createContext(const PowerTraces<int16_t> & randTraces, const PowerTraces<int16_t> & constTraces) override;
65  virtual void mergeContexts(UnivariateContext<double> & firstAndOut, const UnivariateContext<double> & second) override;
66  virtual Matrix<double> finalizeContext(const UnivariateContext<double> & context) override;
67 
68 };
69 
70 #endif /* LOCALTTEST_H */
71 
virtual void mergeContexts(UnivariateContext< double > &firstAndOut, const UnivariateContext< double > &second) override
Merge the two t-test contexts, stores the result in the first of the contexts.
Definition: localttest.cpp:76
A class representing a Two-population Univariate Moment-based statistical context.
Definition: types_stat.hpp:43
This header file contains exceptions.
virtual QString getPluginName() override
Plugin name.
Definition: localttest.cpp:39
virtual void deInit() override
Deinitialize the plugin.
Definition: localttest.cpp:57
t-test computation plugin interface for use e.g. in stan
virtual UnivariateContext< double > createContext(const PowerTraces< int16_t > &randTraces, const PowerTraces< int16_t > &constTraces) override
Create a t-test computation context based on given random and constant power traces.
Definition: localttest.cpp:65
virtual void init(int platform, int device, size_t noOfTracesRandom, size_t noOfTracesConst, size_t samplesPerTrace, const char *param) override
Initialize the CPA computation engine with specified parameters.
Definition: localttest.cpp:47
A class representing a matrix, stored in the machine's free space.
Definition: types_basic.hpp:305
virtual QString getPluginInfo() override
Plugin info.
Definition: localttest.cpp:43
t-test context computation SICAK TTestEngine plugin
Definition: localttest.h:45
t-test computation engine QT plugin interface
Definition: ttestengine.h:43
A class representing a Matrix with 'noOfTraces' power traces, with 'samplesPerTrace' samples per powe...
Definition: types_power.hpp:44
virtual QString queryDevices() override
Query available devices.
Definition: localttest.cpp:61
Implementation of t-test statistical algorithms as function templates for various SICAK plugins.
virtual Matrix< double > finalizeContext(const UnivariateContext< double > &context) override
Compute t-values (stored in first row) and degrees of freedom (second row) based on the given context...
Definition: localttest.cpp:82