You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Experiencing problems? Have you tried our Stack Exchange first?
This is not a support question.
Motivation
An ECDSA public key can be represented in either compressed (33 bytes) or uncompressed (65 bytes) form. While functions such as sp_io::crypto::secp256k1_ecdsa_recover() and sp_io::crypto::secp256k1_ecdsa_recover_compressed() facilitate public key recovery, there is currently no method available for converting a public key between these forms.
Request
Introduce a method to serialize an ECDSA public key into either compressed or uncompressed form.
Solution
Add a function to sp_io::crypto with the following signature:
This function will accept a public key and a boolean flag indicating whether the output should be in compressed form, returning the serialized public key accordingly.
Are you willing to help with this request?
Yes!
The text was updated successfully, but these errors were encountered:
All of the above host functions can be implemented using a combination of verify_prehased, recovery_prehased, and serialize. I’m not fully aware of the rationale behind providing these specific functions, and I understand that the existing host functions cannot be removed due to the need to verify old blocks. However, it would have been preferable if these three functions had been provided from the beginning.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
An ECDSA public key can be represented in either compressed (33 bytes) or uncompressed (65 bytes) form. While functions such as
sp_io::crypto::secp256k1_ecdsa_recover()
andsp_io::crypto::secp256k1_ecdsa_recover_compressed()
facilitate public key recovery, there is currently no method available for converting a public key between these forms.Request
Introduce a method to serialize an ECDSA public key into either compressed or uncompressed form.
Solution
Add a function to
sp_io::crypto
with the following signature:This function will accept a public key and a boolean flag indicating whether the output should be in compressed form, returning the serialized public key accordingly.
Are you willing to help with this request?
Yes!
The text was updated successfully, but these errors were encountered: