Is there a code or script to do the math?
any cryptography library that supports elliptic curve cryptography should have the math, may not be a public member in some cases since these are internals of calculation. depending on the language you want there are a bunch of them for example python-ecdsa is a python library that has all of this.