Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 480 Bytes

File metadata and controls

13 lines (8 loc) · 480 Bytes

Tan

  • Category: Crypto
  • Score: 418/500
  • Solves: 32

Description

tan(x) is a broken hash function in terms of collision resistance and second preimage resistance. But you surely can't find the preimage of tan(flag), right?

Solution

Let the flag be $m$ and the output be $t$, then $\arctan(t)+k\pi \approx m$ with some precision loss. Note that $m$ is an integer, so we can use LLL to minimize the decimal part of $\arctan(t)+k\pi$ then $m$ will magically appear.