Skip to content

Unify buffering logic between chacha20, salsa20, and ctr #95

@tarcieri

Description

@tarcieri

All three of these crates use highly similar (copypasta) buffering logic:

Original ctr code:

Derived chacha20 and salsa20 code:

The main problem is the ctr is presently specialized to Ctr128 and intended to operate in conjunction with a block cipher, whereas it'd be nice if ChaCha20 and Salsa20 took an integer (32-bit and 64-bit respectively) used to compute the block, but reused the same buffering logic as Ctr128.

ChaCha20 could also benefit from parallel block computation via its AVX2 backend.

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