Multiplying a point by zero #616

issue elichai openend this issue on May 11, 2019
  1. elichai commented at 9:43 pm on May 11, 2019: contributor
    Hi, Shouldn’t multiplying a point by zero return the identity element(the point at infinity) Right now it returns 0 (signifying an error) https://github.com/bitcoin-core/secp256k1/blob/84a808598b3aa70847d73a0ce43f7893e302fd90/src/eckey_impl.h#L89
  2. sipa commented at 9:56 pm on May 11, 2019: contributor
    You can’t return such a point (the point at infinity is not a valid public key). This files contains operations on public keys (not points in general).
  3. elichai commented at 10:10 pm on May 11, 2019: contributor

    Why can’t the point at infinity be a valid public key?

    And I guess all this library is written to operate over public and private keys and not points and field elements, right?

  4. sipa commented at 11:12 pm on May 11, 2019: contributor
    @elichai Because you can’t serialize it.
  5. gmaxwell commented at 2:22 am on May 12, 2019: contributor

    And also because this library (at least it’s public interface) is not a collection of tools for people to roll their own cryptosystems.

    I am of the view that any cryptographically library should offer interfaces to non-cryptograhers which are as intrinsically safe as is reasonable possible and bare primitives don’t have this property. If there were some protocol that required serializing the point at infinity (which would be a pretty weird requirement) that protocol would include its own serialization that could handle it.

  6. gmaxwell closed this on May 12, 2019


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-12-22 21:15 UTC

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