Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Softsign cannot import keys #290

Closed
1ultimat3 opened this issue Jul 6, 2019 · 10 comments
Closed

Softsign cannot import keys #290

1ultimat3 opened this issue Jul 6, 2019 · 10 comments

Comments

@1ultimat3
Copy link

1ultimat3 commented Jul 6, 2019

It is not possible to test tmkms using softsign based on an existing priv_validator.json.

I don't know how this line got there, but it should be rather SecretKeyEncoding::default() instead of IDENTITY:
https://github.com/tendermint/kms/blob/20172d91e270a39907d2e96fde1b94bf9958c961/src/keyring/ed25519/softsign.rs#L21

It seems that #135 already stated this issue. Is softsign eol?

@1ultimat3
Copy link
Author

This is how I tried to "import" the key:
https://gist.github.com/mateuszk87/628283e1581d8e247807e819c2913cab

@tarcieri
Copy link
Contributor

tarcieri commented Jul 7, 2019

As you noted this is a dupe of #135, however #135 was closed by its original reporter without ever receiving a proper fix so the issue got lost in the shuffle. Thanks for reopening it.

Is softsign eol?

It's not recommended for production usage (we could perhaps have some clearer documentation and messaging around that) and therefore receives less attention and automated testing than the HSM backends, but it is not "EOL" and will continue to be supported as a signing method at least for the immediate future.

@1ultimat3
Copy link
Author

1ultimat3 commented Jul 7, 2019

There are different use cases for soft sign. E.g.: first step of transition to HSM, testnets or a disaster recovery option. We are trying to use this feature for some security checks (non-production) and we need to import a test key (without forking and modifying the kms source code).

@valuead
Copy link

valuead commented Jul 10, 2019

Can @tarcieri kindly help community on how to solve this issue please.

@tarcieri
Copy link
Contributor

@valuead I plan on working on it in the next few days

@AFDudley
Copy link

Hi Folks, is there a branch with these changes someplace?

@tarcieri
Copy link
Contributor

@AFDudley unfortunately I haven't gotten to it yet, but plan on it this week

@valuead
Copy link

valuead commented Jul 21, 2019 via email

tarcieri pushed a commit that referenced this issue Jul 25, 2019
This fixes the inconsistencies between Base64 and binary/"raw" private
keys, and adds key conversion which can take a `priv_validator.json`
file or a "raw" (i.e. binary) private key and convert it to the Base64
format used by the `softsign` backend.

This should be sufficient to resolve the problems in #290, although I
also plan on making the private key format a configuration option.
tarcieri added a commit that referenced this issue Jul 25, 2019
…subcommand

softsign: Fix private key decoding + import command (closes #290)
@tarcieri
Copy link
Contributor

Fixed in #304, which provides a wide range of options for key format support, both for the softsign provider itself, and as a CLI subcommand (tmkms softsign import) for converting key formats.

@valuead
Copy link

valuead commented Jul 25, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants