-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ais3Final2018/mama] How to know the gadget to swap 0 and p-2 #1
Comments
Thank you for liking this challenge. Playing with smaller p (e.g. 7, 17, 31) could help you find it. Bruteforce all possibilities is very fast even with unoptimized python code. p4 used the gadget For mapping gadget, it is more difficult to interpret the bruteforce result because of the multiplicative inverse. I find it when think what these two operations, add and mul, can do. I noticed that addition won't change the difference between two numbers. To change the difference to one, you have to divide the difference. |
mm, very interesting. I am wondering if there is any way to prove the gadgets are existed. let me try it. |
Here is my idea. It is very similar to the original writeup. I try to explain the behaviour.
If I made any mistake, just let me know. |
Nice analysis. |
Hello,
I really appreciated for this chal. But I am a little curios about how to find the gadget to swap (k / 2 + 1) * 2 - 2 and the gadget to map to 0 and p-1.
Thanks,
Lattice
The text was updated successfully, but these errors were encountered: