Demo example of using go ECDH-ES with EC key types: P-256, P-384 and P-521 and OKP key type : X25519 for generate key pair and get shared key.
Before start you need to clone this repository:
git clone git@github.com:parviz-mv/go-ecdh-es-example.gitFor run example in root directory of the cloned repository in terminal run this command :
go run .Also, you can run with special curve :
go run . -curve P-256 // variants: P-256, P-384 , P-521 and X25519This project created for further use in react native via gomobile. You can also use this example in own projects.