fixed base bug in exp_mod fn

This commit is contained in:
Václav Šmejkal 2024-04-13 14:20:52 +02:00
parent 6227b8eb0a
commit 22e03ca06e
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -86,7 +86,7 @@ char *exp_mod(char *to_exp, char *exponent)
//GET ALL STUFF //GET ALL STUFF
mpz_init_set_str(m, to_exp, 10); mpz_init_set_str(m, to_exp, 10);
mpz_init_set_str(n, why2_get_chat_modulus(), WHY2_CHAT_KEY_BASE); mpz_init_set_str(n, why2_get_chat_modulus(), WHY2_CHAT_KEY_BASE);
mpz_init_set_str(e, exponent, 10); mpz_init_set_str(e, exponent, WHY2_CHAT_KEY_BASE);
//ENCRYPT MESSAGE //ENCRYPT MESSAGE
mpz_powm(c, m, e, n); mpz_powm(c, m, e, n);