-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkobra.hpp
More file actions
30 lines (24 loc) · 945 Bytes
/
Copy pathkobra.hpp
File metadata and controls
30 lines (24 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef erclib_kobra_included
#define erclib_kobra_included
#include <vector>
#include <cmath>
#include <cassert>
typedef unsigned short ushort;
typedef unsigned char byte;
namespace ERCLIB {
namespace KOBRA {
namespace Low {
extern const std::vector<byte> cipherEncrypt(std::vector<byte> plaintext, std::vector<byte> key, byte IV);
extern const std::vector<byte> cipherDecrypt(std::vector<byte> ciphertext, std::vector<byte> key, byte IV);
extern const std::vector<byte> XOR(std::vector<byte> mainText, std::vector<byte> secondText);
extern const std::vector<byte> XOR(std::vector<byte> text, byte what);
}
struct keyPair {
std::vector<byte> EncryptKey, ExtractKey;
byte IV;
};
extern const keyPair encryptFrom(std::vector<byte> calycryptBody, std::vector<byte> key, std::vector<byte> message, byte IV);
extern const std::vector<byte> decryptFrom(std::vector<byte> calycryptBody, keyPair data);
}
}
#endif