Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Bump k256 to 0.11 #12619

Closed
wants to merge 2 commits into from
Closed

Bump k256 to 0.11 #12619

wants to merge 2 commits into from

Conversation

fjarri
Copy link

@fjarri fjarri commented Nov 5, 2022

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Nov 5, 2022

User @fjarri, please sign the CLA here.

@@ -41,7 +41,7 @@ impl ECDSAExt for Public {
let uncompressed = pub_key.to_encoded_point(false);
// convert to ETH address
<[u8; 20]>::try_from(
sp_io::hashing::keccak_256(&uncompressed.as_bytes()[1..])[12..].as_ref(),
sp_io::hashing::keccak_256(uncompressed.as_bytes())[12..].as_ref(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (standard) byte-encoded form for uncompressed pub keys still uses the first byte to express that the byte sequence represents the uncompressed form (i.e. 0x04 value for the tag).
(https://github.com/RustCrypto/formats/blob/bbab401934a2e93d28053fd74613ffef74cd6e88/sec1/src/point.rs#L132)

@ggwpez
Copy link
Member

ggwpez commented Nov 5, 2022

This is already happening here #12085 and paritytech/polkadot#6238

@ordian ordian closed this Nov 5, 2022
@fjarri fjarri deleted the bump-k256 branch November 5, 2022 16:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants