Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto: chacha20 lacks method to set counter, which is needed for QUIC #36862

marten-seemann opened this issue Jan 29, 2020 · 1 comment


Copy link

@marten-seemann marten-seemann commented Jan 29, 2020

QUIC uses ChaCha20 for its header protection: In order to calculate the header protection mask, a QUIC implementation needs to be able to set the counter based on the ciphertext:

The first 4 bytes of the sampled ciphertext are the block counter.

Unfortunately, x/crypto/chacha20 currently doesn't provide an API to manually set the counter, and I therefore have to maintain a fork for my quic-go.

I already brought this up in #24485 (comment), and @FiloSottile suggested adding a SetCounter method, but it looks like this issue was closed without exposing this method.

Copy link

@FiloSottile FiloSottile commented Jan 29, 2020

Duplicate of #35506.

@golang golang locked and limited conversation to collaborators Jan 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants