-
Notifications
You must be signed in to change notification settings - Fork 200
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
Encoded indy attributes drop the leading 0's for numeric strings #883
Comments
Thats a difficult one. I think that numbers with leading zeros should be treated as strings. Your example of the security code is a valid use case where you would like to keep this. Any non-leading-zero int32 can just be kept as a number. I do believe however that this does remove range proofs on the value, but I might be mistaken and a string -> number conversion is done before the range proof. If we decide to go this route, I strongly suggest we update the RFC with the leading zeroes note to avoid further issues. |
Yes this will make range proofs impossible on values with leading zeroes. So if we e.g. want to check if your security code is >= 100 we wouldn't be able to do that. @swcurran do you have any thoughts on this issue? |
- Updated VTP dependency to the version with reworked state types and previous party state verification. - Supported reworked state types and previous party state verification. - Removed unused code. - Corrected imports. - Regenerated yarn.lock file.
openwallet-foundation#883: Supported reworked VTP state types
Sorry for the long delay in responding to this. The key to the answer is found here in RFC0592 Indy Attachments - Encoding Claims sections (misnamed - should "AnonCreds Attachments" -- but that's for another day). And in that, we have a lovely contradiction.
My proposal is that we stick to the RFC as documented in the example code and (especially) the test set, perhaps with a clarification in the text of the RFC. I suggestion that because that is what other frameworks (should) have done. It would be good to confirm that with an AATH test. For AFJ, we leave the change that James made and accept that this is a conflict between AFJ 0.1.0 and AFJ 0.2.0. As noted on the merge that created this issue, as long as the frameworks handle the encoding consistently, all is good regardless of which approach is used. |
I'd agree with Stephen's thoughts here--I think that as long as the frameworks handle the encoding consistently then we're okay. I'd also agree with the need/desire to update the RFC with a clarification. |
This is now handled by anoncreds-rs |
PR #632 fixed an interop issue with ACA-Py. ACA-Py would remove leading 0's from numeric strings when encodign indy values, while AFJ would not do that. This would results in errors as we couldn't verify the encoded values matched the raw values.
After doing some interop testing between AFJ 0.1.0 and 0.2.0 it not seems this broke interop with AFJ 0.1.0. This issue is to discuss whether we should drop the leading 0's. As per @blu3beri's comment in #632, we should maybe treat number strings with leading 0's as strings. Probably if you're issuing a credential with a leading 0, that value is there for a reason:
Also see my comment on #632:
The text was updated successfully, but these errors were encountered: