X-Git-Url: http://git.euphorik.ch/?p=crypto_lab3.git;a=blobdiff_plain;f=src%2FRsa.h;fp=src%2FRsa.h;h=85b61bc0f9e8f0ff1b1545ec6f18cf1573abdfc3;hp=cbc3676188a9150e28206b9352ef0df9747f9966;hb=91989c2627abc2cdf511f17169e4f862dc55e838;hpb=7975d02c6c1ee679a236087e86955c086f1a9a8e diff --git a/src/Rsa.h b/src/Rsa.h index cbc3676..85b61bc 100644 --- a/src/Rsa.h +++ b/src/Rsa.h @@ -1,26 +1,16 @@ #ifndef RSA_H #define RSA_H -#include #include 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 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); };