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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frame/support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl-trait-for-tuples = "0.2.2"
smallvec = "1.8.0"
log = { version = "0.4.17", default-features = false }
sp-core-hashing-proc-macro = { version = "5.0.0", path = "../../primitives/core/hashing/proc-macro" }
k256 = { version = "0.10.4", default-features = false, features = ["ecdsa"] }
k256 = { version = "0.11.6", default-features = false, features = ["ecdsa"] }

[dev-dependencies]
serde_json = "1.0.85"
Expand Down
2 changes: 1 addition & 1 deletion frame/support/src/crypto/ecdsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

)
.map_err(drop)
})
Expand Down