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

Fix leakage when the cacheline is 32-bytes in CBC_MAC_ROTATE_IN_PLACE #18050

Closed

Commits on Apr 5, 2022

  1. Fix leakage when the cacheline is 32-bytes in CBC_MAC_ROTATE_IN_PLACE

    rotated_mac is a 64-byte aligned buffer of size 64 and rotate_offset is secret.
    Consider a weaker leakage model(CL) where only cacheline base address is leaked,
    i.e address/32 for 32-byte cacheline(CL32).
    
    Previous code used to perform two loads
        1. rotated_mac[rotate_offset ^ 32] and
        2. rotated_mac[rotate_offset++]
    which would leak 2q + 1, 2q for 0 <= rotate_offset < 32
    and 2q, 2q + 1 for 32 <= rotate_offset < 64
    
    The proposed fix performs load operations which will always leak 2q, 2q + 1 and
    selects the appropriate value in constant-time.
    basavesh committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    9f0a407 View commit details
    Browse the repository at this point in the history