Diffie hellmann

Diffie hellmant algorithm is used for established for common secret between client and server. Your goal is to obtain secret key. You have only one endpoint /encrypt/. That endpoint takes integer from input and return its power modulo given prime you do not know.

Your goal is to exploit this endpoint and obtain secret key since prime prime choise is vulnerable. It might really help you to obtain prime by exploiting this endpoint before you start to obtaining secret key.

Use delay between each request at least 0.1 second so that you do not crash server and do not get blocked. There exists solution that can crack the code under the minute. So delay should not limit you. If you use python scaffold the delay is already there hardcoded.

It is strongly recommended to use programming in this task since attack requires quite many requests on server. However you can use following form for solution as well. It is designed to be usefull in debugging and getting in tourch with the assignment and codebase.


Result: