Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Keyring: AES key unwrap error #7894

Closed
4 tasks
ghost opened this issue Nov 11, 2020 · 5 comments
Closed
4 tasks

Test Keyring: AES key unwrap error #7894

ghost opened this issue Nov 11, 2020 · 5 comments
Labels
C:Keys Keybase, KMS and HSMs T:Docs Changes and features related to documentation.

Comments

@ghost
Copy link

ghost commented Nov 11, 2020

Summary of Bug

Test keyrings created with 0.39.1 on go 1.15.x break with the following error after re-compiling with the 0.39.2 backports commit hash.

NOTE: This only seems to affect test keyrings generated with go1.15.x on 0.39.1 - If you generated the test keyring on go1.14.x (or even go1.13.x) with a previous cosmos sdk version, this error does not occur.

ERROR: aes.KeyUnwrap(): integrity check failed.

Version

git commit hash: 792c7bc

Steps to Reproduce

  1. Using go1.15.x, generate a test keyring with 0.39.1 of the cosmos sdk
  2. Recompile with the above commit hash, for example in our go.mod: github.com/cosmos/cosmos-sdk v0.39.2-0.20201016080604-792c7bc716f0
  3. Run a app keys list --keyring-backend test

Workaround: export private keys before re-compiling, then import -or- delete the test keyring then restore keys from mnemonics


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alessio
Copy link
Contributor

alessio commented Nov 12, 2020

Thanks for taking the time to report this bug and helping to make Cosmos SDK better. Could you please tell me exactly what environment is this reproducible with? Please provide the following details too:

  1. Operating System:
  2. Windows, Mac or Linux
  3. If Linux, the enrivonment is headless or GNOME/KDE/Xfce/others?
  4. --keyring-backend option

Thanks.

@ghost
Copy link
Author

ghost commented Nov 12, 2020

OS: Linux - Ubuntu 20.04 LTS w/ GNOME. Keyring is as stated above: --keyring-backend test

@ghost
Copy link
Author

ghost commented Nov 12, 2020

A also was just able to reproduce this on macOS Catalina Version 10.15.7. Thank you.

@alessio
Copy link
Contributor

alessio commented Nov 12, 2020

When you pass --keyring-backend=test you don't use OS backends (libsecret on GNOME, kwallet on KDE, keychain on MacOS, etc). Plus, please beware that --keyring-backend=test is for testing purposes only, i.e. validators that join testnets should not use it. Alternatively, they can use --keyring-backend=file or --keyring-backend=pass. Note that the latter depends on the pass binary, see https://www.passwordstore.org/ for more information how to install it.

alessio pushed a commit that referenced this issue Nov 13, 2020
alessio pushed a commit that referenced this issue Nov 13, 2020
@alessio
Copy link
Contributor

alessio commented Nov 13, 2020

This issue is now documented as a known one in Cosmos SDK v0.39.2's release notes. Hence closing.

@alessio alessio closed this as completed Nov 13, 2020
@alessio alessio added T:Docs Changes and features related to documentation. C:Keys Keybase, KMS and HSMs labels Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Keys Keybase, KMS and HSMs T:Docs Changes and features related to documentation.
Projects
None yet
Development

No branches or pull requests

1 participant