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

Bump k256 to 0.11#12619

Closed
fjarri wants to merge 2 commits intoparitytech:masterfrom
fjarri:bump-k256
Closed

Bump k256 to 0.11#12619
fjarri wants to merge 2 commits intoparitytech:masterfrom
fjarri:bump-k256

Conversation

@fjarri
Copy link
Copy Markdown

@fjarri fjarri commented Nov 5, 2022

@cla-bot-2021
Copy link
Copy Markdown

cla-bot-2021 bot commented Nov 5, 2022

User @fjarri, please sign the CLA here.

// 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
Copy Markdown
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
Copy Markdown
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