Closed arik-so closed 8 years ago
Hi arik, this can be easily done using the mulPoint method. $bitcoinECDSA->mulPoint($k, $point); $k is your private key as a GMP resource, and $point an array with the format ['x'=>(GMP resource), 'y' => (GMP resource)]
If you give me an ECDH encoding standard (maybe DER) I can add a method that render it that way.
Thanks, I found the mulPoint method and implemented Diffie Hellman. I'm applying a sha256 to the result (which is the new point in DER format) to restrict the output to 32 bytes so it can be used as an AES-256 key.
Hi! It would be super useful if you implemented a method to support Diffie Hellman. That is, given one keypair's public key and another keypair's private key, multiplying the two yields a very useful symmetric key.