AvailX / avail-wallet

An open source, private, self-custodial wallet. Built on the Aleo network.
https://avail.global
Apache License 2.0
20 stars 7 forks source link

[Bug]: Signature generated from sign message cannot be verify in Aleo SDK and Leo cli #129

Open zklim opened 2 months ago

zklim commented 2 months ago

Contact Details

Telegram

contact

zklim5389

What happened?

Signature generated from sign message could be wrong because of incorrect conversion of message string to field type. Line to be fix: https://github.com/AvailX/avail-wallet/blob/02caa2d4d6a9c557d506259baafca01586246604/src-tauri/src/services/local_storage/utils.rs#L286

The easier way is to use sign_bytes() from snarkVM directly so it handle conversion to field the same way in everywhere: https://github.com/AleoNet/snarkVM/blob/be171ce0720544c2bc51e27e1674a62fff585adc/console/account/src/signature/sign.rs#L57

Version

v0.1.0

What operating system are you using?

macOS (Apple Silicon)

Relevant log output

No response

Code of Conduct