diff options
Diffstat (limited to 'content/articles/2022-09-19-gctf-readysetaction.md')
-rw-r--r-- | content/articles/2022-09-19-gctf-readysetaction.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/articles/2022-09-19-gctf-readysetaction.md b/content/articles/2022-09-19-gctf-readysetaction.md index e0f9b22..0d5b719 100644 --- a/content/articles/2022-09-19-gctf-readysetaction.md +++ b/content/articles/2022-09-19-gctf-readysetaction.md @@ -39,15 +39,15 @@ The first item already seems like the solution: > n. In this case, ciphertexts can be decrypted easily by taking the eth root of > the ciphertext over the integers. -Which would mean that $\sqrt[3]{c}$ is a solution _if_ it didn't fail because -$m$ is too large. However +Which would mean that $\sqrt[3]{c}$ is a solution _if_ $m$ is small enough. +However $c = m^3 \mod n \\$ -So the exponentiation could yield a much higher result that dont get because it -is wrapped at $n$. So: +so the exponentiation could yield a much higher result that we dont get because +it is wrapped at $n$. So we can try out how often it wrapped: -$m = \sqrt[3]{c + x*n}, x \in \N\\$ +$m = \sqrt[3]{c + x*n} \quad x \in \N\\$ where $x$ can be brute-forced if $m$ is sufficiently small. Back in python it looks like this: |