From f4068f97b4386e9826bdcdba13cb05869399d9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hatvani=20Tam=C3=A1s?= Date: Tue, 14 Apr 2026 09:02:35 +0200 Subject: [PATCH] generating e --- main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 28bc1ff..232585b 100644 --- a/main.c +++ b/main.c @@ -217,10 +217,9 @@ uint64_t rsa_encrypt(uint64_t *m, prime_test_t *p, prime_test_t *q, uint64_t *ou // 2. kulcsgeneralas uint64_t e = 65537; - // TODO: put this back after debug - // do { - // e = ran32() % fi_n; - // } while (e <= 1 || !prime_test(e, p->base)); // the p and q base is used everywhere anyways, i wont pass in another arg + do { + e = rand32() % fi_n; + } while (e <= 1 || !prime_test(e, p->base)); // the p and q base is used everywhere anyways, i wont pass in another arg euklidian_result_t calc_d = euklidian_algorigthm_extended(fi_n, e);