Compressed pubkeys #649

pull sipa wants to merge 3 commits into bitcoin:master from sipa:comprpubkey changing 8 files +228 −53
  1. sipa commented at 1:54 AM on November 21, 2011: member

    This patch enables compressed pubkeys when -compressedpubkeys is passed. These are 33 bytes instead of 65, and require only marginally more CPU power when verifying. Compressed pubkeys have a different corresponding address, so it is determined at generation. When -compressedpubkeys is given, all newly generated addresses will use a compressed key, while older/other addresses keep using normal keys. Unpatched clients will relay and verify these transactions.

    Tested on testnet with both normal and encrypted wallets, using compressed and non-compressed keys.

    Initial idea and tests for this patch were done by roconnor.

  2. sipa commented at 11:33 AM on November 21, 2011: member

    Regarding patent issues, read this: http://cr.yp.to/patents/us/6141420.html

  3. gavinandresen commented at 1:42 AM on November 24, 2011: contributor

    Spiffy! Could you create unit tests and a test plan? For example, if I want to test use of compressed and uncompressed keys... I would run with/without the -compressedpubkeys option, but do I need to use up old uncompressed keypool keys before I get compressed keys?

  4. sipa commented at 1:42 PM on November 24, 2011: member

    For testing, you probably want to be able to mix compressed and uncompressed keys. For production use, you probably want to just switch once and for all, so -compressedpubkeys would better flush all non-compressed keys in the keypool.

  5. luke-jr commented at 3:18 PM on December 23, 2011: member

    This needs rebasing.

  6. sipa commented at 3:33 PM on December 23, 2011: member

    @luke-jr done

  7. gavinandresen commented at 9:39 PM on December 23, 2011: contributor

    I think we should just make compressed keys the default; I don't see any reason to continue supporting/generating/etc the larger uncompressed keys.

  8. sipa commented at 2:12 PM on December 25, 2011: member

    Ok, compressed pubkeys are now enabled by default in the pull request (the key pool isn't flushed, though)

    I'll add some unit tests soon.

  9. Compressed pubkeys
    This patch enabled compressed pubkeys when -compressedpubkeys is passed.
    These are 33 bytes instead of 65, and require only marginally more CPU
    power when verifying. Compressed pubkeys have a different corresponding
    address, so it is determined at generation. When -compressedpubkeys is
    given, all newly generated addresses will use a compressed key, while
    older/other addresses keep using normal keys. Unpatched clients will
    relay and verify these transactions.
    11529c6e4f
  10. Compact signatures with compressed pubkeys d4d9c734c3
  11. Unit tests for EC key routines
    This tests:
    * creation of keys from base58-encoded strings
    * extracting public keys and addresses
    * compressed public keys
    * compact signatures and key recovery
    b3974ec9d4
  12. sipa referenced this in commit afcf6f974f on Jan 10, 2012
  13. sipa merged this on Jan 10, 2012
  14. sipa closed this on Jan 10, 2012

  15. coblee referenced this in commit 9f6a4eb6bd on Jul 17, 2012
  16. ptschip referenced this in commit ecad7c3f50 on Jun 7, 2017
  17. dexX7 referenced this in commit 3b1f30e488 on Jul 16, 2018
  18. kallewoof referenced this in commit 335be0191b on Oct 4, 2019
  19. KolbyML referenced this in commit bc86927231 on Sep 4, 2020
  20. rajarshimaitra referenced this in commit fc5488e24f on Aug 5, 2021
  21. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me