bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper
MIT License
86 stars 55 forks source link

Cant figure equivalents to `bcrypto.secp256k1` calls #120

Closed Overtorment closed 1 year ago

Overtorment commented 1 year ago

Specifically, I need equivalents for

currently using const sec = require("bcrypto").secp256k1; for these, but want to switch either to tiny or to nobleecc (which is afaik has similar set of methods)

junderw commented 1 year ago

I know https://www.npmjs.com/package/secp256k1 supports these as well (including JS for browsers)

It would be trivial to add these methods... but the whole point of the tiny-secp256k1 library is to have a tiny interface and not pull in every single function from libsecp256k1.

What are those methods for? A new feature in BW?

junderw commented 1 year ago

Or maybe those are already in tiny...

Let me check.

junderw commented 1 year ago

privateKeyTweakMul -> no publicKeyTweakMul -> pointMultiply publicKeyCombine -> pointAdd (but tiny can only combine 2 keys at a time) privateKeyTweakAdd -> privateAdd privateKeyNegate -> privateNegate

junderw commented 1 year ago

So the question would be:

  1. Why do you need privateKeyTweakMul?
  2. Do you need to combine 3 or more pubkeys all at once? If so, why?
Overtorment commented 1 year ago

that helped, thanks! implemented here: https://github.com/Overtorment/SilentPayments/pull/5