added sqrt function and pub key decompress function