Skip to content
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

Is the hashing formulation inconsistent? #92

Open
iherman opened this issue Jul 16, 2024 · 3 comments
Open

Is the hashing formulation inconsistent? #92

iherman opened this issue Jul 16, 2024 · 3 comments
Assignees
Labels
CR1 editorial This item is editorial in nature. ready for pr

Comments

@iherman
Copy link
Member

iherman commented Jul 16, 2024

§3.2.4 says, in bullet entry (3):

Let hashData be the result of joining proofConfigHash (the first hash) with transformedDocumentHash (the second hash).

However, proofConfigHash is defined in bullet item (2), and transformedDocumentHash is defined in bullet item (1). Ie, the item should either be:

Let hashData be the result of joining transformedDocumentHash (the first hash) with proofConfigHash (the second hash).

or

Let hashData be the result of joining proofConfigHash (the second hash) with transformedDocumentHash (the first hash).

Either way is fine, although the first possibility would make all current implementation invalid 😒.

Of course, a third solution would be to exchange bullet items (1) and (2).

(I did not check whether the same error occurs elsewhere in the same document as well as in other cryptosuites.)

@dlongley
Copy link
Contributor

dlongley commented Jul 16, 2024

The meaning of "first" and "second", I believe, had to do with indicating the order that the concatenation or "joining" happens, not the order in which the hashes might have been created. I believe Ted? may have wanted those parentheticals to clarify the concatenation order? I can't recall now.

So if we need it to say "the first hash when concatenating" (or something like that), we can do that.

@iherman
Copy link
Member Author

iherman commented Jul 16, 2024

The meaning of "first" and "second", I believe, had to do with indicating the order that the concatenation or "joining" happens, not the order in which the hashes might have been created.

Which is fine with me, but it would be better to then order the bullet lists the same way to avoid any kind of misunderstandings (this is my third option in the issue)

I believe Ted? may have wanted those parentheticals to clarify the concatenation order? I can't recall now.

So if we need it to say "the first hash when concatenating" (or something like that), we can do that.

@msporny msporny self-assigned this Jul 20, 2024
@msporny msporny added ready for pr editorial This item is editorial in nature. CR1 labels Jul 20, 2024
@iherman
Copy link
Member Author

iherman commented Jul 21, 2024

Note that §3.2.4 has a slightly different formulation which seems to be clear and without ambiguities (and, indeed, reflecting the order of the final hashing). For the sake of consistency, I think we should use the same formulation in this section as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR1 editorial This item is editorial in nature. ready for pr
Projects
None yet
Development

No branches or pull requests

3 participants