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

Weak timing side-channel due to Exp/Mul/Gcd #8

Open
stef opened this issue Feb 21, 2020 · 0 comments
Open

Weak timing side-channel due to Exp/Mul/Gcd #8

stef opened this issue Feb 21, 2020 · 0 comments

Comments

@stef
Copy link

stef commented Feb 21, 2020

In go neither of modular exponentiation, multiplication nor gcd are constant time, and thus they can aid an attacker at recovering sensitive information.

In gabi in most instances there is a random element in the functions using the non-const time arithmetic, thus if an attacker is only able to invoke and measure the gabi function (for example over the network), they all have considerable noise due to the random elements and most of the time their sample size is limited to one, since the random element is unique for each invocation. Thus such an attacker has a negligible chance of succeeding. However an attacker that is hosted on the same CPU and can do more precise measurements only targeting the exp/mul/gcd without the added noise around them, has a good chance of exploiting this. It is thus recommended to implement (and possibly upstream) const-time exp/gcd arithmetic.

One instance of timing sensitive mul is when the modulus n is being computed from the issuers secret key q' and p' by multiplying them. Since these two values are not needed for anything else, it is recommended to replace them with the calculated value of n and thus eliminate the multiplication of them and storing them altogether.

@stef stef changed the title Weak timing side channel due to Exp/Mul/Gcd Weak timing side-channel due to Exp/Mul/Gcd Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant