Suggestion to add secp256k1_ec_pubkey_compress() function #259

issue ufasoft openend this issue on June 19, 2015
  1. ufasoft commented at 12:22 pm on June 19, 2015: none

    The library has secp256k1_ec_pubkey_decompress() But symmetric operation _compress() does not exist.

    It is possible to export PrivKey to compressed PubKey form, but sometime PrivKey is not available.

    As I see the implementation is very simple: copy first 33 bytes and OR some bitmask.

  2. sipa commented at 12:26 pm on June 19, 2015: contributor

    Yes the reasoning for not having such a function is because it is trivial.

    However as the library is growing more into a fully-featured API rather than a collection of low-level routines, I think it makes sense to add it. On Jun 19, 2015 2:22 PM, “Ufasoft” notifications@github.com wrote:

    The library has secp256k1_ec_pubkey_decompress() But symmetric operation _compress() does not exist.

    It is possible to export PrivKey to compressed PubKey form, but sometime PrivKey is not available.

    As I see the implementation is very simple: copy first 33 bytes and OR some bitmask.

    — Reply to this email directly or view it on GitHub https://github.com/bitcoin/secp256k1/issues/259.

  3. afk11 cross-referenced this on Jun 26, 2015 from issue Add secp256k1_ec_pubkey_compress() by afk11
  4. apoelstra commented at 9:02 pm on August 3, 2015: contributor
    Recommend close since the pubkey_t API now means that keys don’t have a un/compressedness until the time of serialization.
  5. ufasoft commented at 9:05 pm on August 3, 2015: none
    agree
  6. ufasoft closed this on Aug 3, 2015


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 14:15 UTC

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