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.
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
Release v1.7.0 #266
Release v1.7.0 #266
Changes from 5 commits
8b3e9f9
bf2dbe2
c74636b
e4ee7c6
3ad9e4e
4592e0e
b8ad080
4c9ecff
e38cefd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Apologies for being laaaaaate to the new payload party, but we really can just get away with only hashing
x
as long as we are on EC. Let's fix that before -38 gets released and formalized. And may I ask what's exactly in thehashPair
? Is somehow derived from the name K256? If not, we should fix that with something like jwk.kty + jwk.alg as salt.PS: I don't see the point of doing a PBKDF2 on a public key when all we need is a fingerprint. Gun.SEA.work can use SHA-256.
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.
hashPair is a random UUID. You can think it is some type of salt but shared to generate a stable output between clients.
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.
jwk.x
orjwk.x + jwk.y
is not important, we just need a hash, does the current way looks good to you?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.
No, because by only hashing the points we are throwing away algorithmic information previously provided by hashing the entire thing. This breaks the #191 mandate of being able to stably process a multitude of curves.
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.
You can see we cut the N chars of the hash.
return hash.substring(0, N)
.This is not a full hash, it's more like a "partition"
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.
"Hashing the entire thing" does not mean taking the full hash. It means that we used to hash the entire JWK object, which contained information about the algorithm in
jwk.kty + jwk.alg
. We are not including it anymore, which is a short-sighted view especially given that the current salt has no use.You are trying to go through this quick by dismissing everything without reading them through.
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 design here is from the https://github.com/DimensionDev/Maskbook/wiki/Data-structure-on-Gun-version-2 . Maskbook is only using the a part of "feature" of the key, it should be stable, but it's content is not important