This repository was archived by the owner on Aug 2, 2022. It is now read-only.
Add support for uncompressed public key type #6718
Labels
CONSENSUS
Introduces a change that may modify consensus protocol rules on an existing blockchain.
enhancement
Background
Blockchains including EOSIO usually support ECDSA secp256k1 to verify their transactions. However, in some blockchains, the result of recovering key from signature is different from EOSIO, because they use uncompressed key (65 bytes) instead of compressed one (33 bytes) which EOSIO uses.
As far as I know, the main strategy to improve EOSIO scalability is IBC among EOSIO-based sidechains or fork chains. If uncompressed public key type is supported in EOSIO smart contract, we can achieve better interoperability among heterogeneous blockchain networks.
Proposal
Add intrinsic API for uncompressed public key type
Available options
New types
capi_public_key_point
andeosio::public_key_point
are addedeosio::public_key
) to uncompressed one (eosio::public_key_point
)outlen
determines which type of public key (compressed/uncompressed) needs to be serializedrecover_key
for recovering uncompressed public key from signature, the size ofpublen
determines which type of public key needs to be recoveredOther considerations
Currently, wrapper classes of
secp256k1
andsecp256r1
provide recover() method which returns only compressed public key. If 3rd option is adopted, there can be two way to make it, one is recovering compressed and decompress it, or the other is adding ability to recover uncompressed public key to wrapper classes.The next commits are very early stage impelmentation of this proposal.
conr2d@0458416
conr2d/fc@34cd44a
The text was updated successfully, but these errors were encountered: