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

Use sha512 prehash on signbytes in x/sigs #87

Merged
merged 2 commits into from
Aug 6, 2018
Merged

Use sha512 prehash on signbytes in x/sigs #87

merged 2 commits into from
Aug 6, 2018

Conversation

ethanfrey
Copy link
Contributor

We need this so we can sign with the ledger (it requires sha256 or sha512 or blake2b prehash before signing).

It shouldn't break anything except the js clients (which Simon updated already), as your go clients, should also use BuildSignBytes directly or indirectly before signing.

I would like to get this in a (breaking) bov release by the next testnet, so we can release the updated js libs with it.

@ethanfrey ethanfrey requested review from alpe and ruseinov August 5, 2018 19:57
@codecov
Copy link

codecov bot commented Aug 5, 2018

Codecov Report

Merging #87 into master will decrease coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #87     +/-   ##
=======================================
- Coverage    78.2%    78%   -0.3%     
=======================================
  Files          62     62             
  Lines        2502   2584     +82     
=======================================
+ Hits         1958   2016     +58     
- Misses        433    458     +25     
+ Partials      111    110      -1
Impacted Files Coverage Δ
x/sigs/controller.go 78.7% <100%> (+0.3%) ⬆️
x/sigs/context.go 16.6% <0%> (-28.8%) ⬇️
x/sigs/errors.go 75% <0%> (-25%) ⬇️
x/validators/errors.go 100% <0%> (ø) ⬆️
x/cash/errors.go 100% <0%> (ø) ⬆️
examples/mycoind/app/examples.go 0% <0%> (ø) ⬆️
examples/mycoind/app/app.go 82.6% <0%> (+0.6%) ⬆️
errors/main.go 97% <0%> (+1.3%) ⬆️
orm/query.go 93.7% <0%> (+1.4%) ⬆️
orm/bucket.go 82.6% <0%> (+2.1%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c82d9aa...1e2d01e. Read the comment docs.

Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! I have seen this in other contexts as well when a signed container image should be verified for example.
I wonder if you want the hash algorithm as an extension point but that can be done easily whenever needed

@ethanfrey
Copy link
Contributor Author

I wonder if you want the hash algorithm as an extension point but that can be done easily whenever needed

Yes, that is a good idea. I would love to if there was more time. So the repo extending weave could specify it. I will add this as an issue, but it will be non-breaking for our network, so upgrade can happen without client noticing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants