Skip to content

Are codes for Blake2b and Blake2s across implementations incosistent? #100

Closed

Description

@arnau

Hello, I'm not sure I'm missing something important here but in the list of implementations some use {Blake2b 0x40, Blake2s 0x41} and others {Blake2b 0xb240, Blake2s 0xb260}. The latter agreeing with multibase and multihash CSV tables.

Are both valid? Are the former old/obsolete?

Activity

  1. Stebalien commented on Sep 19, 2018

    @Stebalien
    Member

    No, the first ones look incorrect. Which implementation uses 0x40 and 0x41?

  2. Stebalien commented on Sep 19, 2018

    @Stebalien
    Member

    Ah, interesting, it looks like it was changed a few years ago.

  3. Stebalien commented on Sep 19, 2018

    @Stebalien
    Member

    It looks like this was changed to take into account the fact that these hash functions are parameterized over their length. 0xb240 is actually blake2b-512 while 0x40 didn't actually specify the length.

  4. Stebalien commented on Sep 19, 2018

    @Stebalien
    Member
  5. arnau commented on Sep 19, 2018

    @arnau
    Author

    True, worth mentioning that the ongoing PR #41 still has a mention to the 0x40 and 0x41.

  6. ebkalderon commented on Sep 28, 2018

    @ebkalderon

    The descriptions of the BLAKE2 hash codes on Multiformats.io and in the IETF draft spec for multihashes suggest that the correct codes for BLAKE2 are:

    Algorithm Code
    Blake2b-512 0xb240
    Blake2b-256 0xb220
    Blake2s-256 0xb260
    Blake2s-128 0xb250
  7. arnau commented on Sep 28, 2018

    @arnau
    Author

    Looks like this issue has been solved. Perhaps it would be good to mention in the list of implementations the ones that are not up to date?

    Thanks for the help 👍

  8. Stebalien commented on Sep 28, 2018

    @Stebalien
    Member

    I've been filing bugs but probably haven't found all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions