SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
maxedge.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 MAXEDGE_H
30 #define MAXEDGE_H
31 
32 #include <QObject>
33 #include <QtPlugin>
34 #include "cpacorreval.h"
35 #include "exceptions.hpp"
36 
45 class MaxEdge : public QObject, CpaCorrEval {
46 
47  Q_OBJECT
48  Q_PLUGIN_METADATA(IID "cz.cvut.fit.Sicak.CpaCorrEvalInterface/1.0" FILE "maxedge.json")
49  Q_INTERFACES(CpaCorrEval)
50 
51 public:
52 
53  MaxEdge();
54  virtual ~MaxEdge() override;
55 
56  virtual QString getPluginName() override;
57  virtual QString getPluginInfo() override;
58 
60  virtual void init(const char * param) override;
61  virtual void deInit() override;
62 
63  virtual void evaluateCorrelations(MatrixType<double> & correlationMatrix, size_t & sample, size_t & keyCandidate) override;
64 
65 protected:
66 
70  Vector<double> generateDerivativeGaussianKernel(size_t diameter, double deviation);
71 
72  Vector<double> m_kernel;
73 
74 };
75 
76 #endif /* MAXEDGE_H */
77 
Correlation matrix evaluation plugin interface for use e.g. in correv.
Vector< double > generateDerivativeGaussianKernel(size_t diameter, double deviation)
Generate derivative of gaussian kernel, which works as edge detector.
Definition: maxedge.cpp:133
virtual QString getPluginInfo() override
Plugin info.
Definition: maxedge.cpp:45
An abstract class, representing all the matrix-like data types.
Definition: types_basic.hpp:132
virtual void evaluateCorrelations(MatrixType< double > &correlationMatrix, size_t &sample, size_t &keyCandidate) override
Evaluate the correlation matrix, save the results in sample and keyCandidate.
Definition: maxedge.cpp:73
Matrix< double > convolveMatrixRows(MatrixType< double > &matrix, VectorType< double > &kernel)
Convolve rows of matrix.
Definition: maxedge.cpp:105
This header file contains exceptions.
virtual void init(const char *param) override
Initialize the plugin, prepare convolutional kernel for further evaluations (first derivative of gaus...
Definition: maxedge.cpp:49
A class representing a matrix, stored in the machine's free space.
Definition: types_basic.hpp:305
CPA correlation matrix evaluation QT plugin interface.
Definition: cpacorreval.h:42
virtual void deInit() override
Deinitialize the plugin.
Definition: maxedge.cpp:68
CPA correlation matrix evaluation SICAK CpaCorrEval plugin, looking for maximum edge,...
Definition: maxedge.h:45
virtual QString getPluginName() override
Plugin name.
Definition: maxedge.cpp:41