X

JerseyCTF 2025: Sandy Shores

Mar 30, 2025

author: @wxrth

Challenge Info:

Category: Cryptography

TL;DR:

I found the missing coefficients of an elliptic curve using comic book clues, confirmed a given point was on the curve, and performed scalar multiplication (27P) with an online ECC calculator to find the thief’s coordinates and get the flag.

The Challenge (Solution):

The description talks about some detective finding a half-erased elliptic curve equation on the beach. The puzzle gives:

\[y^2 = x^3 + \underline{\quad}x + \underline{\quad} \pmod{373}\]

Alongside this, there’s a point (7,39) and the mysterious number 27. There are also two cryptic clues about comics:

  1. Fantastic Four “Wanted Dead or Alive” issue number?
  2. Alfred’s first bat cave appearance comic’s original price?

Step 1 - Filling in the blanks:

Quick comic trivia Google-search gave me:

  1. Fantastic Four Wanted Dead or Alive: Issue #7
  2. Alfred’s first bat cave comic appearance price: 10 cents

Now, the curve becomes:

\[y^2 = x^3 + 7x + 10 \pmod{373}\]

Step 2 - Lets verify the equation:

Next, I quickly plugged the provided point (7,39) into the equation just to be safe:

\[y^2 = x^3 + 7x + 10 \pmod{373}\] \[39^2 = 1521 \equiv 29 \mod{373}\] \[7^3 + 7(7) + 10 = 343 + 49 + 10 = 402 \equiv 29 \mod{373}\]

Since both sides are congruent modulo 373, the point (7, 39) lies on the curve.

Nice it checks out!

Step 3 - The number 27:

The challenge explicitly provided the number 27, hinting strongly that I needed to perform scalar multiplication (a common step in elliptic curve cryptography challenges). Now, elliptic curve scalar multiplication by hand can get messy fast. I found this cool online ECC calculator and punched in all the values:

The calculator spit out the answer instantly: \(27 \,\,× \,\,(7,39) = (42, 270)\)

🚩 Final flag: jctfv{(42,270)}