Skip to content

Commit

Permalink
Minor GMP typos
Browse files Browse the repository at this point in the history
  • Loading branch information
iryont committed Mar 9, 2019
1 parent c9845a3 commit 88e271c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/framework/util/crypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ bool Crypt::rsaEncrypt(unsigned char *msg, int size)
mpz_import(m, size, 1, 1, 0, 0, msg);

// c = m^e mod n
mpz_powm(c, m, e, n);
mpz_powm(c, m, m_e, m_n);

size_t count = (mpz_sizeinbase(m, 2) + 7) / 8;
memset((char*)msg, 0, size - count);
Expand All @@ -332,7 +332,7 @@ bool Crypt::rsaDecrypt(unsigned char *msg, int size)
mpz_import(c, size, 1, 1, 0, 0, msg);

// m = c^d mod n
mpz_powm(m, c, d, n);
mpz_powm(m, c, m_d, m_n);

size_t count = (mpz_sizeinbase(m, 2) + 7) / 8;
memset((char*)msg, 0, size - count);
Expand Down

0 comments on commit 88e271c

Please sign in to comment.