From f01ec9beffc49fdb7efe15972dd247815c5c8b78 Mon Sep 17 00:00:00 2001 From: Aman Priyanshu Date: Mon, 24 Aug 2020 08:24:09 +0530 Subject: [PATCH] Update Chunk Norris.md --- Google-CTF-2020/Cryptography/Chunk Norris.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Google-CTF-2020/Cryptography/Chunk Norris.md b/Google-CTF-2020/Cryptography/Chunk Norris.md index b5471b0..861b8ac 100644 --- a/Google-CTF-2020/Cryptography/Chunk Norris.md +++ b/Google-CTF-2020/Cryptography/Chunk Norris.md @@ -54,9 +54,7 @@ def gen_prime(bits, s): So all it boils down to is finding the s value of both the primes and we can break the modulus and hence the RSA. From the generation function, we can write the equation of the primes as: -$$ -P = s .{2^{960}} + (as \mod {2^{64}})*2^{896} + ...... + (a^{14}s \mod 2^{64})*2^{64} + (a^{15}s \mod 2^{64}) -$$ +![formula](https://render.githubusercontent.com/render/math?math=P = s .{2^{960}} + (as \mod {2^{64}})*2^{896} + ...... + (a^{14}s \mod 2^{64})*2^{64} + (a^{15}s \mod 2^{64})) So if we can get the s values for both of the primes, we can break the encryption!. Let the primes be $p$ and $q$ and let the s values for them be $s_1$ and $s_2$ respectively. @@ -100,4 +98,4 @@ print(long_to_bytes(pow(c, d, n)).decode()) ### Flag `CTF{__donald_knuths_lcg_would_be_better_well_i_dont_think_s0__}` ---- \ No newline at end of file +---