From 44666fce380623d5194f623155b15f3c39ce2ca8 Mon Sep 17 00:00:00 2001
From: Ummon <greg.burri@gmail.com>
Date: Mon, 12 Jan 2015 15:26:59 +0100
Subject: [PATCH] Cleaning.

---
 src/Rand.cpp               | 2 +-
 src/RsaCrt.cpp             | 2 +-
 src/RsaCrtShamirsTrick.cpp | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Rand.cpp b/src/Rand.cpp
index c82b83f..ee439c3 100644
--- a/src/Rand.cpp
+++ b/src/Rand.cpp
@@ -57,7 +57,7 @@ void Rand::readRand(char* to, int size)
    static fstream ifs(RANDOM_SOURCE, ios_base::in);
    if (!ifs)
    {
-      cerr << "Unable to read  the random source: " << RANDOM_SOURCE << endl;
+      cerr << "Unable to read the random source: " << RANDOM_SOURCE << endl;
       throw 1;
    }
 
diff --git a/src/RsaCrt.cpp b/src/RsaCrt.cpp
index 869fce5..95f5993 100644
--- a/src/RsaCrt.cpp
+++ b/src/RsaCrt.cpp
@@ -26,7 +26,7 @@ pair<Rsa::KeyPub, RsaCrt::KeyPriv> RsaCrt::generateRSAKeys(uint exponent, uint k
    kPriv.dp = d % (kPriv.p - 1);
    kPriv.dq = d % (kPriv.q - 1);
 
-   // qInv = q^-1 (mod p)
+   // qInv = q^-1 (mod p).
    mpz_invert(kPriv.qInv.get_mpz_t(), kPriv.q.get_mpz_t(), kPriv.p.get_mpz_t());
 
    return make_pair(kPub, kPriv);
diff --git a/src/RsaCrtShamirsTrick.cpp b/src/RsaCrtShamirsTrick.cpp
index dffb20f..cc58378 100644
--- a/src/RsaCrtShamirsTrick.cpp
+++ b/src/RsaCrtShamirsTrick.cpp
@@ -59,8 +59,8 @@ mpz_class RsaCrtShamirsTrick::sign(const mpz_class& m, const KeyPriv& kPriv, boo
    if (spr % r != sqr % r)
       throw UnableToSignWithShamirsTrick();
 
-   mpz_class sp = spr % kPriv.p;
-   mpz_class sq = sqr % kPriv.q;
+   const mpz_class sp = spr % kPriv.p;
+   const mpz_class sq = sqr % kPriv.q;
 
    return sq + ((kPriv.qInv * (sp - sq)) % kPriv.p) * kPriv.q;
 }
-- 
2.49.0