Skip to content

Xchacha20 issue going from 2.0.4 to 2.0.5 #85

Description

@STINightFall

A string encrypted with Xchacha20 on version 2.4 can't be decrypted with 2.5. Rolling back to 2.4, it works as expected. The error is "SecretBox has wrong message authentication code (MAC)"

Is 2.5 not backwards compatible with 2.4?

Here is the cipher:

final cipher = Xchacha20(macAlgorithm: Hmac.sha256());

Thanks!

Activity

  1. changed the title [-]Xchacha20 issue going from 2.4 to 2.5[/-] [+]Xchacha20 issue going from 2.0.4 to 2.0.5[/+] on Dec 9, 2021
  2. terrier989 commented on Mar 3, 2023

    @terrier989
    Member

    I believe this was fixed in 2.2.0. The problem was that Chacha20 and Chacha20-Poly1305-AEAD do not produce the same cipher text (because of the first block) and Xchacha20 had a bug when something like HMAC_SHA256 was used instead of Xchacha20.poly1305.

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