From 5a0bc7098461e2d20bc9d9c3a4ce7ac0379ecd97 Mon Sep 17 00:00:00 2001 From: Aman Priyanshu Date: Mon, 24 Aug 2020 08:27:57 +0530 Subject: [PATCH] fixing latex issues --- Google-CTF-2020/Cryptography/Chunk Norris.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Google-CTF-2020/Cryptography/Chunk Norris.md b/Google-CTF-2020/Cryptography/Chunk Norris.md index 194f9fb..0e0a053 100644 --- a/Google-CTF-2020/Cryptography/Chunk Norris.md +++ b/Google-CTF-2020/Cryptography/Chunk Norris.md @@ -56,16 +56,13 @@ So all it boils down to is finding the s value of both the primes and we can bre -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. +So if we can get the s values for both of the primes, we can break the encryption!. Let the primes be and and let the s values for them be and respectively. If we look at the equation for $n$, we can see the 64 MSB bits will be a result of the multiplication of the first term's MSB bits. Similarly the 64 LSB bits will be the result of the product last term's LSB bits. Using these two relation we can basically get the value of $s_1 * s_2$ and then it's just a matter of bruteforcing over it's divisors. -$$ -64 LSB \ bits \equiv [(a^{15}s_1 \mod 2^{64})*(a^{15}s_2 \mod 2^{64}) ]\mod 2^{64} \equiv a^{30}s_1s_2 \mod 2^{64} -$$ -$$ -64 MSB \ bits = s_1*s_2 -$$ + + + So here's the full implementaion in sage: ```py