Death by Convenience

12 08 2012

You’re driving down a local highway in your Dodge Ram, and it’s raining.  We could argue about your choice in vehicles, but that’s not really important.  It just happens that a Dodge Ram is parked in a bad and annoying place right now, and I had the time and audacity to go outside and take its measurements, for want of a more amusing pastime.  Did you know that the side door is two and a half feet high, and four feet long?  You don’t care.  Of course you don’t care, because you’re too busy trying to steer through the rain.  It doesn’t help that your tires lost traction, and you barreled down an embankment right in front of a bridge, landing you in the river.  Naturally, your first inclination is to open the door and escape your rapidly sinking vehicle.  What’s that you say?  You can’t open the door?  Oh, yes, well, that brings us back to the dimensions of your door.  Did you know that water weighs about 62.4 pounds per cubic foot?  Please don’t yell at me; I’m only trying to help.

Well, fortunately for those of us who never found use for calculus beyond our college years, your door is roughly rectangular.  Otherwise, we’d have to go back and re-learn all that…stuff.  This should help in making the calculations simple.  With the waterline sitting just below the level of the side window, the average depth of the submerged part of the door is about a foot and a quarter.  Because water weighs 62.4 pounds per cubic foot, a depth of one and a quarter feet gives an average pressure of about 78 pounds per square foot (62.4 lbs/ft3 × 1.25 ft).  Because your door is four feet long and two and a half feet tall, giving you an area of 10 square feet, that pressure comes out to 780 pounds.  Fortunately, your hinge takes half of that weight, so you only need to push with the force of 390 pounds.  You can do that, can’t you?  You shouldn’t say those things!  Children could be listening!

If your truck were turned on its side, and you had four and one-third 180-pound men standing on the door, the effect would be the same.  At least, the effect of trying to open the door would be the same, not including the problems associated with hanging sideways.  Never mind the psychological effect of having that third of a man sitting on the door.  I think, now that I imagine it, if I had four men and a third of a man standing on the door of my overturned vehicle, I might consider staying inside and taking my chances with the water, but I digress.  Most people don’t have enough strength in their left arm and left leg to open a door at 390 pounds of force.  That’s about 860 kilograms, for the few of you out there who actually use the metric system…all 6.7 billion of you.  Well, your real problem is that your door opens outward, against the water.  If your door opened straight up, like a Lamborghini, then it wouldn’t be a problem, except for the electrical short-circuit preventing your door from opening at all.

Then, there’s the problem with your second avenue of escape, the side window.  Did you get the option with the motorized window?  You did?  Sorry to hear that.  Well, it was certainly nice while it lasted.  You push the up button, and the window goes up.  You push the down button, and the window goes down.  It’s so much more convenient than having to turn a crank.  Besides, people look at you funny when they get in your car and see that medieval thing hanging off your door.  Next thing they know, you’ll be going outside to start the car with a crank on the front of the grill.  Granted, it doesn’t do you much good, now.  The water shorted the circuit, and the window won’t go down.  It wouldn’t be so bad if your window happened to already be “rolled” down, but people usually do most of their sliding off of roads during storms and freezing weather, which is the least likely time for them to be driving with their windows rolled down.  Although, there was a guy whose door latch froze solid in cold weather, and the door wouldn’t stay closed unless he held it closed, so he drove around with his arm out the window, hanging on to the outside of the door to keep it from taking out a motorcyclist during a curve to the right.  That must have been fun for him, but you’re not him.  You had no problem getting the thing shut.  Now, you just have to get it open, and soon.

Blame the auto manufacturers.  All of their cleverness produced the unsafe situation.  In fact, ironic that it is, they would have needed to be less smart to do the smarter thing, which is to make you crank your own blasted window down.  Then, they would probably sell fewer cars, because the number of customers lost to competition would be less than the number of customers lost to the Susquehanna River (and others), if they had used the electric version.  I don’t know what you’re thinking right now, but I bet it isn’t “Man, I’m glad I have electric windows.  They were so worth it!”  What’s that you say?  No, I can’t write that in my blog.  I’m trying to keep this PG-rated.

Well, we’ve killed so many of our own babies for the sake of convenience, that I suppose I shouldn’t be too surprised that we’d occasionally even kill ourselves for it.  Look behind you at the rear window.  Oops, I guess this model doesn’t come with a little rear window for you to attempt to squeeze your fat torso through.  If it had, then you’d still be stuck, because, for the sake of convenience, you may have dined at a few too many fast-food joints.  Oh, yeah.  I forgot.  You’re big-boned.  Well, it doesn’t matter, anyway, because I just looked outside and checked for myself.  You don’t have a little rear window.  What you really needed was a sunroof to escape through.  What’s that?  It would have been an electric sunroof?  Yes, I suppose it would have been, and if it had been a convertible, you wouldn’t have to get out and manually fold it back, either.  That would have been too much trouble.

I’m looking out my living room, now, and I’d say you’ve still got a few seconds to go.  I suppose I’ll call for emergency assistance.  I’d go out there and try to play the hero for you, but…it’s just so much more convenient to make a phone call and let someone else take care of it.

The moral of this story is this: if you’re going to drive a vehicle with electrically operated windows, then, for pity’s sake, do yourself a favor and take the trouble to buy a window breaker, and keep it with you and accessible (and hope a police officer doesn’t charge you with having a weapon within reach while driving).  Window breakers are razor-sharp diamond-edged double-bladed chisels, essentially.  You need them in most places on this continent, except, perhaps, southern California, where a “river” is typically nothing but a dry concrete channel.  However, if you happen to live in the city/ seasonal lake called Carson, then the storm drains are so solidly plugged by the convenience store trash of people who couldn’t bear the inconvenience of taking their own garbage home and putting it in the can, that every time it rains, you find yourself up to your neck in water, even if you stay on the road, then you might consider taking along not only a window breaker, but also a self-inflating life raft capable of holding you and whatever homeless indigent floats your way.  If you give me a ride, I’ll buy you a coffee as soon as it’s convenient.





The Single-Use Cipher

27 12 2009

No ship is too big to sink, as the passengers of the Titanic discovered.  No freedom is so well founded as to be impervious to corruption.  Every government and every establishment throughout history is and has been doomed to eventual collapse.  Freedom as we know it in a representative government will last only until someone strong enough manages to consolidate the power for himself.  When that happens, we will find ourselves back under the rule of a dictator.  Like Russia, it may still be paraded as a representative government, but it will, in truth, be governed by a select few, if not a singular individual.  This is the end that cannot be avoided.  Lament it later.  We don’t have time.  For all we know, we may already be there.  Our aim, then, should be to prepare ourselves for that eventuality.  We hope that it will not happen in our lifetime, but we fear that it might.

A key objective for us will be the development of a method for transmitting information secretly.  The strongest of encryption methods involve the use of computers and special software.  In the event of a complete social meltdown or an iron-fisted shutdown of the Internet, we must be prepared for the possibility that computers will not be available to all of us.  Further, we might find strength in an encryption technique that does not require special equipment, especially software, so that we might reach as many people as we require and under as many varied circumstances as we might encounter.

Probably the most widely-used and weakest of encryption techniques is the simple letter-substitution method.  You may have seen one in your local newspaper.  It’s so bad that a person of modest intelligence can solve it without a key.  Take the following example:

SRIRW JHR D HZUETR TRKKRW HJGHKZKJKZLS JSTRHH OLJ NDSK KL FRK BDJFVK

Translates to:

Never use a simple letter substitution unless you want to get caught.

Even if the spaces are removed, letter patterns and relative occurrence of letters is enough to allow the wrong person to decrypt it.  In the example above, the key was as follows:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Q C F A P G B S V U T O D W Y J K E N L M H R Z X I

Despite the weakness of the simple letter substitution method, one of the best codes is a modification of this idea, called the single-use cipher.  It’s the same as a letter substitution, except that the key changes with every letter.  The letter A could represent the letter T one time and represent the letter X the next time.  Doing this requires a lot of keys, being that we need a new one for each letter.  If we wrote a key like the one above for each letter in the message, then the key would be a lot longer than the actual message.  It would hardly be worth the trouble.  To simplify things, the key is always a simple shifting of the alphabet, like the following:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K L M N O P Q R S T U V W X Y Z A B C D E F G H I J

In this example, the letter A is shifted over sixteen spaces.  So is every other letter.  If we were to use this key for the above message, then the letter N would be written as the letter D.  We try to think backward when writing it so that the receiver doesn’t have to.  Hence, we encrypt it from the bottom set to the top set, and they decrypt it from the top set to the bottom set.  They see the D, and they translate it to an N.  Like I said, though, the key changes with every letter to prevent anyone from detecting a pattern.  It’s always a simple shift of the alphabet, as above.

In order to not have to write an entire alphabet twice for each and every letter of the message, we can simplify the key to a single letter.  All we need to do to write the key is to simply answer the question, “What does A equal?”  If we know what A equals, then we know what all of the other letters equal, because they’re all shifted over the same number of spaces.  In this case, A equals K.  The letter K can then represent the entire key.  The following is the B key:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A

In this case, A = B.  Therefore, the letter D represents the second letter in our message, the letter E of the word, “Never.”  For every letter of our message, we have one letter that needs to be translated, and we have one letter that tells us which key we use to translate it.  We could generate a random series of letters to represent our random selection of keys:

KBDIEURYASUEJDKQPELXMRUHYXRWHICKMENWLOPQUAYHENRICOVIRUMPU

Each letter tells us what A equals for that key.  Each key is used only once, to decipher only one letter of the message.  Also, we always remove spaces and punctuation.  Using the series of keys, above, the message now translates to the following:

DDSWN ABG A AOIGIU VPPIHF BAUUWRXNLGEB QAPTED IUU YTJG CG EQY UJAUSZ

In a real situation, we would have removed the spaces, but they were used here for the sake of explanation.  In order to easily translate the message, a good practice is to type the alphabet twice in courier font, so that it all fits on one line.  Then, copy that line to the next line.  Print it out and cut the paper between the lines so that they can be shifted relative to each other.  Circle the middle letter A of the top line so you can find it easily.  Using the key, above, you would align the letter A with K for the first letter of the message.  Then align it with B for the next letter of the message.  Then align it with D, and so on.  Cross off each letter of the key as you use it, and never recycle it.  Each time you shift the alphabet, you translate a letter of the message.

Originally, when this method was devised, the single-use keys were printed as booklets of randomly generated letters.  Each booklet would only have two copies.  You would keep one and send the other to the recipient.  Each letter would be used once to translate a letter in a message, and it would never be used again.  The next message, probably the reply, would start where the other left off, until eventually the whole booklet was used up and a new one had to be sent.  It was virtually unbreakable, unless someone intercepted the book along the way and made copies.

Then someone got the bright idea of using common literature as a key.  That way, no special book was required to decipher the message.  The only thing that needed to be delivered was the encrypted message, itself.  If the other party knew which classic you were going to use, then they could find it in their local library, so long as you chose a work that was common, or that you knew they already had.  Better yet, you could tell them with one encrypted message what the key for the next encrypted message would be.  Once you finished using The Grapes Of Wrath to encrypt your messages, you could mention in the last message that you were switching to A Tale Of Two Cities.  After a long correspondence, there would be no way for anyone to know what you were using to encrypt your messages, because you will have only mentioned it in another encrypted message.  Only the first book would be mentioned, and you might even do that through a subtle hint.  Be careful to avoid using abridged versions or books translated from other languages, because they tend not to be the same from one publication to the next.  Let’s take A Tale Of Two Cities as our key:

It was the best of times, it was the worst of times, it was the age of wisdo….

In this case, A equals I, then T, then W, and so on.  If A equals I, then N equals F.  If A equals T, then E equals L.  If A equals W, then V equals Z, and so on.

FLZEZ BLA Z OQTBGL DSPBWY WUJZMEXGCQVZ PUDSOA QVY WIUM PO AAF XEMOEF

Again, we leave the spaces in place for now.  Normally we would remove them.  So, there you have it.  Take the message, “Never use a simple letter substitution unless you want to get caught,” and cross it with the line from Dickens’ book, “It was the best of times, it was the worst of times, it was the age of wisdo…” and what you have left is a code that would be hard to break.  The other person’s reply would start where you left off, at “…m, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair….” Then, even if the enemy knew what book you were using to decode with, they probably would have trouble finding the right part of the book to use.

Now, the only problem is getting the message to the other person.  Unfortunately, the message still looks like a secret message.  It would be up to the sender to be creative and find a way to hide the fact that it’s a coded message.  For example, it could be hidden in a web page.  To find it, you select from the menu bar View/Source, which will give you a long list of HTML.  Look for the message to be contained between “<!–“ and “–>”.  If the enemy knows that you have a web site, then they might find the code there, but they would neither be able to decode it, nor would they know whom you were talking to.  Anyone could access the page, and there’s no knowing which of them was the recipient and which was someone just visiting the site for what it appeared to be.  Moreover, unless they already suspected you, they would not be likely to find you by accident this way.  As an added plus, you could send the same message to several parties at once, and you would not have to jeopardize them by knowing dangerous information about who or where they are, in the event that you are captured and forced to leak their whereabouts.  Otherwise, one might consider the use of watermarks or invisible ink.

One might also consider a reverse-order cipher, whereby the two alphabets run in opposite directions to one another, as such:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

The advantage to this is that it works in both directions.  You can’t get confused as to whether you’re translating from the top to the bottom line, or the other way around, because it’s the same both ways.  The disadvantage is that it only provides half as much encryption strength.  I prefer the previous method, though, in all honesty, I hope we never need to use this.