@staticmethod
def uncompress_public_key(public_key):
    """
        Converts compressed public keys to uncompressed public keys

        Compressed public key:
                   ┌ 0x02 + x, if y mod 2 = 0
         f(x, y) = │
                   └ 0x03 + x, if y mod 2 = 1
        Uncompressed public key:
         f(x,y) = x + y

        https://bitcointalk.org/index.php?topic=644919
        :param public_key: compressed public key (string)
        :return: uncompressed public key (string)
        """
    p = (
        115792089237316195423570985008687907853269984665640564039457584007908834671663
        )
    y_parity = int(public_key[:2]) - 2
    x = int(public_key[2:], 16)
    a = (pow(x, 3, p) + 7) % p
    y = pow(a, (p + 1) // 4, p)
    y = -y % p if y % 2 != y_parity else y
    return '{:x}{:x}'.format(x, y)
