Password Entropy

Passwords, ugh.  The very word causes pain.  It invokes feelings of aggravation and despair, memories of fighting computers and IT admins.  And still, despite their flaws, we have yet to universally assign any other means of simple authentication, so we’re stuck with them.

And, we constantly argue over what makes a good password.  In the midst of this debate, one man and his famous comic surged through the internet:

https://xkcd.com/936/

XKCDIf you don’t know of XKCD, shame on you.  Go there now and revel in its wonderfully sophisticated humor.

In summary, the argument’s premise is that words, being easier to remember, are better suited for passwords as their method of authentication relies upon human memory.  And indeed they would be, but it would take significantly more words than could feasibly fit into a password field.  Why?  Because of dictionary attacks.

A dictionary attack works by guessing known words.  Even if the words are obscure, they are known.  I will elaborate:

For this example, I will use the word hello.  Hello is 5 letters.  The logic behind using words for passwords is their per character entropy.  5 letters, all lowercase, represents 26^5 possible combinations, or 11,881,376.  With dictionary attacks, however, the word in itself becomes a single “character”.  According to the Oxford English Dictionary, there are 171,476 in-use words in the English language.  This translates a password, consisting of one word, to having one of 171,476 possibilities–significantly less than the 11,881,376 previously mentioned.

So why not stack random words?  Well, in the comic’s given example of correcthorsebatterystaple, there are 4 words.  171476^4=864,596,308,417,753,000,000 (approximately, since Excel is truncating numbers to 15 significant figures).  So we’ll say 8.65E+20 (using Excel notation).  How secure is this?  I honestly have no idea.  This is where the argument turns ugly.  So I will pass on forcing an opinion upon you and instead stick to providing information.

Looking at the ASCII chart, there are 95 usable characters.  Taking 95^X then, the tipping point is 11 characters.  This, compared to the above example, has 5.69E+21 possible combinations, significantly more entropy, yet significantly fewer characters (11 vs. 25).

The argument then would be to add more words to the password.  And I would agree, except all too often we encounter password field limits.  And besides, how many random words for how many websites could you remember anyway?  Once you fail to remember one, you completely lose the benefit of the word method, in which case why not make a higher-entropy password instead?

Searching the Internet for consensus on password size, I find the general rule is to use 12 characters.  This equates to 5.40E+23 combinations for ASCII, which means we need five words to achieve at least that number of combinations with the word method.  That’s a lot of words to remember for every website.

Another point that bears mentioning is that we need to consider the lowest possible entropy denomination, so word length does come into play, although not significantly.  Specifically, a word has to be at least 4 letters long, otherwise its number of combinations falls below 171,476 (26^3=17,576).  Therefore, if you think you can get away with stringing together 5 short words, you’re only getting the combined strength of the letters themselves, meaning you’d need 17 letters to at least meet the entropy of a 12-character ASCII password.  And remember, you don’t get more entropy by using longer words, so correcthorsebatterystaple is 8.65E+20, not 2.37E+35.

Entropy
We’re gonna need a bigger column

And no, mixing lowercase and capitalized letters, or even number substitutions, does not impact a word’s entropy in a meaningful way, as dictionary attacks are aware of this trick.

Finally, the word method is assuming any word in the OED might be used, when in practice there are estimated to be only 100,000 common English words.  I was erring in favor of the word method, but in practice it’s much weaker than this math suggests.

Conclusion: in order to supply enough random words to a password chain to achieve the minimum industry-recommended level of entropy, you would need to supply 5 uncommon words, which will likely defeat its own purpose of being memorable, not to mention it will likely exceed the password length limit of many servers.

Whatever method you choose to use, I think it’s safe to say that we can all agree that passwords just plain suck, and with the exponentially increasing computational power of Moore’s Law, it’s only going to get worse.

–Simon

Doppler Radar Website

If you’re like most people, when you decide to check the weather, you look at a forecast, likely supplied by your mobile device.  If you’re more inquisitive and want a visual aid, you visit a website and check the radar.  That probably satisfies your curiosity and you quickly move on to significantly more important aspects of your life.

Doppler
This–this sucks

But if you’re like me, you become irrationally irritated because, well, there seems to be no good way to view the radar.  Chances are, if you go to your local news’ website, they have a poor quality, buggy, slow to load page with the current national or regional radar.  Why this is so difficult to pull off baffles me.  It’s probably due to the extraneous features that no one will ever use, like the option to view the last 24 hours.  Who the hell cares what the weather was like 24 hours ago?  Also there’s probably a plethora of scripts that have to load on the page, adding to the already script-laden overhead from 3rd party served advertisements.  Often do I miss the days when websites contained text, images, hyperlinks, and nothing else.

But nostalgia aside, I considered what I wanted such a radar page to do.  My list was short: I wanted it to show the current radar as of the last update and not the interactive history, not the last 30 minutes that always cycles through on infinite loop with no way to disable.  I wanted nothing else on the page, and I wanted it to take up the full page.  Finally, I wanted it to update as the new radar become available.

NOAABut first things first–and a question that always bothered me: where do news stations get their national radar, because surely that has to be a shared network?  Fortunately, it didn’t take long to figure out.  If it was a nationally-shared network of data, then it had to be government-owned.  It had been around too long and was too big for it not to be government-controlled (look at where national internet access is headed).  I didn’t even have to Google this, for I already knew of this governmental entity: the National Oceanic and Atmospheric Administration:

http://www.noaa.gov/

Digging through this site, I discovered that the national Doppler radar was indeed freely available for public access, and updated automatically:

https://radar.weather.gov/

As I write this post I notice that it’s even https now, go figure.

I found the image I was after, the national real-time Doppler image:

https://radar.weather.gov/ridge/Conus/full.php

But, problems still remained.  For one, the image is too large for a normal browser window.  Also it contains the NOAA logo that uses up space.  And, the image is static and doesn’t update unless the page is refreshed.

Fortunately, with a little bit of web-development know-how, it is quite possible to link to the image externally, as the gracious NOAA has not disabled image-linking.  Looking at the page’s source code, I saw that the radar image was delivered from this URL:

https://radar.weather.gov/Conus/RadarImg/latest.gif

Easy-peasy.  I simply just inserted that image with one line of code into my own page’s body:

<p align=”center”><img src=”https://radar.weather.gov/Conus/RadarImg/latest.gif” height=”650″ width=”1157″ align=”center”></p>

I also centered and resized it to my liking.  Then it occurred to me that I really don’t need to see the national radar.  I was more interested in the regional radar.  This became slightly more involved, but still doable with a little CSS, so I inserted this little bit of styling information into my page’s head, forgoing adding the image to the body:

<style type=”text/css”>
body
{
background: url(“https://radar.weather.gov/Conus/RadarImg/latest.gif”) no-repeat left center white;
background-size: 4500px 2400px;
background-position: -2500px -550px;
}
</style>

I set the image to be the page’s background, then through trial and error resized it to zoom, then offset it so as to center approximately upon the Midwest.

One last problem remained, and that was the automatic updates.  This was solved with a simple meta refresh:

<meta http-equiv=”refresh” content=”60″>

Now the page refreshes every minute, which automatically pulls the latest radar image at that time.

Now, at long last, I can have real-time Doppler radar imagery delivered without fluff, and automatically updated.  Plus, if I put the window in kiosk mode, it covers the entire monitor so I can feel like a meteorologist!  Or…old man, depending on who sees me doing this.

Here are the sites if you wish to use mine and forego any coding:

https://moorheadfamily.net/weather.html

https://moorheadfamily.net/weatherohio_kiosk.html

Now place a wireless thermometer next to your monitor and you won’t even have to open the curtain to determine the weather is not to your liking!

–Simon

Humor Quotient

If you tuned in for my post on Quantitative Philosophy, you may recall my promise to provide mathematical models for segments of the human experience.  This is indeed once such model.  If you’re here looking for another post on how I find the business world’s systems of reinforcement incongruous with the results they ultimately condition, this is not that post.  Although, perhaps later I’ll dive into how the merit raises work.

But nay, I shall start with a model based on the most human of characteristics–one which requires the highest of brain function–humor.  Indeed, I found the concept difficult to describe, as its existence relies upon the prerequisites of feeling and emotion–two other concepts difficult to comprehend, though simple to attribute to species survival.  Quite simply, humor is but an extension upon these concepts, so we can begin there.

Emotions are, in their most primal form, reactions to stimuli, which influence actions geared to keep us alive.  Survival requirements, and their respective order of requisition, were famously defined in Maslow’s Hierarchy of Needs:

  1. Air/Water/Food (physiological needs)
  2. Physical safety
  3. Social belonging/love
  4. Self-esteem
  5. Self actualization/Purpose

With the heightened awareness that sentience allows, humanity needed a coping mechanism for when one of these needs is threatened, so as to keep the brain from experiencing a stress-related shutdown.  Enter: humor–a positive emotional reaction of levity as a reaction to understanding a perceived threat to one of these needs.  I say perceived, because once a need is actually threatened, we need a stress reaction to manage the crisis quickly–something that is demonstrably not a positive feel-good reaction.

How do I know this?  For one, I am human (though others may debate this claim).  And two, because the substance of a joke invariably falls into two criteria: Social Commentary and Historical Reference.  These two concepts, by definition, invoke failures of humanity, not triumphs.  Granted, a joke may contain widely variable substance in these categories.

Let’s analyze a joke for context:

‘Why did the chicken cross the road?’

‘Why?’

‘To get to the other side.’

ChickenThe joke, most simple in form evokes feeling.  The recipient of the joke wonders about that chicken.  The chicken has an objective.  The chicken has become anthropomorphized.  We feel for that chicken.  We want to know about that chicken and why it felt the need to cross that road.  This is social commentary.

Also, it contains historical reference.  We need to understand what a road is–an invention of humanity based on the need to service other inventions.  And, historically, we all know that animals crossing roads may be perilous to their health.

And that, is the threat necessary for the humor trigger: the chicken is having one of its needs jeopardized.  Its physical safety is in danger.

Say What
Say whaaat?

Alas, no harm befalls this chicken.  We never learn why it felt compelled to cross the road, nor do we learn of its fate.  We laugh over these unresolved questions, while understanding that the hook of the story relied upon that chicken’s mortality, and by extension, our own.

But this alone does not make the joke.  It is merely a story.  To become a joke, it requires two other aspects: Delivery, and Satirical Value.  We wait, momentarily on edge, eagerly seeking the story’s climax.  So the wording of the joke affects it’s delivery.  It’s phrased in a question to invoke the listener’s interest and encourages his/her reaction.  Secondly, the conclusion of the joke is mere satire, or in this case specifically, irony.  It’s ironic that the story’s conclusion has nothing to do with the actions of the perceived feelings of the chicken.  It simply wanted to get from point A to point B–something completely uninteresting.  We are left without any compelling narrative, despite the initial impression of one, and that’s ironic.

Formula

To quantify humor then, we take the base substance of a joke, the Social Commentary and Historical Reference, and add them.  We take this combined substance, and append the joke’s Delivery and Satirical Value as multipliers:

(Delivery*Satirical Value(Social Commentary+Historical Reference))/20

In this manner, we find jokes can have varying degrees of each category, but the funniest jokes always find ways to maximize each.  Additionally, no criteria can be rated to have a null value, as any joke will always contain even the smallest quantity of each, and each criteria can receive a maximum score of 10.  The total score ranges from 1-100 (technically 0.1-100), so we scale for the theoretical maximum by dividing by 20.  For the above referenced joke, I have rated it a 10:

(5*8(3+2))/20

Granted these are arbitrary scores, but I find that gut reactions in this instance are the most accurate, seeing as, after all, we are attempting to quantify an emotional response.  I’ve included a link to download the calculator, which further explains how to score a joke as well as automatically completing the math:

https://moorheadfamily.net/data/Humor%20Quotient.xlsx

Are our bio-mechanical systems so readily quantifiable?  You be the judge.  And if nothing else, I hope you found this post funny.

–Simon

Get Off My Lawn!

Our house is neighboring the house on the corner.  On the perpendicular road from this intersection, one house down from this same house, is a house filled with feral children.  These children, in their angst to visit the park, save precious moments by bypassing the intersection altogether and instead blaze a trail through my backyard, driveway, and front yard.

As any self-respecting old man suburban homeowner would do, I’ve conspired in secret to find subtle ways of mitigating the problem.  I laughed evilly to myself as I fantasized over hedgerows of blackberries and poison ivy.  But these are mere irritations.  What I needed was something extreme: Unnecessary escalation to get my point across.

So I pondered the archives of knowledge I spent years of college acquiring–knowledge others have since called useless.  I scoff at their uneducated masses of business degrees.

Roman
Not on my watch

A vision of Romans and Gauls flashed through my mind, and I recounted the Battle of Alesia–the first major battle to earn the booby-trap notoriety.  Introducing, the Lilly.  Interestingly, Googling the Lilly Trap returned an odd amount of pornographic images.  I perused the thumbnails for a few minutes out of sheer curiosity before returning to my writing, naturally.  My point is, I have no appropriate visual aid to append to this paragraph, so I will describe:

Trap
It’s a trap!

The Lilly Trap was a small pit with a sharpened stick in the center.  The stick was deeply secured, and the pit was either covered with brush or filled with water.  The idea was to hide the trap, so that an unlucky infantryman would step upon it, impale his foot on the stick, and be subsequently immobilized.  Yes, this would subtly get my point across, muahaha.  I began digging.

Okay, enough of that.  This is the part where I tell you that maiming children is not my objective, although chasing them away with a 20 gauge certainly has crossed my mind.  But I had other problems to contend with, namely the drainage situation from the downspouts.

The prior owner had installed extensive waterproofing measures in the basement.  The perimeter had been trenched, and a sump pump installed.  And when we were viewing the house, there had indeed been water in the sump.  But, that was the last time it’s ever held water.

Shortly after moving in, it became obvious that the problem lied in the rainwater’s current drainage paths.  Downspouts, dutifully installed, channeled their contents directly against the house.  These areas had not been graded, so the water simply sat against the foundation.  After the first heavy rain, I deduced something was amiss when I saw the house adjacent to several small ponds.  That, I cleverly declared to myself, holding an authoritative finger of pronouncement to the sky, was not right.

So I began trenching.  But the problem with this particular corner was that the grade went up before down.  So in order to get the water away from the house, I’d have a very deep trench.  Also, the remnants of a stump were between the downspout and the far side of the rise, and I was not keen on chopping through many feet of roots.

TrenchIntroducing, the water garden.  I would trench as far as possible, then dig a deep hole, fill it with permeable material, and surround it with plants that tolerate flood/drought cycles.  The cold weather broke and we were blessed with a beautiful weekend.

And sure enough, I started hitting roots, so I ended the trench in said deep hole.  I lined the trench with bricks to provide a solid bottom, then planned to fill the remaining trench and hole with river stone, as I had on the drainage trench in the front yard.  Then it got really cold again, and we were hit with our first spring storm that flooded the project.

So good news: the water goes where it’s supposed to now and doesn’t pool near the house.  When the hole filled with water, it overflowed down the hill and away from the house.  Success!

Unfortunately, now the rain garden is a hole of muddy water almost two feet deep.  But, I have appeased the laws of hydrodynamics, and hopefully in the meantime I’m frightening the children away with my bizarre hole-digging project.  Next step: caltrops!

–Simon

Help it Grow

I love gardening.  My wife loves gardening too–I think.  She appears to like it, or would like it more, if it weren’t so…outside.  I know, it confuses me too.

8X T8s!

But regardless, it is one of my few hobbies that she can at least understand and appreciate, so it was with much elation that I received an indoor growing kit from her for Christmas.

Now, as an aquarist with a preference for fresh-water planted tanks, I’m no stranger to the lighting requirements of those voracious little photosynthesizers, so I was very pleased to see that each fixture was wired for 4 T8 fluorescent bulbs.  During my aquarium struggles, I eventually wired my own lighting fixture for this exact number of bulbs myself, deciding through trial and error that this was a baseline requirement to grow much beyond algae and moss.  So, while this setup wasn’t exactly flooding the room in holy luminescence, I knew from experience that it would be sufficient, especially considering these plants wouldn’t be losing light intensity through a foot of water.  Also, the fixture came with bulbs–something I would not have expected, seeing they run about $10 each.

This being the dead of winter, plus me having a new toy; I came to a conclusion: I will determine the feasibility of maintaining an indoor garden year-round.  After all, it was too early to start seeds for an outdoor garden, and I sure as hell wasn’t going to leave this new device sitting idle the in the basement, begging for attention.  But…what to grow?

Crysta
Help it grow!

And here’s another point of contention with my wife.  She likes organized gardens, and I lean towards the cottage look.  This is uncharacteristic of me, as in most facets of my daily existence I like ORDER!  Chaos is evil!  Yet, in the garden, I appreciate the organized chaos of nature and allow plants some freedom.  I also understand the benefits of companion planting.  Therefore, my gardens tend to be a little wild, with vaguely defined partitions.  My wife can’t stand this, but since I’m the one who does the outdoor labor, I’m the de facto arbiter of the vegetable garden’s arrangement–until she gets fed up and charges in with clippers anyway.

Therefore, when it came time to plant the indoor growing setup, I selected partially at random.  I wanted some herbs, yes, but I also wanted decoration, and to experiment on what would actually stay alive inside.

Happy Plants
Happy plants

Identify them if you can, but here’s a list of my observations:

  • Some plants from the grocery store can be successfully planted.  In this case it’s the mint and green onion.
  • Nasturtium is a weird plant.  It grows, falls over, and grows up again.
  • That poinsettia is still alive.  I don’t know what I was expecting, since I’ve never kept one past the holidays.
  • Sticking an old potato in dirt will make a huge plant.
  • Flax doesn’t like being indoors.  It protested by dying.
  • Basil and peppers want more heat I’m sure, although they are growing reluctantly.
  • The pole bean is doing what I had hoped: growing up the structure and making a pretty vine.
  • Things grow much slower inside.  I know this is obvious, but like really slow.  Those pole beans become invasive kudzu outside, but inside it took 2 months to grow a foot tall.

February sucks, but I have a small oasis of green in the cold and dark.  Now spring doesn’t seem so far away.

–Simon