-
Notifications
You must be signed in to change notification settings - Fork 36
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
UTF8 FormC encoding for outcomes #89
Comments
This is an important point to bring up. What about both parties just don't do normalization at all? Perhaps we can recommend that if the strings in the descriptor are not normalized then reject the announcement message from the oracle. This PHP stack exchange makes it seem like NFC or NFD is the least radical: https://stackoverflow.com/questions/7931204/what-is-normalized-utf-8-all-about |
It seems that copy/paste does not keep the KD/D form. I don't understand very much the compatibility part. (the I see a good reason for using However, I also see a good reason for using |
@LLFourn I change my code to use |
I think this one is relatively important.
UTF8 encoding is not "canonical" there is several way to encode the same characters. So when one wants to hash a string, he should use UTF-8 using Normalization Form Compatibility Decomposition (NFKD).
This is really important, as if the oracle and the users don't use the exact same way to encode the outcome, then the attestation will be meaningless.
There is several normalization form, I took NFKD mainly because it is taken by BIP39, which need to deal with the same issue.
The text was updated successfully, but these errors were encountered: