Skip to content

chacha20polyDecrypt reuses ciphertext storage for decrypted output #73

@gijswijs

Description

@gijswijs

The chacha20polyDecrypt function currently performs in-place decryption by passing cipherTxt[:0] as the destination to aead.Open. This overwrites the input cipherTxt slice with the decrypted plaintext.

This behavior is not documented and may be unexpected for callers who assume the input slice remains immutable. The implementation should be updated to avoid reusing the input storage, or the documentation should be updated to explicitly warn about this side effect.

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