Skip to content

chacha20: get ChaCha8 keystream blocks without applying them to a plaintext #424

@nazar-pc

Description

@nazar-pc

Chia Proof-of-Space implementation uses ChaCha8 cipher internally as PRNG instead of encrypting anything. This means that with current API it is necessary to apply it to zeroed vector first, which is an extra zeroing, memory copy and pointless XOR.

I'm wondering if it would be possible to somehow access internal keystream directly while doing less work, possibly by accepting &mut [MaybeUninit<u8>] as an argument.

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