Official discussion thread for Rookie Mistake. Please do not post any spoilers or big hints.

Sign In to comment.

- 4.3K All Categories
- 3K Discussion
- 1.5K Machines
- 556 Challenges
- 28 RastaLabs
- 161 Exploits
- 52 Programming
- 751 Off-topic
- 1.2K Tutorials
- 654 Writeups
- 106 Video Tutorials
- 194 Tools
- 292 Other
- 35 Links
- 35 News

## Comments

God that last trap got me killing myself inside LOL

That being said, am I getting senile or should this work in Sage?

whereas the answer should be 5? If you change

`ord`

to 6 (its real order) the same occurs.Had to whip out my own implementation to get this to work.

Nice challenge @willwam845!

@ngoctnq This is indeed weird in my opinion. It does work for ord = 6, or without specifying an order in my case

But as the doc states:

`ord - integer (multiple of order of base, or None)`

, any multiple should work... but it doesn't...OSCP

@ArtemisFY Hey, thanks for the help with the other chall BTW, which version of Sage are you cranking? I tried both 9.1 and 9.2 through

`conda`

and both are bad. Guess I’ll file a bug report or something.Edit: Weird.

`ord=6`

(and consequently the code to solve this problem) works now on my machine. Can't trust anything these days.So googling around, I got a way to reverse the second part of the flag but for the first part I'm at a bit of a loss. Is it similar to the second half decryption?

If what I said helped you you can always send some respects ^^

I really don't understand how to solve the first one since some important values are not co prime

@underc0very0 For the first part, I don't know if this is hinting too much but it's likely that the non-coprime part doesn't wrap around the modulus. And even if it does, there's an algorithm for it

Hope this hint helps Fukurou too.

I solved the first part very easily but stuck at the second part

I think for anyone stuck on the first part he can use some learning from cryptohack.org

i feel really shocked that most of you guys solving the second part before the first

I googled a lot but found nothing

hope someone drops a hint for the second part soon

Nice challenges @willwam845

Hint for second part: Chinese theories may help you.

Nice challenge @willwam845

The second part is definitely easier than the first. Google is your friend and plenty of hints already. If you are still stuck on the first part, here is my hint: DONT think about RSA, what would you do to unsquare a number?

If what I said helped you you can always send some respects ^^

I had to take a math course to solve this...

Hello everyone!

I have solved the DH part but I am really stuck on the RSA part. I think I have found what mathematics are required but I don't know how to use them to solve the problem...

Any nudge in pm would be appreciated!

Type your comment> @Artf7 said:

I'm not totally clear about what the

`ord`

parameter actually exists for, though-- doesn't sage automatically calculate it?edit: Ok nevermind, I think I figured out why one might want to do that (especially in this case)And in @ngoctnq's example, the integer

`6*12`

isn't a multiple of the base, so why would it be expected to work?edit: order ≠ base, nevermind> And in @ngoctnq's example, the integer `6*12` isn't a multiple of the base, so why would it be expected to work?

`6*12` is a multiple of the order of the base `Mod(4, 7 * 13)`, which is 6:

```

assert (4 ** 6) % (7 * 13) == 1

```

Edit: Does anyone know why Markdown does not work?

@ngoctnq said:

I was confused. You are right. The base is 4, and

`Mod(4, 7*13).multiplicative_order() == 6`

, andthe desired order is 6*12=72.

When I examine the source in generic.py, as well as the pattern of which values of

`ord`

are accepted by discrete_log(), I don't readily understand why it likes some and not others, either.