Very long signature with Slush wallet

I’m investigating signPersonalMessage method of SUI wallets. With Suiet, serialized signature has length 97 bytes, which is in line with how it is serialized by @mysten/sui (look at dist\esm\cryptography\signature.js):

const pubKeyBytes = publicKey.toRawBytes();
const serializedSignature = new Uint8Array(1 + signature.length + pubKeyBytes.length);
serializedSignature.set([SIGNATURE_SCHEME_TO_FLAG[signatureScheme]]);
serializedSignature.set(signature, 1);
serializedSignature.set(pubKeyBytes, 1 + signature.length);
return toBase64(serializedSignature);

In case of ed25519, public key length is 32, signature length is 64, then 64 + 32 + 1 = 97.

Now let’s use SDK’s useSignPersonalMessage example (sorry, cannot post links, but in is on sdk_mystenlabs_com documentation)

When connecting to Suiet wallet, signature has 97 bytes. But when using Slush, it is very long (close to 1KB). Looks like a bug in Slush?

4 Likes