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
Hashed claim values #47
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
243023d
Update index.html
David-Chadwick 249b281
Update index.html
David-Chadwick c491b00
Update index.html
David-Chadwick ab67ef2
Update index.html
David-Chadwick 1385a14
Update index.html
David-Chadwick 288a262
Update index.html
David-Chadwick File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More rewording is needed. Perhaps replacing your "actual value" with "original
literal value" would work... as --
I am a bit confused by
the <code>credentialSubject</code> contains the identifier of the hashing algorithm
. Does the<code>credentialSubject</code>
here not contain the identifier of the subject of the credential? Or does it include both identifiers (making it an array, rather than a single value)? Or something else?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that 'actual value' is better than 'original literal value'
The
credentialSubject
comprises a whole set of attributes, including theid
. This is a proposal to add another property to this set i.e. the hashing algorithm. I will clarify this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a hashing algorithm as a property of a
credentialSubject
makes very little sense. It would mean, for example, that a VC about David Chadwick would state that David has a hashing algorithm of SHA-256.It sounds like this information should be captured in the
proof
section somewhere instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hashing algorithm is actually a property of the claim value e.g. the claim {name=David} is transposed into {name={hashID=SHA-256, nonce=123....9, value=a8clyga}}. But since the same hashing algorithm is used for all claim values, there is no point in repeating the hashing algorithm ID multiple times. So we move it up a level to the encapsulating object, which is the credentialSubject, and put it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been resolved? I lean towards what @dlongley said above. The hashing algorithm, and all cryptographic attributes should be decoupled from the contents of the
credentialSubject
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had a data model in which a credentialSubject contained an ID and a set of claims, and each claim contained an ID and a set of properties, then we could have explicitly placed the hashID in the claim object. But unfortunately the data model has not explicitly identified the claim object with a claim ID and so the fact that this exists is obscured (and has led to many previous misunderstandings and issues.) Thus you think (wrongly) that the hashID is a property of the credentialSubject, when in fact, it is a property of the (invisible) claim object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@David-Chadwick, btw, (we don't need to mention this), but there has been other exploratory work in this area that involves reducing nonce storage via HMAC keys and that transforms the data to RDF quads prior to hashing -- and other work that uses URLs to store the hash values.
I think given that there are a number of ways to do the above scheme that we should perhaps just leave a note saying that it is up to the proof scheme to figure out how it's done -- like we do with ZKPs. We won't need to debate this further if we take that approach. It's worth just noting the nonce+hash method here as a means of redaction. We can also point to the CCG for further work in the area.