Atomic I/O letters column #52
Originally published in Atomic: Maximum Power Computing Reprinted here December 2005.Last modified 16-Jan-2015.
Eat your heart out, ZIP
In Atomic #53, it says that any file can be given a fingerprint using MD5 hashing. Would you be able to reverse this hashing system and, from 99b5d7befcadb501fe7568ed4e8f4c5, be able to create the original text file saying "Yes Sir, Very Atomic!"?
Could this work on large scale, say hashing a 100Mb file then posting this hash on the Internet so people could download it and then recreate the file on their computer?
Stephen
Answer:
Think of the output from a hash function as a label on the front of a drawer. In the drawer is any file that hashes
down to whatever's printed on the label. The label doesn't tell you what's in the file, though; it's much too small
to be able to do that, unless the file itself is trivially small. Which, in the case of the simple "Yes Sir..." sentence,
it actually is - but MD5 isn't trying to tell you what's in the file. It only wants to create a hopefully-unique
drawer-label number for you.
The idea is that MD5 evenly, and unpredictably, distributes input files between all of those drawers, making it vanishingly unlikely that any two will go to the same place. That's because although a 128 bit number can easily be written down (128 zeroes and ones, or the more common 32 hex digits; four bits per hex digit), it still gives an astounding, brain-bending, number of possibilities.
Two to the power of 128 is a really, really big
number - roughly 34 followed by 37 zeroes. There's no way to make this number intuitively graspable. If, for instance,
you had 2^128 actual physical drawers, and you put them side by side, then even if the line of drawers reached as
far as the most distant observable objects in the universe -
Quagaars
quasars about 13 billion light years away - each drawer
would still be less than one twenty-five-thousandth of the size of a hydrogen atom.
Or, to put it another way, if you took the whole mass of the planet Earth and used it to make the drawers, each one would weigh roughly one fifty-seven-billionth of a gram.
Interestingly, though, MD5 is not the perfect drawer-selector that it's meant to be, although it took a while for people to figure out how to create "hash collisions".
You can read more about MD5's weaknesses here, and all about it here.
Little box, big noise
I seek your scholarly wisdom on the matter of replacing a (somewhat) noisy power supply in my dinky little Athlon powered shoebox (otherwise know as a Shuttle XPC SN41G2).
The power supply in said shoebox has a small fan, which spins fast and makes a bit of noise. I was thinking that it may be feasible to rip it out and hack together an "external" power supply from a couple of "power bricks" or something. It should be somewhat possible because Shuttle sell one of their models (ST62K) with an external power brick (it wasn't around when I bought mine).
The only complication I could see would be getting DC power bricks that can supply enough power. The current power supply is supposedly 250W, but I think that might be more than a little marketing mumbo. (Specs for a similar PS can be found here). The external power brick for the ST62K is rated at 180W.
In my brief research I couldn't find a power brick that came close to matching the maximum power rating (of each individual rail) of my current PS. Is the idea of running a PC off a couple of power bricks plausible (and not going to cost a fortune), and more importantly not a stupid idea?
Ian
Answer:
Even in these days of lightweight couple-of-amp
switchmode wall warts, it's still not practical to run any normal PC hardware (as opposed to laptops, tiny
PC/104 boards and, maybe,
Via Eden hardware) from plugpacks. Quite apart
from the fact that you need multiple voltages, you just won't be able to get the necessary current out of plugpacks,
as you've noticed.
There are two ways you can go, here.
Option one: Change the ventilation. The SN41G2, like various other Shuttles, is cooled by two exhaust fans - the PSU fan, and the 80mm unit on Shuttle's clever rear panel heat pipe CPU radiator thingy. You can't just unplug the PSU fan or the power supply will overheat; you might be able to speed-control the PSU fan into quietness (it'll be a 12V unit - usual warnings apply about opening the PSU) without causing problems, but then the thermally controlled main fan will probably run louder, and you'll have gained little.
You could, however, jigsaw or Dremel a big old hole in the top of the case and put a 120mm fan on it. Speed-control that fan to near-silence, and a slow or removed PSU fan should be OK. Slow 12V 120mm fans are very quiet, especially when they're intake fans.
Option two: Change the PSU. The FN41 motherboard in your Shuttle, like all of their "full power" hardware, can run from a standard ATX12V PSU. The super-quiet full-sized PSU of your choice will run your little computer just fine, and the Shuttle's standard 80mm fan will keep it cool.
If you do the 120mm fan thing as well as go to a full-sized PSU, you may be able to do away with the 80mm fan too. You could also try using the big PSU's fans to move air through the case, with a duct or just by cutting a hole and attaching the PSU to it.
Paper clips and gaff, mate
I've just added a Mac Mini alongside my Windows box. I'd like to pipe the sound for both boxes through my speakers (Logitech Z5300, for what it's worth).
The Windows box has a M-Audio Revolution 7.1 sound card; the Mac mini has stereo out. Currently I've got the Mac's output going into the M-Audio card's line-in, which then gets piped through to the speakers. The biggest problem with this arrangement is that the M-Audio card's line-in is kind of noisy. This is a pain at higher volumes, or when I'm using headphones (the Z5300 has a headphone jack).
I'd like to connect both the Mac and the Windows box directly to the front speakers at the same time. I'm not above splicing something together - I've certainly handled a soldering iron, and even a few simple ICs - but I certainly wouldn't turn down an off-the-shelf solution.
Matt
Answer:
The simplest way to do this, as employed by 90% of teenagers with a collection of audio gear to connect together
(well, not counting the ones that enjoy swapping plugs), is to just use Y-adapters.
As far as I can tell, the Tandy/Radio Shack versions of these things come out of the package with the dirt of many years already on them. It's a rule of the universe, like the one about eighth-to-quarter headphone adapters being spontaneously generated near any pile of hi-fi components.
Anyway, Y-adapters are a bad solution, because unless everything's turned on all of the time (and possibly if it is), you'll get impedance mismatches, probably producing a low audio level. You compensate for that with more volume, then you turn something else on, and everything gets really loud.
When teenagers tire of Y-adapters, they generally buy a cheap mixer from their local So You Think You're A DJ But You've Only Got A Hundred Bucks place. This works much better, but cheap mixers invariably have lousy signal to noise ratios. They're actually pretty adequate for band use in your garage (especially if it's a punk band), but if you're noticing sound card input noise now, you'll definitely notice cheap mixer noise.
Low noise mixers are much more expensive, and overkill, because they all have far more than the few channels you need. There are two and three channel low noise mixers designed for mobile recording applications, but they're even more expensive, feature-for-feature. It's ridiculous to buy a thing like that when all you actually need is a Y-adapter with no impedance mismatch problems.
The solution is a passive mixer, which splices the signals together through impedance-matching resistors. Passive mixers are simple and cheap, need no power supply, and can't introduce any noise of their own - well, unless they've got noisy level potentiometers, and even then you'll only get noise when you're moving the knob or slider.
On the down side, passive mixers eat some signal; you'll need a higher volume setting. This is seldom a problem for line level sources like computers - modern computer "line level" outputs can pretty much all deliver a clean signal at more than line voltage (because they have to be able to drive headphones), so you shouldn't have volume difficulties.
Many passive mixers are mono units made for instruments and mics, but it's not hard to find stereo units (even cheap on eBay, from time to time), and RCA connectors can be had, as well as studio 1/4 inch mono sockets.
And yes, you can make your own. It's especially easy if you don't need any level adjustment.
Not snake oil, for once
I know you like debunking miracle devices, so I just wanted to find what you think of "the Mini Sun Power Saver" and "The Harmonizer".
These are just some sites I Googled when I learned that someone I know was interested in selling something similar.
Mark
Answer:
These things are power-factor correctors, which are pointless for home use.
The Mini Sun thing is so small that it can't do much of anything. The Legend Power product, despite its dodgy name, is a big expensive commercial unit that probably does what it says.
Power factor correction (PFC) will save you money, if you're billed according to your power factor and run hardware with a bad power factor. This situation is common for commercial power users, but pretty much unknown for domestic power. Domestic power meters don't notice bad power factor.
PFC will not, however, generally make lights or motors run better. It'll improve the (typically very bad) power factor of underloaded motors and make them run cooler, but your gear shouldn't have underloaded motors in it in the first place; motor power should be matched to the task, and a properly loaded motor typically has a very good power factor. And a single device may or may not correctly compensate for the differently lousy power factors of the various devices on a circuit; it may make the total collection look better to the power company, but not make anything work better in the building.
(Some older home appliances have overpowered motors, and so can benefit from PFC, but it's often a better idea to just buy a newer, more efficient appliance with a smaller, lighter, better motor. Yes, modern washing machines feel as if they're made out of cardboard compared with the monsters from a few decades ago, but it's not all because cynical manufacturers are building them to break these days.)
The non-PFC portion of the claims for these devices has to do with surge and spike suppression, which the big commercial "Harmonizer" may well do. Once again, this is unlikely to make anything run better day-to-day, but proper power conditioning can make a huge difference if you live somewhere with unreliable and/or dirty mains power. And, again, a small, light, cheap gadget is not a proper power conditioner.
I ramble on further about PFC here.
(In the years since I first wrote the above, a plague of fake "power saving" devices have hit the market. Most of them are claimed to work by correcting power factor, even though few electricity users are even billed by power factor, and the components inside the "power saver" aren't necessarily even connected. I've blogged about different versions of these things here, here, here, here and here!)