News for hackers. Stuff that matters.
Re:SingleHop Are Cheats by tomjen3 on Friday September 16, 2011 @08:11AM (#3004120)
That isn't strange though -- if I were creating a file that I knew would only be used for speed testing, I would make it al nulls too.

It is just much easier to find a file that is some exact distance if you create it first.

Re:SingleHop Are Cheats by piaskal on Friday September 16, 2011 @08:29AM (#3004160)
I'd use random data to make it hard to compress. You don't know if there won't be some link layer compression along the way.
Re:SingleHop Are Cheats by kcbanner on Friday September 16, 2011 @11:52AM (#3004939)
That doesn't really fix the problem, what if that random data happened to compress well? The solution is to not compress anything while downloading.
Re:SingleHop Are Cheats by gojomo on Friday September 16, 2011 @01:41PM (#3005454)
"Random data' [1] will not compress well [2].

[1] high-entropy in any of the usually-available ways

[2] for any compression system actually deployed, as opposed to one contrived to match specifically the 'random' source

Re:SingleHop Are Cheats by cbr on Friday September 16, 2011 @01:02PM (#3005270)
A large quantity of random data is incredibly unlikely to compress well.
Re:SingleHop Are Cheats by hyperbovine on Friday September 16, 2011 @08:47AM (#3004214)
$ dd if=/dev/random of=nonbullshittestfile bs=1M count=500
Re:SingleHop Are Cheats by treo on Friday September 16, 2011 @09:06AM (#3004273)
That would take forever, at least on my system, as I don't really have a lot of entropy available. Just for kicks I have started this when I began writing this reply. And now I have the huge amount of 200 Byte in this test file. So thats about 10 bytes per second.

But if you take /dev/urandom you can get quite a bit more. On this system it is about 7Mbyte/s.

Re:SingleHop Are Cheats by jcromartie on Friday September 16, 2011 @09:33AM (#3004366)
What's the difference between /dev/random and /dev/urandom? I've only ever used urandom and it spits out data as fast as I can consume it.
Re:SingleHop Are Cheats by ominous_prime on Friday September 16, 2011 @09:41AM (#3004394)
/dev/random uses environmental noise for entropy, and can be depleted rather quickly.

/dev/urandom supplements its entropy with a PRNG so that it never blocks..

Re:SingleHop Are Cheats by stillinbeta on Friday September 16, 2011 @09:40AM (#3004390)
/dev/random will block while waiting to collect entropy from the system. /dev/urandom will be satisfied with pseudorandom numbers. That's fine for many applications (e.g. a file filled with garbage) but not acceptable for things like cryptography.
Re:SingleHop Are Cheats by ibisum on Friday September 16, 2011 @10:27AM (#3004529)
That entropy, by the way, is derived from the keyboard and mouse devices. If you want /dev/random to go faster, move your mouse and type more ..
Re:SingleHop Are Cheats by pavel_lishin on Friday September 16, 2011 @11:45AM (#3004899)
Can it be configured to use other sources?

Does this mean that if I've got a server with no mouse/keyboard attached, /dev/random will block forever?

Logging into my slicehost server, and running cat /dev/random | hexdump -C seems to support this, more or less - only a few lines get output unless I start typing into the terminal - then it goes marginally faster.

Re:SingleHop Are Cheats by tlrobinson on Friday September 16, 2011 @01:25PM (#3005370)
Re:SingleHop Are Cheats by simcop2387 on Friday September 16, 2011 @11:58AM (#3004965)
It will also use other interrupt timings in the creation of the entropy, most notably hard drives since they're rather random on when they reply back due to it having to rotate to the right place. Not sure how this works on an SSD. I also believe if you've got some kind of hardware RNG it will use that too.
Re:SingleHop Are Cheats by jcromartie on Friday September 16, 2011 @02:51PM (#3005752)
Interesting. I don't see /dev/random blocking on Mac OS X (13" MacBook Pro). I wonder what the source is?
Re:SingleHop Are Cheats by eridius on Friday September 16, 2011 @04:01PM (#3006059)
On OS X, /dev/random and /dev/urandom are the same thing (both acting like the traditional /dev/urandom).
Re:SingleHop Are Cheats by tsuraan on Friday September 16, 2011 @12:19PM (#3005066)
I'm guessing it may be even smaller than a file filled with zeroes. If I were doing it, I'd use a sparse file, so it only takes a few blocks, but (sans compression) would take a long time to download. Like this:

  tsuraan@macbeth ~ $ dd if=/dev/zero of=abigfile bs=1M count=1 seek=1000000
  1+0 records in
  1+0 records out
  1048576 bytes (1.0 MB) copied, 0.00320282 s, 327 MB/s
  tsuraan@macbeth ~ $ ls -lh abigfile 
  -rw-r--r-- 1 tsuraan tsuraan 977G Sep 16 11:18 abigfile
I probably wouldn't actually make it ~1TB, but that's the idea.
Re:SingleHop Are Cheats by randy99 on Friday September 16, 2011 @10:24AM (#3004520)
Surely you wouldn't get as greedy as they did though? Nobody would've suspected them if they had've been a little less "cheaty".