Skip to content

Comments

DEP-9: fix padding size math#67

Open
zxcat wants to merge 1 commit intodat-ecosystem-archive:masterfrom
zxcat:patch-1
Open

DEP-9: fix padding size math#67
zxcat wants to merge 1 commit intodat-ecosystem-archive:masterfrom
zxcat:patch-1

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