Change to mitigate branch prediction attacks

Submitted by: Matthew D Wood
Reviewed by: Bodo Moeller
This commit is contained in:
Bodo Möller
2007-03-28 00:15:28 +00:00
parent b506821d43
commit bd31fb2145
16 changed files with 595 additions and 42 deletions

View File

@@ -242,7 +242,7 @@ int main(int argc, char *argv[])
clen = key3(key, ctext_ex);
break;
}
if (v/3 > 1) key->flags |= RSA_FLAG_NO_EXP_CONSTTIME;
if (v/3 >= 1) key->flags |= RSA_FLAG_NO_CONSTTIME;
num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
RSA_PKCS1_PADDING);