Search This Blog

Wednesday, 26 August 2015

My Cipher

Today’s blog is a bit different, I'm sharing with you an interest I have in cryptography and a cipher I had written myself. I hope you enjoy it and can understand it!

When I mention cryptography today, what do you think of? Public key encryption with 1024 bit key strength? Supercomputers, mind melting mathematics and computer programming? This is what I thought of and at first it put me off even though I was interested in this fascinating subject! The level that today’s cryptography has reached seemed unreachable and un-achievable to me, but then I realized I was looking at the wrong end, I needed to look at the beginnings of cryptography, at how it first came about and changed over the years as people constantly evolved it to withstand the attacks by people who sought to break them!
Hand written cryptography may seem obsolete today, there are many products on the market that provide a service to secure information, but where is the fun in the using someone else's product/solution? I have read books on the subject but I would never claim to be an expert. I have had a lot of fun in the creation of my own code. I believe it is strong but I would never in a million years say it was un-crackable. The very fact that you have written your own code in it self adds strength to it as it is an unknown quantity to any attacker. So why am I writing this? Should I not keep my code secret, locked away and jealously guarded? No. The strength is not in how the plain text is converted into cipher text but in the key used. If the attacker does not possess the key it does not aid him knowing how the cipher works. It does allow for a brute force attack but now we are straying out of the realm of hand written ciphers into the world of computer programs written specificity to break a given cipher. The key I use is 148 characters long, I'm no good at mathematics, perhaps someone reading this and interested enough could tell us how long/hard that would be to brute force? My thoughts on the matter is good luck! I am not sending or storing state secrets, I just want to protect my private thoughts or messages to loved ones via public forms of communication. I am assuming that the difficulty to crack the code plus the fact the information is of little interest will put off most attackers.
By public forms of communication I mean, emails, texts, documents stored in 'the cloud' and posts online in public forums like face book. Most of these you might think are private because they are sent directly from the sender to a recipient or stored in a private space online that only you have access to. It has been proved time and again that these are not secure and people can and will gain access. Governments, the press and hackers to name three groups of talented people who have a vested interest in your information.

My code uses a table that in the center of it is a square 37 x 37 characters. These characters are the plain text characters used to write the plain text. For this example of my code I will just use the letters of the alphabet which will give me a grid of 26 x 26.

On each face of the grid are the characters of the cipher text. These can be anything you want but to make it easy I will just use the alphabet in a randomized form. You will have four randomized alphabets one on each face of the grid and this is our key also.

Below is an example of the table. In red is the characters used as the cipher text and in blue are the plain text characters. In-between in yellow are numbers running in sequential order from 1 too 104 around the blue square, these are the character numbers. Take the word 'revenge' there are seven characters in the word, R is number one and the finale E is number 7. To encrypt this word using the below table we take the letter R go to column 1, we move down the column until we reach the letter R and then follow the row across to the right until we meet the cipher text letter in red which is O. The second character is E, we move too column 2 and follow it down to the letter E and then along the row to the right until we reach the cipher text letter in red which is X. Repeat this until the process is complete and 'Revenge' becomes 'oxelogh' To reverse the process take O we know it's the 1st character, so we find the letter O in the red column on the right hand side of the table and follow the row to the left until we reach column 1 and we have the letter R.

When we reach character 27 you will notice that it has moved round onto a different face of the blue square. We can ether rotate the table anti clockwise and continue or keep it the same way but now you follow row 27 across to the left until you reach the plain text letter then follow the row down until you reach the cipher text letter in red. From 53 to 78 you follow the row up and then to the left and from 79 to 104 you follow the row to the right and then up. When you get back to position one again you have completed a block of 104 cipher text characters and the sequence starts again at position 1.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

P 104 A 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 27 M
O 103 B A Z Y X W V U T S R Q P O N M L K J I H G F E D C 28 N
L 102 C B A Z Y X W V U T S R Q P O N M L K J I H G F E D 29 B
K 101 D C B A Z Y X W V U T S R Q P O N M L K J I H G F E 30 V
I 100 E D C B A Z Y X W V U T S R Q P O N M L K J I H G F 31 C
M 99 F E D C B A Z Y X W V U T S R Q P O N M L K J I H G 32 X
J 98 G F E D C B A Z Y X W V U T S R Q P O N M L K J I H 33 Z
U 97 H G F E D C B A Z Y X W V U T S R Q P O N M L K J I 34 L
N 96 I H G F E D C B A Z Y X W V U T S R Q P O N M L K J 35 K
H 95 J I H G F E D C B A Z Y X W V U T S R Q P O N M L K 36 J
Y 94 K J I H G F E D C B A Z Y X W V U T S R Q P O N M L 37 H
B 93 L K J I H G F E D C B A Z Y X W V U T S R Q P O N M 38 G
G 92 M L K J I H G F E D C B A Z Y X W V U T S R Q P O N 39 F
T 91 N M L K J I H G F E D C B A Z Y X W V U T S R Q P O 40 D
V 90 O N M L K J I H G F E D C B A Z Y X W V U T S R Q P 41 S
F 89 P O N M L K J I H G F E D C B A Z Y X W V U T S R Q 42 A
R 88 Q P O N M L K J I H G F E D C B A Z Y X W V U T S R 43 P
C 87 R Q P O N M L K J I H G F E D C B A Z Y X W V U T S 44 O
D 86 S R Q P O N M L K J I H G F E D C B A Z Y X W V U T 45 I
E 85 T S R Q P O N M L K J I H G F E D C B A Z Y X W V U 46 U
X 84 U T S R Q P O N M L K J I H G F E D C B A Z Y X W V 47 Y
S 83 V U T S R Q P O N M L K J I H G F E D C B A Z Y X W 48 T
W 82 W V U T S R Q P O N M L K J I H G F E D C B A Z Y X 49 R
Z 81 X W V U T S R Q P O N M L K J I H G F E D C B A Z Y 50 E
A 80 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 Z 51 W
Q 79 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 52 Q

78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53


In the hand written form this cipher is only really good for short messages/texts/posts I hope to learn to program to automate the process. I did find a kind person who did this for me but it was saved on a floppy disk and has been lost. It was nice and simple, a box to enter the key, a plain text box and a cipher text box.

An example.

This is what a short passage looks like

ukht fe bsln h vunxk xohgynm kfdzt lghy

Take out the spaces

you'll notice that the double letters in the words used are not replicated in the cipher text. This example uses a basic table the full one I use, uses spaces and numbers as well. The blue square in the center also does not need to be laid out in order as I has shown here it can also be randomized.

The process is a bit laborious and if your not concentrating it is easy to lose your place. I will eventually learn to program in order the make the process fast and error free.

I hope you like this and maybe it will encourage some of you to take your first steps studying this fascinating subject. 

Monday, 10 August 2015

Nuclear fission Power.

Nuclear fission Power.

Nuclear power is a hot topic amongst people. It's like Marmite, you ether love it or hate it. Personally I'm for nuclear power as opposed to the other options available. The United kingdom is a small Island with 64 894 610 people living within it's boarders. We are at the moment dependant on importing gas and coal to supplement our power needs. I think this country needs to be able to provide a sustainable source of power to meet the needs of a growing population that is not dependant upon importing resources from country’s that may in the future decide to restrict or cut off all together these supplies.

I would like to hasten to add here that I do not see nuclear power as the solution to our power needs but as a temporary stopgap, until we have something that is also independent from the influences of foreign powers that can cleanly and safely provide our power needs.

I see two ways forwards from nuclear fission power, renewable resources like wind, solar, wave, hydroelectric and geothermal are ones that jump immediately to mind, can you think of any others? And the second is still in the realms of science fiction but is being developed at this moment which is nuclear fusion This as I understand it when the scientists have cracked the problem of creating self-sustaining fusion reactions, will provide a clean and plentiful source of power which will allow us to phase out the use of nuclear fission.

Until then I feel it's right to support nuclear fission reactors, only by supporting them can we overcome some of the problems caused by them. Fast breeding reactors for instance can depose of the waste problem by using spent fuel. Fast reactors could deal with the plutonium stockpile in Britain in five years.

Spent fuel remains a major radiological hazard for thousands of years. The plutonium — the most ubiquitous and troublesome radioactive material inside spent fuel from nuclear reactors — has a half-life of 24,100 years. A typical 1,000-megawatt reactor produces 27 tons of spent fuel a year. None of it yet has a home. If not used as a fuel, it will need to be kept isolated for thousands of years to protect humans and wildlife.”

Tuesday, 4 August 2015

We are doomed ... DOOMED I SAY!!! ... again.

We are doomed ... DOOMED I SAY!!! ... again.

Once again humanity faces extinction! This time at the hands of an asteroid. This is a very special asteroid because nobody can see it? Here is a link to the “Near Earth Object Program”  So we are very lucky to have Rev Efrain Rodriguez among'st us to inform us of the impending Armageddon!  So I hear you ask does the good Rev have a telescope in his back garden? and did he happen to spot this massive asteroid hurtling towards us by some amazingly good fortune? Ahh no … to quote the Huffingtonpost:

Rev Rodriguez says he learned of the impending disaster via a message from God”

Wait! We need to pause here and bow our heads and pay respect to Rev Efrain Rodriguez's credibility which has ceased to exist … okay we can continue.


Rev Rodriguez also claims NASA had confirmed the trajectory of the asteroid and that President Barack Obama had been briefed – though the only preparations have been made to enable the rich and powerful to protect themselves.”

Did God tell him this also?

How ever there are enough people among'st us despite any evidence to back them up and despite their lack of credentials to force NASA to respond, not surprisingly to dismiss the theory as unfounded.

So what do you think? Well fortunately we don't have long to wait September is just around the corner!  I'm going to take a wild stab in the dark and say this is going to go the same way as all the other predictions of Armageddon that have so far proved to be nothing but hot air.

An update to this article:

Another update, this disaster has now been linked with the blood moon which can be seen on the 28th of September in the United Kingdom so we have a date!

Image taken from the daily mail article. 

Saturday, 1 August 2015

A load of Bull!

In this news article a young matador is gored by a bull. The article features exclusively on the bull fighter with no comment on the injuries being inflicted on the bull! I don't see the enjoyment myself in watching an animal suffer whilst it is being slowly butchered. So I find myself cheerfully cheering for the bull every time the topic of bull fighting comes up in the news. The odds are so stacked against the bull you can't even refer to it as a sport. As soon as the bull enters the arena it is dead because even if it defeats one matador another will come on to finish off the poor beast.
Because the spectators already know about the outcome of the fight it can only be about one thing... blood! They want to see the bull suffer, bleed and slowly die, so for me it makes a refreshing change when it's the matadors blood we are treated too, at least they are allowed to exit the arena to receive medical treatment! In the case of this news story it's three matadors requiring hospital treatment!

After Fortes was taken to the infirmary the bull was enticed back into it's stall alongside the pens of the other three who had escaped their scheduled deaths in the afternoon. With no one left to fight them, there was no alternative than to cancel the rest of the corrida.”


Their is a silver lining for this bull, as their were no more matadors left the bull was allowed to live and three other bulls also survived. No mention is made as to what the fates of these animals are? I suspect they will be re-scheduled into later fights on another day.

Picture taken from