-
Notifications
You must be signed in to change notification settings - Fork 0
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
Guarantee usernames stays inside field #13
Comments
As discussed with Parsley in early Mar, a Custodian can intentionally create an overflow on a username to hide the exclusion of a user entry from the MST. However, we can mitigate the Custodian's motivation to cause an overflow by adding a verification step to the |
Should overflow be checked in circuit as well in cases where core Summa is imported as lib in some external zkDapps which may miss checking in-contract? It can be modularized as an optional |
I think this is a good idea to add an optional feature enabling range checks for usernames in the circuit. I will create an issue with details for any contributors. |
Description
username
s are being converted into BigUint and then to into field elements:summa-solvency-schneier/zk_prover/src/circuits/merkle_sum_tree.rs
Line 252 in 95d63fe
iirc, Summa is not really bothered about how the usernames are constructed, but it is expected to be a hash of a unique combination of user id and/or email address (not fully sure)
What happens if an exchange settles on a format for constructing the usernames, uses Summa a few times, but at some point in the future for specific usernames, the BigUint conversion overflows the field? Would they have to change the username construction procedure? Is that possible considering the previous rounds they've already committed? Hence should Summa also consider the username construction procedure and have some restrictions around that procedure?
The text was updated successfully, but these errors were encountered: