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

Sign the hash of the credential, not the raw credential #130

Open
noandrea opened this issue Jun 7, 2022 · 1 comment
Open

Sign the hash of the credential, not the raw credential #130

noandrea opened this issue Jun 7, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers Stale

Comments

@noandrea
Copy link
Contributor

noandrea commented Jun 7, 2022

In the code for signing credentials here:

and in the code to verify credential signatures here:

if !pk.VerifySignature(wcCopy.GetBytes(), sig) {

we do sign and verify the entire credential byte slice. The signing is done on the client side so it's relatively not critical, but the signature verification is done on the node side.

The signing computes the signature on the whole byte slice of the minified and encoded JSON. That seems to imply that the cost of signing/verifying a credential is linear with the credential size. The task would be to collect empirical data on the cost of signing/verifying a message vs computing the hash of the message and then signing/verifying the hash.

As for hashing algorithm consider blake2b or sha-3

@noandrea noandrea added enhancement New feature or request documentation Improvements or additions to documentation good first issue Good for newcomers labels Jun 7, 2022
@noandrea noandrea assigned noandrea and unassigned noandrea Jun 7, 2022
@github-actions
Copy link

github-actions bot commented Jul 9, 2022

This issue was marked as stale because there was no activity for 15 days

@github-actions github-actions bot added the Stale label Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers Stale
Projects
None yet
Development

No branches or pull requests

1 participant