https://github.com/wyc/haschain/blob/master/Secp256K1.hs
Should probably wrap it into a Group or something. Of course it's not secure, just for fun.