audit fix: email nullifier info leak #39
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses comment on Email nullifiers may leak information on the message
A: we've removed
standard_outputs()
technically, but the underlying functionality is still there. Basically inconsequential but worth highlightingB: we've added
zkemail::blinded_nullifier
which provides a standard API for doing this kind of logic, this way developers will know to think about thisC: This is a tough problem. We could design an in-library solution for deterministically selecting random bytes out of the header or body, or something else similar that would be quite hard to attack. Specifically for Z-Imburse or similar usecases, if we want to prevent other users from using the same email, we would need such a robust solution. At this point, given the normal email nullifier is at parity with the circom implementation + the undertaking to design a good solution for blinding the nullifier, we are simply including the
blinded_nullifier
function in the API and electing not to immediately solve this on the z-imburse level.We will keep this deficiency in mind, and parting suggestions on how best to deterministically select blinding bytes from the header would be appreciated (but not necessary to close the audit)