Popo [htb] [crypto] [hints]

  • Compute the First Ciphertext (c1)

    • Send the message m = 0 to the server.
    • Record the ciphertext c1 and modulus n from the server’s response.
  • SCompute the Second Ciphertext (c2)

    • Send the previously obtained c1 back to the server as the message.
    • Record the new ciphertext c2 from the server’s response.
  • Calculate r^n (rn) and g^m (gm)

    • Compute rn using: rn = (c2 * c1^(-1) mod n^2).
    • Compute gm using: gm = (c1 * (r^n)^(-1) mod n^2).
  • Validate gm

    • Send gm to the server for validation.
    • The server returns λ if gm is correct.
  • Flag

    • Compute the flag using: FLAG = (gm - 1) / n.
    • Convert the result to bytes and decode it to get the flag.