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

Add more value barriers to avoid compiler induced side channels #4395

Merged
merged 3 commits into from
Oct 20, 2024

Commits on Oct 20, 2024

  1. Add more value barriers to avoid compiler induced side channels

    The paper https://arxiv.org/pdf/2410.13489 claims that on specific
    architectures Clang and GCC may introduce jumps here. The donna128
    issues only affect 32-bit processors, which explains why we would not
    see it in the x86-64 valgrind runs.
    
    The GHASH leak would seem to be generic but the authors only observed
    it on RISC-V.
    randombit committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    53b0cfd View commit details
    Browse the repository at this point in the history
  2. Add CT::value_barrier to donna conditional swap logic

    No indications that Clang is currently converting this to conditional
    jumps, but this construct seems prone to such problems.
    randombit committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    a031ef7 View commit details
    Browse the repository at this point in the history
  3. Avoid another problematic construct in GHASH

    There has been no indication that any compiler is converting this code
    to assembly that uses conditional jumps, but it has the style of code
    that would be vulnerable to Clang's range analysis optimizations.
    randombit committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    8771ae0 View commit details
    Browse the repository at this point in the history