Skip to content

Instantly share code, notes, and snippets.

@npilla2023
Last active August 5, 2020 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save npilla2023/bf88e97c0e82dba6143c524ffeb60cb8 to your computer and use it in GitHub Desktop.
Save npilla2023/bf88e97c0e82dba6143c524ffeb60cb8 to your computer and use it in GitHub Desktop.

Level 1: Finding a Shared Key

Thanks to Diffie-Hellman Key Exchange, the STARS can share secret messages that the CRABS will never crack. The STARS want to ensure that you can properly execute this process, so this is your chance to prove yourself as a promising agent. Agent Ocean will be training you.

Here is the information you have been briefed with:
Your super secret value is: 109306739515372000536684615587060142161
Agent Ocean's public value is: 54224788903180805177809934100426766384

Complete the following steps in order to find your shared secret phrase with Agent Ocean before you can start sending secret messages. And yes, we will be using the terminal and python for this mission.

  1. Open up the TERMINAL in a new tab.
  2. Type the following commands into the terminal to prepare the script that you will need to use:
    wget https://prof.ninja/dhe.sh
    chmod +x dhe.sh
  3. Now type this command into the terminal, substituting your super secret value for <your_secret> and Agent Ocean's public value for <their_public>:
    ./dhe.sh <your_secret> <their_public>
  4. The returned number is your shared secret phrase with Agent Ocean.
  5. Store the shared secret phrase because you will need to use it later.

What is your shared secret phrase with Agent Ocean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment