Morning Joy

Claude McKay

At night the wide and level stretch of wold,
Which at high noon had basked in quiet gold,
Far as the eye could see was ghostly white;
Dark was the night save for the snow’s weird light.

I drew the shades far down, crept into bed;
Hearing the cold wind moaning overhead
Through the sad pines, my soul, catching its pain,
Went sorrowing with it across the plain.

At dawn, behold! the pall of night was gone,
Save where a few shrubs melancholy, lone,
Detained a fragile shadow. Golden-lipped
The laughing grasses heaven’s sweet wine sipped.

The sun rose smiling o’er the river’s breast,
And my soul, by his happy spirit blest,
Soared like a bird to greet him in the sky,
And drew out of his heart Eternity.

Training the Next Generation

My day job involves warping, um teaching young minds the art of computer programming. Every now and then I get to slip in something fun.

This assignment is one where the students do a completely automated decryption of what was up until well after WW2 a state of the art cryptosystem.  While I did weaken it a little (a short key rather than a very long one), the linearity of the cipher is a fundamental weakness. More than a few of the students did the whole project, and at least one found it pretty cool. Cool enough to think about working for one of those un-nameable three letter agencies.

The basic techniques were used at Bletchley Park both for Enigma and Lorenz.

DSC_0319

Although largely by hand (until they built the machines) in small dark offices like this one. (Turing’s). Could you do it?


Assignment 8

RWH

due November 5 2015

Another encryption assignment

  1. Vernam Encryption Write a program in C that will encrypt a file use XOR and a Vernam key. A Vernam key is a short string. (The real system used a much longer random sequence.) Read the input at low level, as binary data (hint unsigned char is useful here.) Then xor each character in the binary data with the character in the key. When you get to the end of the key reuse the key from the beginning.

The program should take command line arguments for the key, input and output.

./vern abc input.clear output.encrypted

Note that the cipher should decrypt its own output. The command:

./vern abc output.encrypted input.clear

should recover the original input. If you use open to create the output file, you may want to also set O RDWR or O WRONLY as well as O CREAT. You could also use fread and fwrite for this problem.

  1. Finding the period

This cipher is vulnerable if the key repeats, and with a short key, like abc above, it will repeat many times for any reasonably sized input.

The incidence of coincidence slides the cipher along itself and counts the number of times the same symbol is seen.

ABCABCABC            count is 9

ABCABCABC then shift 1 ABCABCABC        count is 0

ABCABCABC then shift 2 ABCABCABC      count is 0

ABCABCABC then shift 3 ABCABCABC    count is 6

ABCABCABC

Clearly the period is 3.

Write the code to do that. The file classcipher.vrn is in my directory for this.

  1. EXTRA CREDIT The character ’ ’ (space) is most common in English text. After finding the period count the most common character for each period and recover the key by XOR’ing it with ’ ’.

Swamp Critters

From a trip to the Lafitte wilderness, just south of New Orleans. Well worth braving the mosquitos.
DSC_0603DSC_0628DSC_0613DSC_0619

The Thaw

Henry David Thoreau

I saw the civil sun drying earth’s tears —
Her tears of joy that only faster flowed,

Fain would I stretch me by the highway side,
To thaw and trickle with the melting snow,
That mingled soul and body with the tide,
I too may through the pores of nature flow.

But I alas nor tinkle can nor fume,
One jot to forward the great work of Time,
‘Tis mine to hearken while these ply the loom,
So shall my silence with their music chime.

Mnemosyne

Trumbull Stickney

It’s autumn in the country I rememberHow warm a wind blew here about the ways!
And shadows on the hillside lay to slumber
During the long sun-sweetened summer-days.

It’s cold abroad the country I remember.

The swallows veering skimmed the golden grain
At midday with a wing aslant and limber;
And yellow cattle browsed upon the plain

It’s empty down the country I remember.

I had a sister lovely in my sight:
Her hair was dark, her eyes were very sombre;
We sang together in the woods at night.

It’s lonely in the country I remember.

The babble of our children fills my ears,
And on our hearth I stare the perished ember
To flames that show all starry thro’ my tears.

It’s dark about the country I remember.

There are the mountains where I lived. The path
Is slushed with cattle-tracks and fallen timber,
The stumps are twisted by the tempests’ wrath.

But that I knew these places are my own,
I’d ask how came such wretchedness to cumber
The earth, and I to people it alone.

It rains across the country I remember.

DSC_0948

Waiting for the Cranes

DSC_0521

It is a little early yet, but the Sandhill  Cranes overwinter near us. They love hunting bugs, frogs and other such small deer in the cotton fields at the Georgia Alabama border near Centre. We’ve even seen, once, the Whooping cranes fly through.

This shows what a 200mm lens does. I’m just waiting to try with a bigger one.

With Music

With Music

Helen Hay Whitney
Dear, did we meet in some dim yesterday?
I half remember how the birds were mute
Among green leaves and tulip-tinted fruit,
And on the grass, beside a stream, we lay
In early twilight; faintly, far away,
Came lovely sounds adrift from silver lute,
With answered echoes of an airy flute,
While Twilight waited tiptoe, fain to stay.

Her violet eyes were sweet with mystery.
You looked in mine, the music rose and fell
Like little, lisping laughter of the sea;
Our souls were barks, wind-wafted from the shore—
Gold cup, a rose, a ruby, who can tell?
Soft—music ceases—I recall no more.

DSC_0864

Slapton Sands
photograph (c) 2015 R. Harrison

Follow my blog with Bloglovin

Getting Buggy

dragonfly
I’ve taken almost all the pictures on this blog myself. It’s probably worth sharing a couple of tips for catching bugs and critters.
DSC_0009

The first trick is to use the correct lens, assuming you have a camera that can take lenses (The digital SLR’s are now, and have been for several years, more than good enough to be worth it for serious photography.) I use a moderate telephoto (200mm) for insects. It can focus close enough to bring the insect into focus, but lets you stay far enough away to not disturb the critter. I could use a longer lens, but the depth of field is too shallow – which makes it difficult to keep the creature in focus.

DSC_0996

The depth of field can be used to artistic effect, but I’ve found much longer lenses problematic.
DSC_0995
I use a “skylight” filter to keep the lens clean, but don’t bother with a polarizer for these (I do when taking scenery – with a wide angle lens, but that’s a different post.)

 

Sunday Photo

Follow my blog with Bloglovin
DSC_0671
It looks like you’re at the edge of the world when you’re at the top of Mt. Snowdon. Even when the weather is good.

FrankenKitty 5 #wewriwar #amwriting #weareparis

Frankenkitty

12241791_735836876546522_6197947469406170479_n

Welcome to Weekend Writing Warriors.  This is a sample from my work in progress, “Frankenkitty”, and I hope you enjoy it.  It started out as a young-adult superhero book, and well, you’ll see. Last week they decided to give Dr. Frankenstein’s ideas a try. Both Mary and Jenny are on their way to visit Amber’s “lab” after school. The bus has just dropped them off, and they meet someone important on the way.


The big yellow school bus squeaked to a stop just off the main road, near the old folk’s home known as the towers.

“My official stop is closer on the street,” she said, “but it’s faster to walk from here; we’ll cut through the garden and down Elm Street; be home in no time.”

Several elderly inmates of the Towers were sitting in the garden as the girls walked through it. Jennifer suddenly stopped and stared at one of them.

Mary asked, “What is it, Jenny?”

Jenny slowly approached an ancient woman, a woman with a fierce looking face that belied her friendliness.

“Mrs. Jones?”

“Jennifer, what a surprise; I thought you were going to visit me sooner.”

“I thought you were dead.”

“Oh, that explains it; there vas another Mrs. Jones; they mixed up the names.”


This is a work in progress. In other news, I’ve become a booktrope author, but more on that latter. It has meant a change in pen-name. Last Weeks is here and you can read the whole last chapter if you’d rather.

I’m also looking for reviewers for my nearly ready book “The Curious Profession of Dr. Craven”

I thought hard about giving this week’s entry a miss. In the end, if we quit even in little trivial things like this, then they win.