Description
Summary
Currently, the tendermint crypto Private and Public key implementations are defaulted to the Tendermint secp256k1 implementation here0, here1, here2 and here3 and it would be nice for this to be modular and have the option to specify the interface implementation for application specific signing and addressing needs.
Problem Definition + Proposal
This feature is needed to be able to swap out signing, addressing and signature verification from the defaulted implementations. For example if an application wanted to be able to use Ethereum signatures and addressing to be able to keep consistent state or just be able to import a key and have the same address (reformatted to bech32 style but still able to retrieve the same address from bytes) they would have to reimplement all of the keys commands and functionality just to change the type. In the case of Ethereum signatures and addressing, the signature may be interchangeable in some way (I'm not sure the exact differences but they are both ECDSA signatures) but the addressing that is done implicitly from the implementation that follows part of the bitcoin addressing style of RIPEMD160(SHA256(pubkey))
cannot be changed and from that you cannot derive, for example, an Ethereum address.
This feature would greatly help applications like Ethermint which has state and balances that would need to be mapped from their existing private keys/ seed but also for any bridge contract to a CosmosSDK zone which uses a consistent key implementation as the departure chain to not rely on a user to generate a new key and provide that address as extra data.
In the future, it would be nice to also use other curves other than secp256k1 (seems this framework is set up already so I won't go into detail).
The only issue I see with this is when a user imports a key from a familiar chain to Cosmos, they may not notice the bech32 reformatting of the address, so would be nice to also add a way to print out an additional field where an application developer can add an additional KeyOutput field to indicate a derivation from the key of their choosing.
This proposal would be to allow the Tendermint Privkey and Pubkey interface implementations to be swapped out for any application specific needs.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity