From adf7a34fa61c9c5798fa1190622167dbf3334ace Mon Sep 17 00:00:00 2001 From: gbrochar Date: Wed, 14 Feb 2024 17:17:11 +0100 Subject: [PATCH] feat: rsa compiles --- rsa/generate_keys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsa/generate_keys.c b/rsa/generate_keys.c index e7f1431..e095e37 100644 --- a/rsa/generate_keys.c +++ b/rsa/generate_keys.c @@ -37,8 +37,8 @@ int *generate_a(int *n) { a[0] -= 1; int cursor = 0; // a = n - 2 - while (true) { - a[cursor / 32] = a ^ (1 << (cursor % 32) + while (1) { + a[cursor / 32] = a[cursor / 32] ^ (1 << (cursor % 32)); if ((a[cursor / 32] >> (cursor % 32)) & 1 == 0) break; cursor++;