It is the math used for one type of public key systems but not all public key systems and not the system used by Bitcoin.
Bitcoin uses ECDSA (Elliptic Curve Digital Signature Algorithm)
https://en.wikipedia.org/wiki/Elliptic_Curve_DSAIt derives its security from the fact that there at the current time, solving the discrete logarithm problem is infeasible.