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

softsign key invalid length #135

Closed
yulidai opened this issue Dec 7, 2018 · 6 comments
Closed

softsign key invalid length #135

yulidai opened this issue Dec 7, 2018 · 6 comments

Comments

@yulidai
Copy link

yulidai commented Dec 7, 2018

the length of signing.key which is generated by using tmkms keygen signing.key is 44

then editing tmkms.toml like below:

[[providers.softsign]]
id = "test-chain-PGCIY1"
path = "/Users/leedy/Dev/kms/tests/support/signing.key"

after run tmkms start i'll get error can't open /Users/leedy/Dev/kms/tests/support/signing.key: invalid length: invalid length

the default signing.key is TEST KEY ONLY: DO **NOT** USE!!1 but success, it's length is 32

how should i do for fixing this problem? thanks :)

@tarcieri
Copy link
Contributor

tarcieri commented Dec 7, 2018

It looks like the the key encoding in the softsign decoder is hardcoded to IDENTITY (i.e. raw binary):

https://github.com/tendermint/kms/blob/master/src/keyring/ed25519/softsign.rs#L21

It needs to be updated to use SecretKeyEncoding:

https://github.com/tendermint/kms/blob/master/src/keyring/mod.rs#L18

@yulidai
Copy link
Author

yulidai commented Dec 8, 2018

@tarcieri thank you, successfully started!

but after that, the height of tendermint seems can't grow up.

should i copy the content of signing.key to priv_validator.json of tendermint?
if i need to do so, then what should i do for generating public key of signing.key?

thank you!

@tarcieri
Copy link
Contributor

The soft signer unfortunately hasn't gotten a lot of attention since we've mainly been focusing on YubiHSM2 (soft signer won't be allowed in production since HSMs are a requirement).

If you have a recent version of tmkms (v0.2.2+), I believe tmkms start -v will print out the soft signer's bech32 address. If you have that, you can use this procedure to enroll a validator with a key in tmkms:

https://forum.cosmos.network/t/ann-tendermint-kms-v0-2-validator-signing-support/1361/30

It might be best to continue conversations about getting your validator online there so we can use this issue for tracking the soft signer bugfix.

@yulidai
Copy link
Author

yulidai commented Dec 12, 2018

@tarcieri thanks a lot, successed by using signer's bech32 address in gaiad.

Thanks for your patience again

@valuead
Copy link

valuead commented Jul 10, 2019

@yulidai can you share with us please your working version?

@yulidai
Copy link
Author

yulidai commented Jul 10, 2019

@yulidai can you share with us please your working version?

At that time, the test passed tmkms 0.2.3

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

3 participants