rust-bitcoin-unsafe-fast/src
Andrew Poelstra 2c1077e681
Merge rust-bitcoin/rust-bitcoin#829: Don't allow uncompressed public keys without prefix 0x04
c0d36efb8b Don't allow uncompressed public keys without prefix 0x04 (Noah Lanson)

Pull request description:

  Was following #520 and through it was a quick fix that I could do:

  #### Changes:
  - If an uncompressed public key doesn't have prefix 0x04 in `PublicKey::from_slice()`, an error is returned.

  <br>

  I was wondering if `PublicKey::from_str()` should also enforce the same rules, however I have not incuded this in the PR.

  Please let me know if any changes need to be made.

  Thanks

ACKs for top commit:
  Kixunil:
    ACK c0d36efb8b
  apoelstra:
    ACK c0d36efb8b
  sanket1729:
    utACK c0d36efb8b. Not thrilled about the error message expecting len 66, when it can be both 66/130. But can live with it

Tree-SHA512: cfbcd569691c9a7f69ee775ec530605f42e988470a2ff9c28b4c881cec6b259053bb2288818e00b6f6b20316b1fb30fecc0b9a240ebbe7618f202ef6b5efeb9b
2022-02-24 16:50:55 +00:00
..
blockdata Simplify read_scriptbool 2022-01-26 16:52:41 +11:00
consensus Put rustdocs above attributes 2022-01-06 13:04:47 +11:00
network Remove trailing spaces from 'address.rs' 2022-01-17 10:03:17 +02:00
policy Clean up module level rustdocs 2021-11-06 10:59:53 +11:00
util Merge rust-bitcoin/rust-bitcoin#829: Don't allow uncompressed public keys without prefix 0x04 2022-02-24 16:50:55 +00:00
hash_types.rs Clean up module level rustdocs 2021-11-06 10:59:53 +11:00
internal_macros.rs Put rustdocs above attributes 2022-01-06 13:04:47 +11:00
lib.rs Re-export public map types from root level 2022-01-18 12:56:47 +11:00
serde_utils.rs Clean up module level rustdocs 2021-11-06 10:59:53 +11:00
test_macros.rs Clean up module level rustdocs 2021-11-06 10:59:53 +11:00