Refugees

I am ashamed of my Massachusetts governor Charlie Baker.  He has joined the chorus of (typically) Republican politicians who want to turn away helpless women, children, and families from our doors because of the remote chance that among them is a terrorist.
This is pandering of the worst sort. Pretty much everyone in this country is a refugee or descended from one,  My mother came here in 1939 on the run from Nazi Germany. This is different how?
It is too bad, really, until today, I kind of liked him.
 

Old photo comes in handy

 
I took this photo on June 12, 1999 when the house was being built.  This was an HP C40 digital camera, with an awesome 576 × 436 0.3 Megapixels.  It seemed high-tech at the time. Today the insulation people showed up, as followup to an energy survey, to add insulation inside the floor under a luggage storage nook we have.  It is insulated, but unheated, and they recommended adding additional air sealing to keep the cold air from spreading out through the between-floors space.
This photo is looking up from the front porch.  In the lower left, you can see the upstairs radiant heating tubes under the living space, but NOT under the unheated storage area.  In order to add air sealing, the workers were going to drill into the floor from above, and I needed to check whether they would risk drilling into the tubing.  By looking at this old photo, I could tell where it was safe to drill.
You can also see that the floor joists are open trusses, with 2×4 plates and zigzag webs. This mean the entire floor space is open, so it is important to have an air barrier between heated and unheated space.
Unfortunately, this justifies my pack-rat instincts, to save 16 year old photos, but sometimes it is useful.  I took video (analog!), film photos, and digitial photos of walls and ceilings, in case I ever needed to know what was in there and where.
 
Veranda roof outside study

When WD40 Isn't Enough

About two weeks a year, it gets hot enough and humid enough here in Massachusetts to push us into turning on the air conditioning.
For the first few years of the century, after the house was built and we moved in, everything was fine, but in recent years not so much.  We have different AC zones, and separate systems for each.  Each year, typically, one or two of the units don’t work.  Not work as in blow hot air instead of cold.   I then go outside around back and discover that the fan in the outside unit isn’t spinning.  Until last year, I’ve always been able to fix this problem by reaching through the grill and unsticking the fan with a screwdriver, or in the worst case, by taking the fan and motor off and whaling on it with a hammer. Evidently, enough moisture gets into the motor bearings over the winter to seize them beyond the motor’s starting torque’s ability to spin.
Brief Digression on AC

Air conditioners work by expanding a high pressure gas or fluid like freon through a nozzle into a low pressure gas.  As a consequence of the ideal gas law, the expanding gas gets cold.  It is then run through a heat exchanger inside the house, where the cold gas absorbs heat from the room air. (There is usually a fan to push the room air through the radiator fins of the heat exchanger.  The expanded gas is then piped outside to a compressor.  The compressor squeezes the working fluid, which according to the gas law, heats it up.  Because heat was absorbed from the room, the compressed gas is now hotter than it was originally.  It is then run through the outside heat exchanger, when a fan blows warm outside air past it to absorb the heat from the (hot) compressed gas.  (I am using “gas” and “working fluid” interchangeably here.  In fact, I think freon is one of those things that turns into a liquid at high pressure, so there is a phase change involved as well.)  if the outside fan doesn’t work, then the there is nothing to cool off the compressed gas, and the whole outside unit eventually gets so hot that the thermal overload switch in the compressor shuts it off.  This is why fixing the outside fan fixes the whole AC.

End digression

Well last year, one unit’s fan wasn’t spinning, but wasn’t stuck either.  There are only three reasons why that could be: no power, bad motor, or bad capacitor.  I was able to measure that the power was present, and it was cheaper to replace the capacitor, and that fixed it.  Except that my measurements seemed to indicate there was nothing wrong with the old capacitor.  I had fixed a loose push-on connector, so I wrote off the experience.
This year, same problem, same unit.  The motor was not stuck, but wasn’t spinning either.
Brief digression about induction motors

Electric motors work by having a spinning magnet (the rotor) driven by a stationary magnet (the field).  Now the magnets are going to want to line up north pole opposite south pole, and stay that way, so there also has to be something that makes “north” spin. Some motors have the rotor or the field be a permanent magnets with the other being an electromagnet, while other motors have electromagnets for both field and rotor.  If the rotor is an electromagnet, there will often be brushes to supply power to the rotor.  An induction motor is kind of strange, in that both the field and the rotor are electromagnets, but the power for the rotor is supplied by induction, with no physical connection.

A three phase induction motor is fairly easy to understand. The field has three windings, fed by the three phases.  They are rotated with respect to on  another by 120 degrees.  As the current in phase “A” dies down, the current in phase “B” is picking up, and as a consequence the direction of North in the field windings rotates by 120 degrees.  With three phases, you get a nice rotating field, and the rotor follows it, with just enough lag to generate an induced current in the rotor to create the rotor magnetic field.  A single phase induction motor is different, the field merely reverses 120 times a second.  If the rotor is spinning, then it will keep spinning, but there is nothing to get it started!  To solve this problem,  single phase induction motors have a capacitor.  The capacitor is connected in series with another field winding that is rotated with respect to the main winding.  Due to the properties of capacitors, the current in this starting winding will be advanced with respect to the current in the main winding.  This gives enough of a rotating field to get the rotor started spinning.  In fact, if you have an open circuit starting capacitor, you can sometimes start the motor by hand by giving it a spin yourself.

End digression

Because it seemed really unlikely that the new capacitor failed over the winter, I resolved to replace the motor.  The problem was that I could not get the fan off the motor shaft!. The steel shaft was pretty well rusted together with the steel fan hub into a single glob.  Repeated application of WD40 and hammers and so forth did nothing.  By suitable pounding, I could move the fan axially towards the motor.  By supporting the fan and pounding on the shaft, I could move it back, but hammering on the shaft was mushrooming the end of the shaft, so there would be no way to get the fan off.  The usual tool for this problem is a gear puller, but a two-fingered gear puller won’t work with a three bladed fan.  I have some nice pipe wrenches with which to twist the shaft against the hub, but the fan was too close to the motor for the wrench to fit, and the motor shaft didn’t come out the other end of the motor.
My solution to this is somewhat destructive!  I used my angle grinder with a metal cutting wheel to take the motor apart.  By grinding off six rivets I was able to get the back of the motor off, but there was nothing to grab with the wrench.  I then used the cutting wheel to cut all the way around the fan end of the motor housing, at which point the field assembly came off, revealing the rotor.  I could then grab the rotor with one wrench and the fan hub with the other and twist them apart.

Taking apart the fan motor
Taking apart the fan motor

This whole exercise was destructive and messy, and no doubt a new fan would be less trouble overall, but it sure was fun.
 

Town Meeting

Here in New England, many towns are run by Town Meetings.  It is very democratic. Things that need voting, such as the budget, accepting gifts of land, and putting up no-left-turn signs at popular intersections are written up as articles for Town Meeting.  Any resident who wants a say in how things are run has to show up.
Votes used to be taken by the moderator’s estimate of ayes and nays, and if that seemed close, by standing votes, and if that seemed close, by counts taken by pairs of volunteers.
These days we using Electronic Voting.  Each voter gets a little wireless keypad.  When the voiting lamp is on “the window is open” you press 1 to record a Yes or 2 to record a No.
This got me thinking.  It sometimes happens that a small subset of residents is Very Upset about something, like those no-left-turn signs.  Eventually, the rest of us get sleepy, and someone makes a non-debatable motion to close debate.  This requires an immediate vote and a 2/3 majority.  How about making the process continuous?  The voting gizmos have 10 buttons, I think you should be able to press “terminate debate” at any time, and whenever the total goes over 2/3 that’s it.
I would also recommend buttons for “the current speaker is annoying” and so forth, the results of which are put up on the jumbotron, but tiny steps for tiny feet.
And why do sponsors of popular articles, like the new solar panels, go on for 10 minutes presenting all the details of something that is going to win in a landslide anyway?
 

Cryptographic Modules

Steve Bellovin has a post The Uses and Abuses of Cryptography in which he comments on the recent Anthem data breach.  At Anthem, supposedly, the database of important stuff like customer addresses and social security numbers was not encrypted, because it was in use all the time.Steve says, “If your OS is secure, you don’t need the crypto; if it’s not, the crypto won’t protect your data.”
His point is that the decryption keys have to be in RAM somewhere for the system to work, so if the OS is insecure, the keys can be stolen, and the encrypted database decrypted anyway.  This is not necessarily true.  IBM (see, for example IBM PCIe Cryptographic Coprocessor) http://www-03.ibm.com/security/cryptocards/pciecc/overview.shtml) and others make hardware units that provide encryption and decryption, and store the master keys.  With appropriate hardware, the keys are NOT in RAM and can’t be stolen.  This still isn’t enough, because a compromised host system can still command the crypto box to decrypt the data.  To go further, you have to have velocity checks inside the trusted part of the system, to alarm on and halt unexpected volumes of traffic.
The data itself also has to be carefully organized. Each record has to have its own key.  Record keys are stored in the database encyrpted by a master key, which is only stored in the cryptographic hardware module.
It is probably going to be impossible to prevent theft of individual records.  An insider can always photograph data off the screen in a call center.  I think we can do much better about technical means to prevent bulk data breaches.
There is a whole new area of research on how to make cloud computing trustworthy.  How can you get anything done when your code is running on potentially compromised hardware or on a virtual machine pwned by the bad guys?  It might be possible!  Homomorphic encryption makes it possible to perform computations on encrypted data, and perhaps cloud servers will at least come with cryptographic modules that at least can limit the rate at which your data can be stolen.
Update: February 24, 2015
Steve points out via email that many kinds of tasks, such as a batch job generating annual statements, have to touch all records, so rate-limiting (velocity checks) might not be effective.

Net Neutrality

I wrote a letter to the editor of the Wall Street Journal today.  In my opinion, Internet service providers and backbone providers should be “common carriers”.  They should not be allowed to charge different rates for different bits, and they shouldn’t be allowed to even look at the traffic other than for routing.  Today I was so offended by the disingenuousness and misrepresentation of L. Gordon Crovitz’ op-ed that I felt compelled to respond:

Timothy Lemmer
Letters Editor
Wall Street Journal

Regarding “The Great Internet Power Grab” by L. Gordon Crovitz, Feb. 8, 2015.  Mr Crovitz is misinformed or disingenuous.

The FCC proposes to reclassify broadband Internet access services – consumer access to the net – as a telecommunications service rather than as an information service.  The FCC does not propose to regulate content providers or startups providing innovative services, or end users of any sort.

Mr. Crovitz proposes we should be so afraid of unlikely future abuses by regulators that we should not move to stem current and actual abuses by the cable and telephone industries that provide the majority of internet access.

  • Verizon spies on customer communications to install tracking cookies (1)
    Comcast demands payments from content provider Netflix merely to get access to customers (2)
  • ATT blocks customers who attempt to encrypt their own email (3)
  • These are actual abuses by companies exploiting their near monopoly positions to damage competition, harm innovation, and endanger customer privacy.

It would be great if Congress would get its act together to promote innovation and forbid discrimination.  Until then, the FCC appears to be doing its best to protect the public from the telecom companies who are the current unaccountable gatekeepers of the net.

Lawrence Stewart
Wayland, MA

References

(1) https://www.eff.org/deeplinks/2014/11/verizon-x-uidh
(2) http://www.wsj.com/news/articles/SB10001424052702304899704579391223249896550
(3) http://arstechnica.com/tech-policy/2014/11/condemnation-mounts-against-isp-that-sabotaged-users-e-mail-encryption/

Windows 7 Disk Upgrade

It is a mystery to me why laptop makers charge such a premium for SSDs.  Well, no, it’s not a mystery, they do it because they can.  Part of the reason is that it is such a pain, in the Windows world, to upgrade.
Cathy recently got a new HP ProBook 640 G1, replacing her ancient Vista machine.  The new laptop came with a 128 GB SSD, which served its purpose of demonstrating how dramatically faster the SSD is than a regular hard drive, but it is too small.  Her old machine, after deleting about 50 GB of duplicate stuff, was already at 128.
It is much cheaper to buy an aftermarket 256 GB SSD than to buy the same laptop with a larger SSD. so we set about an upgrade.
HP Laptops, at least this one, do not ship with install disks, instead, they come with a 12 GB “recovery partition” that soaks up even more of the precious space.  You can reinstall the OS from the recovery partition as often as you like, or you can, exactly once, make a set of recovery DVDs or a recovery USB drive.
There are two main paths to doing a disk upgrade:

  • Replace the disk, and reinstall from the recovery media
  • Replace the disk, make the old disk an external drive, and clone the old disk to the new one.

The first path is less risky, so we tried that first.  I had purchased a nice, large USB3 thumb drive for the purpose, and … the HP recovery disk creator would not create a USB!  What is this, 2004?  HP support is actually quite good, and I suppose that is part of what you pay for when you buy a “business” notebook.  They were surprised by this lack of functionality, since it is supposed to work, and eventually decided to send us recovery media.  They sent DVDs, which is not what we want, but fine.
The HP media worked fine to install onto the new 256 GB SSD, but did not restore much of the HP add on software.  Most manufacturer add-on software is crapware, but HPs isn’t bad.  We got most of the missing bits from the support.hp.com website except for the HP documentation!  You can get the PDF files for the user and service manuals, but not the online HP Documentation app.
Our plan was eventually to trickle down the 128 GB SSD to one of the kids, so we didn’t mind using up its ability to create recovery media, so we tried that next.  Rather than screw up the almost-working 256 GB drive, we installed an old 160 GB drive from Samantha’s old Macbook (replaced earlier by an SSD).
The home-created recovery media did better, installing all the HP add-ons…except the documentation!
Now with three working drives, and two sets of recovery disks, I felt confident enough to try the alternative: cloning the original drive.  I had a copy of Acronis True Image 2010, but couldn’t find the disk for it.  The new SSD came with a copy of True Image 2014, but first I read up on the accumulated wisdom of the Internet.  There’s a guy, GroverH, on the Acronis forums (see  https://forum.acronis.com/forum/3426 ) who has an astonishing set of howtos.
Manufacturers who use recovery partitions really don’t want you to clone drives, perhaps this is pressure from Microsoft.  It works fine if the new drive is exactly the same as the old one, but if not, unless the partition sizes are exactly the same, the result is not likely to work.  The cloning software will scale the partitions if you restore to a bigger drive, but they won’t work.  You have to manually tweak the partition arrangement.  Typically the recovery partition is at the end, the boot partition is at the beginning, and the “C:” drive uses the space inbetween.
Now earlier when I couldn’t find the True Image install disk on another project, I tried the Open Source CloneZilla and was quite happy with it.  It is not for the faint-hearted, but it seems reliable. I used CloneZilla to make a backup of the original drive, and then, because the recovery media had already created a working partition structure, merely restored C: to the C: of the experimental 160 GB drive.  Windows felt like it had to do a chkdsk, but after that it worked, and lo, the HP documentation was back!  (And Cathy’s new screen background.)
As the last step, we put the 256 GB SSD back in, and used CloneZilla to restore C: and the HP_TOOLS partition contents that weren’t quite the same in the original and recovered versions.
Whew!
So, contrast to a disk upgrade on a Mac:  Put in new drive, restore from Time Capsule, done.  And this restores all user files and applications!
Next challenge: migrating Cathy’s data files and reinstalling applications.  Memo to Microsoft:  it is just unreasonable that in this new century we still have to reinstall applications one by one.
 

Hotel Internet – Hyatt French Quarter

I write from my room at the Hyatt French Quarter.
Your hotel internet service stinks.
I would rather stay in a Hampton Inn or like that than a Hyatt.  You know why?  The internet service in cheap hotels just works.  Yours does not.
You advertise “free internet”, but it costs rather a lot in the inconvenience and irritation of your customers, who are paying you quite a lot of money for a nice experience.
I have three devices with me.  A laptop, a tablet, and a phone.  On each one, every day of my stay, at (apparently) a random time, each one stops working and I have to connect again.
Here is what that takes:

  • Try to use my email.  Doesn’t work
  • Remember that I have to FIRST use a web browser.
  • Connect to hotel WiFi (ok, this step is expected, once)
  • Get browser intercept screen
  • Type in my name and room number
  • Wait
  • Read offer to pay $5 extra for “good” internet service, rather than crappy. The text says this offer “lasts as long as your current package”  is that per day? Per stay? What?
  • Click “continue with current package”
  • Wait
  • Get connected to FACEBOOK.

Why?  I can’t explain it.  People my age think Facebook is something kids use
to share selfies.  The kids think Facebook is for, I don’t know, old people, they
are all on Twitter.
Then I have to remember what I wanted to do.
Are you serious?  Do you think this process, repeated for my three devices, EVERY DAY, is going to make me recommend your hotel?
Now let us talk about privacy.
It irritates me that you want my name and room number. I do not agree that you can track my activities online.  It is none of your business.  I run an encrypted proxy server back home.  So all your logs will show is that I set up one encrypted connection to the cloud for my web access.  My email connections are all encrypted.  My remote logins to the office are all encrypted.  My IMs are encrypted.
I read the terms and conditions, by the way.  They are linked off the sign on page.   They are poorly written legalese, and there are a number of ways to read them.  One way says that you track all my connections to websites but only link them to my personally identifiable information if you need to “to enforce our terms and conditions”.  They also say that you have no obligation to keep my activities confidential.  And who or what is Roomlynx?
Even if your terms said otherwise, I wouldn’t believe you.  I don’t trust you OR your service providers.
Here’s my suggestion:
I think all this effort you’ve gone to is a waste of time, effort, and money. You do not have the technical means to monitor or control how I use the net anyway, so why make your customers jump through hoops?
If your lawyers tell you these steps are necessary, get different lawyers who have a clue.  If you still think it is necessary, have the terms and conditions be attached to the room contract!
If you seriously have a problem with non-guests soaking up your bandwidth, then by all means add a WiFi password, and hand it out at checkin.
If you seriously have a problem with bandwidth hogs, then slow down the connections of actual offenders.
Basically, try your best to make the Internet work as well as the electricity you supply to my room.  I turn on the switch, the lights go on. Done.
By the way, modern OS’s like Apples MacOS Yosemite, frequently change the MAC address they use. This will likely break your login system, raising the frustration of your guests even more.  They will not blame Apple for trying to protect their privacy.  They will blame you.  I already do.
PS  I don’t like to help you debug a system that is fundamentally broken, but:

  • The hotel website still says Internet costs $9.95 per day.  Update that maybe?
  • There is no way to go back and pay the extra $5 for better service one you’ve found out how crappy the regular stuff is.
  • After you connect, you can no longer find the terms and conditions page
  • I accidently tried to play a video, and your freaking login screen showed up in the video pane.  That just makes you look even sillier.

Random Walks

One blog I follow is GÖDEL’S LOST LETTER
In the post Do Random Walks Help Avoid Fireworks, Pip references George Polya’s proof that on regular lattices in one and two dimensions, a random walk returns to the origin infinitely many times, but in three dimensions, the probability of ever returning to the origin is strictly less than one.
He references a rather approachable paper explaining this by Shrirang Mare: Polya’s Recurrence Theorem which explains a proof of this matter using lattices of reisistors in an electrical circuit analogy.  The key is that there is infinite resistance to infinity in one or two dimensions, but strictly less than infinite resistance to infinity in three dimensions.
This is all fine, but there is another connection in science fiction. In 1959, E.E. “Doc” Smith’s The Galaxy Primes was published in Amazing Stories.
Our Heros have built a teleporting starship, but they can’t control where it goes.  The jumps appear long and random.  Garlock says to Belle:

“You can call that a fact. But I want you and Jim to do some math. We know that we’re making mighty long jumps. Assuming that they’re at perfect random, and of approximately the same length, the probability is greater than one-half that we’re getting farther and farther away from Tellus. Is there a jump number, N, at which the probability is one-half that we land nearer Tellus instead of farther away? My jump-at-conclusions guess is that there isn’t. That the first jump set up a bias.”
“Ouch. That isn’t in any of the books,” James said. “In other words, do we or do we not attain a maximum? You’re making some bum assumptions; among others that space isn’t curved and that the dimensions of the universe are very large compared to the length of our jumps. I’ll see if I can put it into shape to feed to Compy. You’ve always held that these generators work at random—the rest of those assumptions are based on your theory?”

Garlock is right – this is a three dimensional random walk and tends not to return to its starting place, but James is wrong when he says this isn’t in any of the books.  Polya proved it in 1921.
 

Duress passwords and other side effects

Fifteen years ago when we built our house, we had a home security system installed.  It has the usual alarm panel with a keypad inside the door.  When you come in the house, you have 30 seconds to key in your password to stop the alarm from going off.
If the alarm does go off, the monitoring company will call you to find out if it was a mistake or a real alarm.  Each authorized user has a passcode to authenticate themselves to the monitoring company.  You can’t have the burglar answering the phone “No problem here! False alarm…”
In fact, there are two passcodes, one authenticates you, and the other is a duress password.  If the burglar is there with you, you use the duress password, and the monitoring company behaves exactly the same way, but they also call the local police for you.  It is important that the burglar cannot tell the difference.
It seems to me that ATM cards should have duress PINs as well as real ones.  If a criminal says “type in your ATM pin or else” then fine, you enter the duress PIN.  The ATM behaves exactly the same way, but the bank alerts the police and sends them the surveillance video.
Duress passwords have a lot of other potential uses.  If your school principal demands your facebook password, you give up your duress password.  What happens next could depend on which password you give.  At the extreme, your whole account could be deleted.  It could be archived on servers out of legal jurisdiction, your stuff visible only to friends could seem not to exist for a week.  Whatever.  Options that appear not to do anything are best, because then the school admins can’t tell you have disobeyed them and suspend you.
While I am riffing, there should be a  phrase you can say, like “I do not consent to this search” or a similar account setting, that makes the administrator’s access an automatic CFAA violation. (I think the CFAA should be junked, but if not, it should be used to user’s benefit, not just the man’s.)
Finally, regarding authentication, there should also be two-factor authentication for everything, and single-use passwords for everything.  Why not?  Everyone has a nice computing device with them at all times.  Of course your phone and the authentication app should have a duress unlock code.
So next time you are building an authentication structure, build in support for one-time passwords, two factor authentication, and a flexible set of duress passwords.