Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Need equivalent of secp256k1_ec_seckey_tweak_add #312

Open
bitsanity opened this issue Feb 12, 2024 · 0 comments
Open

[FEATURE] Need equivalent of secp256k1_ec_seckey_tweak_add #312

bitsanity opened this issue Feb 12, 2024 · 0 comments

Comments

@bitsanity
Copy link

I would like to take a private key (m) and add a tweak to it, a hash of something (S):

p = m + hash(S)

I can do point addition with elliptic okay, but I am having difficulty figuring out how to do scalar addition. I see the official secp256k1 C library has this function:

int secp256k1_ec_seckey_tweak_add(
  const secp256k1_context* ctx,
  unsigned char *seckey,
  const unsigned char *tweak32
)

And the tiny-secp256k1 typescript module has this:

export function privateAdd(
  d: Uint8Array,
  tweak: Uint8Array
): Uint8Array | null

How best to do same with elliptic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant