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

Support configurable s2n blinding delay #4508

Open
mathpal opened this issue Apr 17, 2024 · 2 comments · May be fixed by #4562
Open

Support configurable s2n blinding delay #4508

mathpal opened this issue Apr 17, 2024 · 2 comments · May be fixed by #4562

Comments

@mathpal
Copy link
Contributor

mathpal commented Apr 17, 2024

Problem:

s2n blinding default delays are high (can take almost 50 seconds in most cases).

Modern HTTP clients give up if the response is not received in under 10-30 seconds. Most modern websevers close the upstream connections on downstream/client timeout.
Thus, any webserver that acts as a s2n-tls-client and uses default blinding, ends up closing the upstream connection before it has a chance to see what was actually wrong with the upstream connection when blinding is being applied.

In the C library, this is easier to side-step by implementing self-service blinding (or just ignoring blinding).
In the rust interface (s2n-tls-tokio), there is no option of self-service blinding.

Solution:

Allow clients to configure a max blinding delay. I would expect that a side-channel attack would be made impractical even with a small delay (which is strictly better than having no delay by using "self-service" blinding).

  • Does this change what S2N sends over the wire? No
  • Does this change any public APIs? Yes, a new API might be required to configure max blinding delay.
  • Which versions of TLS will this impact? all

Requirements / Acceptance Criteria:

What must a solution address in order to solve the problem? How do we know the solution is complete?

s2n-tls (rust and c) can be configured with a lower duration (3-5 seconds) of blinding delay.

I don't expect this to be a breaking change or change the current behavior in any way.

@maddeleine
Copy link
Contributor

For posterity, it looks like our delay is a random value from 10-30 seconds and the original justification was to have it match somewhat with a normal TCP keep-alive timer setting. That still may be too high for some applications, but it doesn't go as high as 50 seconds.

@lrstewart
Copy link
Contributor

It's possible that the 50 seconds came from the fact that shutdown used to potentially blind twice. But that hasn't been the case for a while: 7227160#diff-9ef39f857dd44706fab0fcbdafa024ca5c4a0cbe6184ffc11d68c1c7f3275f4e

@maddeleine maddeleine linked a pull request May 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants