Updates To Compressed Keys Based On Reviewer Feedback

Several reviewers kindly provided feedback via IRC tonight, resulting in
the following changes:

* Mention that compressed keys are used in the offical secp256k1
  documentation with the prefix bytes used by Bitcoin. I could not find
  a publicly-available officialish document defining the prefix bytes,
  but they're used repeatedly in the offical SECG documentation we
  autoxref "secp256k1" to, so I went with that.

* Remove the mention that Bitcoin Core uses OpenSSL. While true, there
  is an effort to slowly move away from using OpenSSL for EC in
  Bitcoin Core.

* Change the phrasing of the relative curve location for 0x02 & 0x03 to
  a form more correct for actuality instead of the illustrated
  abstraction.

* Drop quotes around "uncompressed" since that's the term used in the
  official secp256k1 docs, not something Bitcoin-specific.
This commit is contained in:
David A. Harding 2014-06-11 22:23:13 -04:00
parent 968d9c1f64
commit 8a9abffe6a
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7

View file

@ -313,7 +313,7 @@ address utility].
{% autocrossref %}
Bitcoin ECDSA public keys represent a point on a particular Elliptic
Curve (EC) defined in secp256k1. In their traditional "uncompressed" form,
Curve (EC) defined in secp256k1. In their traditional uncompressed form,
public keys contain an identification byte, a 32-byte X coordinate, and
a 32-byte Y coordinate. The extremely simplified illustration below
shows such a point on the elliptic curve used by Bitcoin,
@ -336,8 +336,8 @@ as the "top" side or the "bottom" side.
No data is lost by creating these compressed public keys---only a small
amount of CPU is necessary to reconstruct the Y coordinate and access
the uncompressed public key. Both uncompressed and compressed public
keys are supported by default in OpenSSL, the library Bitcoin Core and
many other Bitcoin programs use.
keys are described in official secp256k1 documentation and supported by
default in the widely-used OpenSSL library.
Because they're easy to use, and because they reduce almost by half
the block chain space used to store public keys for every spent output,
@ -359,7 +359,9 @@ help programs identify how keys should be used:
encoding section above.)
* Uncompressed public keys start with 0x04; compressed public keys begin
with 0x03 or 0x02 depending on what side of the curve they're on.
with 0x03 or 0x02 depending on whether they're greater or less than
the midpoint of the curve. These prefix bytes are all used in
official secp256k1 documentation.
{% endautocrossref %}