Skip to content

fix: don't allow double-spending with a large nullifier - #2

Merged
sragss merged 1 commit into
a16z:mainfrom
kobigurk:fix/nullifier-exploit
Jan 26, 2022
Merged

sragss merged 1 commit into
a16z:mainfrom
kobigurk:fix/nullifier-exploit

Conversation

@kobigurk

Copy link
Copy Markdown
Contributor

Currently the nullifier is not checked to be within the SNARK field. This allows creating a nullifier which is still a valid bytes32/uint256 that has the same result modulo the field, but the spent nullifier dictionary treats them as different, allowing double-spending.

@sragss sragss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks for the PR Kobi!

@sragss
sragss merged commit fdd80c9 into a16z:main Jan 26, 2022
@kobigurk
kobigurk deleted the fix/nullifier-exploit branch January 31, 2022 11:36
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