fixed bug in decryption where incorrect value was passed into the crt
This commit is contained in:
4
main.c
4
main.c
@@ -290,9 +290,9 @@ int main() {
|
|||||||
|
|
||||||
if (!isSignature) {
|
if (!isSignature) {
|
||||||
// rsa encryption
|
// rsa encryption
|
||||||
rsa_encrypt(&m, &p, &q, &e, &d);
|
uint64_t c = rsa_encrypt(&m, &p, &q, &e, &d);
|
||||||
printf("\nkinai maradek tetel:\n");
|
printf("\nkinai maradek tetel:\n");
|
||||||
unsigned __int128 S = kinai_maradek_tetel(&m, d, &p, &q);
|
unsigned __int128 S = kinai_maradek_tetel(&c, d, &p, &q);
|
||||||
printf("S: ");
|
printf("S: ");
|
||||||
print_uint128(S);
|
print_uint128(S);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user