1,027 karma · joined Jun 13, 2008 (18y ago) · 143 submissions
comment 16y ago · link · parent
If you're storing a password, use bcrypt or I'll bite your thumbs off.
If you're making sure something hasn't been modified by someone and you absolutely can't use a signed GPG message, use HMAC-SHA256 and a constant-time comparison algorithm or I'll bite your thumbs off.
All the business about hash functions is like advice on how to build your own car brakes using a backyard smelter and a sand cast. You might get something of roughly the right shape and weight but someone's going to get hurt down the road.
comment 16y ago · link · parent
If the upstream owner doesn't accept patches the project is hosed, regardless of how it's hosted.
The big difference with a DVCS is that those chaotic forks are public and can themselves accept patches. Developers can still pool their bug fixes, added features, etc., and perhaps the project can rise from the ashes.
If the project is hosted on a centralized VCS, all of those bug fixes and new features languish as one-off forks in private repositories. Instead of being a chaotic mess, it's moribund. You still have the same issue of having to maintain your own fork; you just don't have any help in doing so.
comment 17y ago · link · parent
For example, "blah"[0] should return an Object instance which represents "b". Could be a Fixnum. Could be a String. Could be a JPEG of some ASCII art representing the essence of "B." Any of those responses would be valid according to RubySpec.
What happens when you shadow a local variable with a block variable is unspecified, too. In 1.8.x, it overwrites the variable. In 1.9, it doesn't.
Even with a "RubySpec-compatible" implementation, you have no way of knowing if your application will run or not, which kind of defeats the purpose.
98.
Thoughts on Dynamo's "flawed architecture"(dizzyd.com ↗)
24 points · by codahale · 17y ago · 1 comment
comment 17y ago · link · parent
Ah, another person who's never come close to examining Scala's actor implementation. Check out scala.actors.FJTaskScheduler2. It uses threads. That's, uh, kind of the only way to get a JVM process to do things concurrently.
comment 17y ago · link · parent
Despite this massive divergence from a common genetic ancestor almost 20-40 times longer ago than our species has even existed, folks still want to base what it means to be a human on what it means to be a gorilla or a chimpanzee.
To make an easier point: do you think you could be typing on a keyboard designed and manufactured by humans using a computer designed and manufactured by humans which communicates with other computers using protocols designed, implemented, agreed upon, and re-implemented by humans in order to use a service provided by a human so that humans could meet and talk about a tiny slice of the things humans meet and talk about if humans weren't embarrassingly social and cooperative?
comment 17y ago · link · parent
If one finds a vulnerability, follow the rfpolicy[1] or similar. Send an email to security@example.com, not Kevin Rose. (Seriously—Kevin Rose? What the hell does he have to do with Twitter's security response team?)
comment 17y ago · link · parent
First, check http://svn.debian.org/wsvn/ for the package you're lusting after. (In this case, pkg-ruby has the ruby1.9.1 package at 1.9.1.243-2 on trunk.)
Then, use svn-buildpackage to build yourself the damn package.
Finally, install the package, basking in the warmth of replicable, reversible package management.
comment 17y ago · link · parent
Caching is equally unlikely to play a role. You're probably thinking of DJB's timing attacks on AES (http://cr.yp.to/antiforgery/cachetiming-20050414.pdf), but that attack resolves around the timing of S-box lookups in which the index of the lookup is key-dependent. In the constant-time algorithm proposed by Nate Lawson and others, the only array lookup is the incremented value of a for loop (i.e., constant-time). The other operations are XOR and OR, both of which are constant-time.
Branch prediction doesn't come into play because a constant-time comparison doesn't involve conditionals until all the data has been compared.
A constant-time implementation of AES? Hard. A constant-time implementation of an array comparison? Dead simple.
Not sure why you're so resistant to the idea.
comment 17y ago · link · parent
Although nanosleep() takes a timespec struct that allows you to give an accuracy with nanosecond precision, nanosleep doesn't really give anywhere near that level of accuracy. Under Linux, the kernel only checks on timers once every "jiffie," which defaults to 1 ms under the 2.6 kernel (on older kernels it was 10 ms, and 10 ms is still a compile option in the 2.6 kernel). Once upon a time, nanosleep would busy-wait if the sleep time given was less than 2 ms, but not anymore. On the other hand, don't be too discouraged—as long as you don't need submillisecond accuracy, nanosleep() is very good…
comment 17y ago · link · parent
(In some languages—hi Ruby!—you might not even have access to reliable millisecond-resolution timing.)
comment 17y ago · link · parent
No idea why Mint doesn't do it. I had always assumed it was because they were share-cropping on Yodlee's architecture.
(Full disclosure: I work for Wesabe, but my snooty attitude is my own. ;)
(And yeah, ⌘⌥T is your friend when it comes to the appropriate typography.)
comment 17y ago · link · parent
Crosby et al. conclude: We have shown that, even though the Internet induces significant timing jitter, we can reliably distinguish remote timing differences as low as 20µs. A LAN environment has lower timing jitter, allowing us to reliably distinguish remote timing differences as small as 100ns (possibly even smaller). These precise timing differences can be distinguished with only hundreds or possibly thousands of measurements.
If you'd like to bet that this sort of statistical analysis will get harder to perform over time, I'll take your wager. I'm not willing to wait until someone is publicly compromised before I fix security vulnerabilities—I do not work for an employer who's willing to tolerate a few break-ins before fixing the locks.
I'd also argue that a) a timing attack vulnerability is "weak/poor crypto," b) I don't need to write about the importance of other attack vectors (XSS, CRSF, social engineering, telepathy, bats, etc.) while writing about timing attacks, and c) if timing attacks are easy to understand and fix there would be less of them.
(Edit: fixed the B&B paper link. Derp.)
comment 17y ago · link · parent
http://www.cs.rice.edu/~dwallach/pub/crosby-timing2009.pdf
Adding jitter will not defeat timing attacks unless the jitter is dependent on the input, like blinded RSA.
114.
A Lesson In Timing Attacks (or, Don't use MessageDigest.isEquals)(codahale.com ↗)
113 points · by codahale · 17y ago · 30 comments
comment 17y ago · link · parent
The behavior of the DBs as far as resource consumption is interesting, but the numbers are meaningless.
Further reading:
http://www.ibm.com/developerworks/java/library/j-jtp12214/
http://www.ibm.com/developerworks/java/library/j-jtp02225.ht...
comment 17y ago · link · parent
Two slices—75kcal * 2—and a hunk of Nutella—190kcal * 3—is way the hell more calories than I should be eating as a snack (720kcal). Veeeery easy to go overboard.
comment 17y ago · link · parent
It addresses self-control: evidence exists to support the idea that human have a limited amount and range of focus of self-control, and can suffer from self-control fatigue:
http://www.stolaf.edu/people/huff/classes/GoodnEvil/Readings...
Hell, that paper was on HN not long ago.
Self-control is not a great vehicle for weight loss, as is evidenced by the recidivism rate for diets, fad or otherwise. "Use self-control" is shitty advice for weight loss. "Avoid the cue-dopamine-behavior-opioid reinforcement cycle by using cognitive psychology self-talk to associate negative emotions with salient cues, consciously pre-determining behavior for when one is presented with salient cues, and avoiding hyperpalatable foods with high levels of salt, sugar, and fat" is closer to the mark, though it's not as punchy. Also doesn't provide the same sense of moral self-satisfaction from being stronger than fat people.
I have no idea where you're coming from with the special snowflake crap. The article was not titled Exercise Won't Make You Thin (So Buy A Mu-Mu And Eat Up Fatty Because You're Never Going To Change And That's OK). In fact, the article concludes with: "In short, it's what you eat, not how hard you try to work it off, that matters more in losing weight. You should exercise to improve your health, but be warned: fiery spurts of vigorous exercise could lead to weight gain."
I fail to detect the self-esteem happy-talk fatalism to which you're reacting.
comment 17y ago · link · parent
Or, alternatively, fat people are sissies. It's an, uh, interesting theory you've put forth. Best of luck in getting that paper published.