TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Lesson In Timing Attacks

35 pointsby kapitalxover 12 years ago

5 comments

jasonwatkinspdxover 12 years ago
Posted 3 years ago:<p><a href="http://news.ycombinator.com/item?id=760917" rel="nofollow">http://news.ycombinator.com/item?id=760917</a><p>It looks like kapitalx appended a query param (s=1) in order to avoid the duplicate url check.
评论 #4462195 未加载
评论 #4462067 未加载
mgallivanover 12 years ago
What happens if, on inequality, you have a 50% chance of doing one more comparison operation?<p>The way I figure, which may be incorrect, is the following:<p>You have x options (here it is 16). x^2 gives us 256 different options for this example. However, if it's only correct correct half of the time then we have to repeatedly cut down our search which results in series:<p>sum (x^2)/(2<i>n), n=1 to m<p>which is<p>(x^2 </i> H_m) / 2<p>Is this correct? Could someone explain how many random extra comparisons would be needed to thwart a timing attack?
评论 #4462247 未加载
tlbover 12 years ago
You should never be doing a string compare on the exact string sent over the network anyway. You should be hashing it first. Hashing destroys any value in knowing how much of the substring you matched.
评论 #4462242 未加载
评论 #4462309 未加载
stevencoronaover 12 years ago
While I believe the author that it's measurable over the internet.. I'd love to see an example of the code on the attacking side, so I could test it for myself.<p>It just seems like it wouldn't be measurable, and I'd love to test it and prove myself wrong.
评论 #4462115 未加载
评论 #4462340 未加载
评论 #4462794 未加载
评论 #4462093 未加载
qwertzlcoatlover 12 years ago
20µs == 20 microseconds == 20 * 10e-6 seconds. 100ns == 100 nanoseconds == 100 * 10e-9 seconds. 2 GHz == one clock cycle in 0.5 * 10e-9 seconds. And that's how long that one comparison would take; not accounting for branch prediction and other interferring stuff inside the processor. It's not an attack, it's a joke.