projects
/
crypto_lab3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First part: RSA CRT versus RSA std.
[crypto_lab3.git]
/
src
/
Rsa.h
diff --git
a/src/Rsa.h
b/src/Rsa.h
index
cbc3676
..
85b61bc
100644
(file)
--- a/
src/Rsa.h
+++ b/
src/Rsa.h
@@
-1,26
+1,16
@@
#ifndef RSA_H
#define RSA_H
#ifndef RSA_H
#define RSA_H
-#include <utility>
#include <gmpxx.h>
class Rsa
{
public:
struct KeyPub {
#include <gmpxx.h>
class Rsa
{
public:
struct KeyPub {
- mpz_class n;
- mpz_class e;
+ mpz_class n;
// Modulus.
+ mpz_class e;
// Exponent.
};
};
- struct KeyPriv {
- mpz_class n;
- mpz_class d;
- };
-
- static std::pair<KeyPub, KeyPriv> generateRSAKeys(uint exponent, uint keySizeBits);
-
- static mpz_class sign(const mpz_class& m, const KeyPriv& kPriv);
-
static bool verifySignature(const mpz_class& m, const mpz_class& sig, const KeyPub& kPub);
};
static bool verifySignature(const mpz_class& m, const mpz_class& sig, const KeyPub& kPub);
};