libsignal-node icon indicating copy to clipboard operation
libsignal-node copied to clipboard

fix: generateKeyPair for non node environments

Open samuelscheit opened this issue 2 years ago • 0 comments

Node's generateKeyPairSync function generates a public key of length 44, which then gets sliced down to 33 bytes with the first byte of the sliced down key being the number 5. However the CurveJs generateKeyPair function generates a public key of length 32. I added the number 5 as a prefix to the CurveJs public key to be consistent with the node function.

samuelscheit avatar May 06 '23 22:05 samuelscheit