I am working on a Golang code similar to Signal protocol. I need to modify it. I am confused on tripartite Diffie-Hellman handshake part of code, i.e. why public key has two separate parts as compared to private key which has only one part in bytes as shown below. I can more info if needed. Thanks.

enter image description here

  • 1
    $\begingroup$ Start with a primer on elliptic curve cryptography? $\endgroup$ Commented Mar 24, 2019 at 22:24
  • 1
    $\begingroup$ And consider using Noise if you need to design a new protocol? $\endgroup$ Commented Mar 24, 2019 at 22:24
  • $\begingroup$ Thanks a lot. A lecture on cryptography made me understood it. $\endgroup$ Commented Mar 24, 2019 at 23:20

1 Answer 1


The answer to this question is simple. In simple words, in elliptic curve cryptography, the public key is calculated by multiplying the private key value $s$ with the base point $G$, which results a point on the elliptic curve point: $W = s \cdot G$. This point consists of has two values on the x-axis and one on y-axis if the curve is considered to be within a 2D coordinate system.

Here is a link which gives a good idea of it: ECC with Diffie-Hellman.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.