X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=src%2FRsaCrt.h;h=6e93e6bd25269d646e69bc4eb0b0905a6a09c929;hb=5b2785dd710151d81e6f6af4fd6ae48521068e41;hp=b680e3101c205998149923c3acf3f4900d712dd3;hpb=2745bc6570ac32789650336b8c84a52d1883c62a;p=crypto_lab3.git diff --git a/src/RsaCrt.h b/src/RsaCrt.h index b680e31..6e93e6b 100644 --- a/src/RsaCrt.h +++ b/src/RsaCrt.h @@ -2,6 +2,7 @@ #define RSACRT_H #include +#include #include @@ -25,10 +26,18 @@ public: /** * m must not be greater or equal than kPriv.n. + * @param m the message to sign. No padding is used. */ static mpz_class sign(const mpz_class& m, const KeyPriv& kPriv); + /** + * Sp is altered by flipping its 42nd bit. + * @param m the message to sign. No padding is used. + */ static mpz_class signWithFaultySp(const mpz_class& m, const KeyPriv& kPriv); + +private: + static mpz_class sign(const mpz_class& m, const KeyPriv& kPriv, bool withError); }; #endif