SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
aes128back.h
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 AES128BACK_H
30 #define AES128BACK_H
31 
32 #include <QObject>
33 #include <QtPlugin>
34 #include "cpakeyeval.h"
35 #include "exceptions.hpp"
36 
44 class Aes128Back : public QObject, CpaKeyEval {
45 
46  Q_OBJECT
47  Q_PLUGIN_METADATA(IID "cz.cvut.fit.Sicak.CpaKeyEvalInterface/1.0" FILE "aes128back.json")
48  Q_INTERFACES(CpaKeyEval)
49 
50 public:
51 
52  Aes128Back();
53  virtual ~Aes128Back() override;
54 
55  virtual QString getPluginName() override;
56  virtual QString getPluginInfo() override;
57 
58  virtual void init(const char * param) override;
59  virtual void deInit() override;
60 
61  virtual Vector<uint8_t> evaluateKeyCandidates(const VectorType<size_t> & keyCandidates) override;
62 
63 protected:
64 
65  void invKey(unsigned char * key, int round = 0);
66  void invKeyRound(unsigned char * key, unsigned char rcon);
67 
68 
69 };
70 
71 #endif /* AES128BACK_H */
72 
CPA keyguess evaluation QT plugin interface.
Definition: cpakeyeval.h:42
virtual void init(const char *param) override
Initialize the plugin.
Definition: aes128back.cpp:48
CPA keyguess evaluation SICAK CpaKeyEval plugin, reverses the AES-128 last round key to the cipher ke...
Definition: aes128back.h:44
This header file contains exceptions.
virtual void deInit() override
Deinitialize the plugin.
Definition: aes128back.cpp:53
Keyguess evaluation plugin interface for use e.g. in correv.
virtual QString getPluginName() override
Plugin name.
Definition: aes128back.cpp:40
virtual Vector< uint8_t > evaluateKeyCandidates(const VectorType< size_t > &keyCandidates) override
Evaluates the keyguess (e.g. maximum key candidate correlation traces) and returns the cipher key.
Definition: aes128back.cpp:101
An abstract class, representing all the vector-like data types.
Definition: types_basic.hpp:100
virtual QString getPluginInfo() override
Plugin info.
Definition: aes128back.cpp:44