Why won't [email protected] produce the same computeSharedSecret as ethers-5.2

24 views Asked by At

I'm developing a webApp + API that are meant to exchange compressedPublicKey pairs and compute a shared secret, but my nodeJS ([email protected]) method produces a very different result to my webApp (ethers-5.2):

APP (5.2) compressedKey: 0x021c0895bcfe89332ff41ecbdb8ea3e357df3bdab78805330d7e7350947bb79bb7

  • computeSharedSecret(): 0x1a59588bfea7b7cb0f89cfc5225f1928a35376edee9ead527a3ce650c6a717e8

API (6.2.3) compressedKey: 0x03a630e202ec7f31c6e542de59df1a0b8cf3ad80a8c7c0f781b3aa29daa43a276b

  • computeSharedSecret(): 0x041a59588bfea7b7cb0f89cfc5225f1928a35376edee9ead527a3ce650c6a717e8de2465a0fa64173f0ad54006536cd5a4e809edf0ed46a4a835ac7ea56052e0fb

They're supposed to produce the same result... Any pointers? I assume it's ethers versioning or an encoding fix i need to apply

0

There are 0 answers