You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to import a key with a wrong passphrase a sdkerrors.ErrWrongPassword should be expected (not sure if its good idea to give that information) but a ciphertext decryption failed is returned. Turns out there’s a mistake when checking the error returned by xsalsa20symmetric.DecryptSymmetric. As you can see in the following code snippets one of the strings starts with a capital letter while the other don’t, which makes the comparation to fail.
Summary of Bug
When trying to import a key with a wrong passphrase a
sdkerrors.ErrWrongPassword
should be expected (not sure if its good idea to give that information) but aciphertext decryption failed
is returned. Turns out there’s a mistake when checking the error returned byxsalsa20symmetric.DecryptSymmetric
. As you can see in the following code snippets one of the strings starts with a capital letter while the other don’t, which makes the comparation to fail.cosmos-sdk/crypto/armor.go
Lines 202 to 205 in 3c53870
cosmos-sdk/crypto/xsalsa20symmetric/symmetric.go
Lines 51 to 53 in 3c53870
The text was updated successfully, but these errors were encountered: