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

DEP-9: fix padding size math #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zxcat
Copy link

@zxcat zxcat commented Nov 23, 2020

doc says padding is 21 bytes for signatures and tree, but it should be 17:

      <3 byte magic string: 0x050257>
      <1 byte header type: 0x02>
      <1 byte version number: 0>
      <2 byte entry size: 40>
      <1 byte algorithm name length prefix: 7>
      <7 byte algorithm name: BLAKE2b>
      <17 byte padding>

3+1+1+2+1 + 7+17 = 32

doc says padding is 21 bytes for signatures and tree, but it should be 17:
```
      <3 byte magic string: 0x050257>
      <1 byte header type: 0x02>
      <1 byte version number: 0>
      <2 byte entry size: 40>
      <1 byte algorithm name length prefix: 7>
      <7 byte algorithm name: BLAKE2b>
      <17 byte padding>
```
3+1+1+2+1 + 7+**17** = 32
@zxcat zxcat changed the title fix padding size math DEP-9: fix padding size math Nov 23, 2020
Copy link
Contributor

@martinheidegger martinheidegger left a comment

Choose a reason for hiding this comment

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

Seems about right 😉

@RangerMauve
Copy link
Contributor

ping @mafintosh @pfrazee

@mafintosh
Copy link

👍

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.

4 participants