libsignal-node
libsignal-node copied to clipboard
fix: generateKeyPair for non node environments
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.