Skip to content

chacha20 regression: Looping counters and 32-bit counter for xchacha #391

Closed
@jpdoyle

Description

@jpdoyle

It appears that all the tests added by my previous PRs #217 and #216 were removed. The behavior checked by those tests appears to have regressed. In particular, xchacha20 can no longer use the full 64-bit counter space and instead sets the upper 32 bits to 0, and the overflow handling allows for looping counters -- e.g.,

self.0.state[12] = self.0.state[12].wrapping_add(1);

The commit which removed these tests, and which also appears to have introduced a regression on all this behavior, is the following commit by @newpavlov :

610e7685495c997df4232606439e1b12e59f4147 is the first bad commit
commit 610e7685495c997df4232606439e1b12e59f4147 (tag: salsa20-v0.10.0, tag: rabbit-v0.4.0, tag: hc-256-v0.5.0)
Author: Artyom Pavlov <[email protected]>
Date:   Thu Feb 10 08:27:06 2022 +0000

    Update crates to cipher v0.4 (#276)

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity vulnerabilities

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions