Skip to content

[fix] seckey_negate error on calculateScalarOffset #103

Merged
altafan merged 9 commits into
vulpemventures:masterfrom
louisinger:fixprivatenegatescalar
May 22, 2023
Merged

[fix] seckey_negate error on calculateScalarOffset #103
altafan merged 9 commits into
vulpemventures:masterfrom
louisinger:fixprivatenegatescalar

Conversation

@louisinger

Copy link
Copy Markdown
Collaborator

Input scalar are computed from value, assetBlinder & valueBlinder. It happens that this set of values result into a ZERO (0x00 * 32) scalarOffset. In such case, the privateNegate function throws an error.

if ZERO, skip de privateNegate call is enough to be able to blind the pset outputs.

@altafan please review

@altafan

altafan commented May 19, 2023

Copy link
Copy Markdown
Collaborator

@louisinger did you check if there's something similar on elements core or other libs?

@louisinger

louisinger commented May 19, 2023

Copy link
Copy Markdown
Collaborator Author

@louisinger did you check if there's something similar on elements core or other libs?

privateNegate(Buffer.alloc(32)) from tiny-secp2256k1 also throws an error.

Comment thread ts_src/psetv2/zkp.ts Outdated
@louisinger louisinger requested a review from altafan May 22, 2023 14:31
@altafan altafan merged commit 8fd2b10 into vulpemventures:master May 22, 2023
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

Successfully merging this pull request may close these issues.

2 participants