two questions: why is the array2 index multiplied with 512? and why is the repeated wrong speculative execution not changing the branch prediction/why can i do this over and over again without "mistrain" the predictor again?
@JohnWittle5 жыл бұрын
I don't know about your first question But with your second question, isn't it the case that we only needed the speculative execution to put the secret value into the cache? Once it's there, we're just passing in all the possible values of X and seeing how long it takes for the if to return 'false'; if it took less time, it means it was able to check the value of x against a value in the cache, which must be the secret value. We don't actually need the 'true' branch to be executed at all, speculatively or not, once we've got the secret value into the cache