Closed parviz-mv closed 1 year ago
getPublicKey
. It's a real compressed point..subarray(1)
.Point.fromHex
, because the first (parity) byte is ambiguous and could mean 2 different points.I think our implementation is proper. It's flexible. Maybe a bit more docs would be nice.
Improved in 9b7889e
@paulmillr I got it! Thanks!
Hi! I have tested ECDH with P-256, P-384, and P-521 curves in Golang, Node.js, and the noble/curves library. First, I generate a key pair and then retrieve the shared key. For all curves, I obtain a shared key that is more than 1 byte. For example, for the P-256 curve, I get a shared key with 33 bytes instead of 32. In Golang and Node.js, I receive 32 bytes, but with the noble/curves library, I get 33 bytes. So, why is there such a discrepancy?