Friday, February 5, 2010

Avatar, Na'vi and networking

Nice film with breath taking animations. But I wonder whether the fanciness of surrounding has degrade the quality of effort. However rather than animations I find the concept of Na’vi creatures’ networking much more interesting. Those creatures have powerful network to which they can upload and down load information from. Rather than artificial wired / wireless network topologies existing on earth their network is via the fibers running though trees and other creatures.Their sacred trees are the backbone of their network and all the creatures including Na’vies and animals are plug and play workstations. All the creatures have a device (similar to USB device) which can be plug to this network or other creatures via corresponding port and facilitate the communication among them. On one hand, it could be seen to earth people that these creatures are machines rather living beings, but still those creatures live with nature unlike to human kind on earth.

I wonder whether Na’vi kind shows the possibility of ‘genetic globalization/ genetic networking’ that may be possible thorough genetic evolution someday.
Selective mutation by mother nature ensures that those features relevant to a species get enhanced and those are unnecessary get depreciated and vanished. Communication on the other hand is an essential for any kind of species for their existence, reproduction, evolvement and even to interact with other species. Hence similar to the way our ancestors and other living beings at early stages of evolution came up and improved their own languages or sounds or gestures to communicate, the evolvement of these methods also be technically possible with genetic evolution. However, human kind has deviate from the natural evolving pattern and pace, and has gone for artificial communication and network topologies. This has generated a world that could have very different if such evolvement happen naturally.

What if someone didn’t invent electricity, vacuum tubes, resistors and finally all digital media? Will us be not linked to each other as we are today via internet? Will we be not able to communicate globally? What I think is if we adhered to the pace of evolution by Mother Nature, she would have found us a way to be networked among each other just like Na` vi creatures do, because nature of genetic evolution is to upgrade towards positive direction and degrade towards negative direction. Hence had we lived with nature and had we let nature to evolve and develop us, entire world could have been networked and globalized genetically rather than digitally.

Friday, January 1, 2010

Encryption with Rotor machines


As a requirement of the module ‘Computer Security’ we had to engage in a forum discussion about the level of security provide by a 5-disk rotor machine used in encrypting messages from the Arabic language. I thought of blogging some interesting details we shared during the discussion.

Cryptography is the science of conducting secure communication. Rotor machine was the first electro-mechanical encryption device intended to automated cryptography. They became the most important device of the Second World War and remained dominant till nineteen fifties.

Structure of rotor machine

Each rotor in a rotor machine maps a character at its input face to one on its output face so that it implements fixed mono-alphabetic substitution. A generic rotor machine constitutes of number of such rotors. A plaintext character, which is input to the first rotor, generates an output so that it becomes the input to the second rotor. Finally, the last rotor produces the corresponding ciphertext. This idea can be illustrated using the following diagram.


If the rotor position is fixed, the collection of rotors implements a mono-alphabetic substitution। This is produced by constitution of the substitutions delineated by each individual rotors. Through encipherment of each plaintext character causes various rotors to move, a poly-alphabetic substitution will be resulted.


With a alphabet of 28 letters, when two rotors are next to each other and geared together, you have to type 28x28=784 letters before the key repeats. We can keep on adding rotors next to each other if the key length is not sufficient. Moreover, with a 5-disk rotor machine you will be able to obtain a period of 17,210,368 letters long. since Arabic is contextual, that is the way it is written depends upon the context, certain level of security is implicit with language characteristics. It says in standard Arabic style letters have considerably different shapes depending whether it connect with proceeding and/or a succeeding letter. Hence all primary letters have conditional forms depending on their positioning. That is depending on whether such letter is at beginning, middle or end of a word. For example in some letters the middle form starts with a short horizontal line on the right to ensure that it will connect with its preceding letter and, for some letters, a loop or longer line on the left with which to finish the word with a subtle ornamental flourish. Hence may be in reality more than 28 letters come into the scene providing period longer than 17,210,368.

When a rotor machine is used, the rotor machine itself is the algorithm. I.e. the way in which it is set up is the key. So when deciphering, recipient need to type the ciphertext letters to his rotor machine. If that machine was set up exactly in the same way as the message sender’s, plaintext can be identified. But as similar with other types of cipher systems, if you don’t know the key it is really difficult to read the message even the system which was used to encipher it is known.

If the key is unknown, finding the rotor setup is really hard. Say you have 5 rotors with alphabet of 28 letters, then there will be 28x28x28x28x28 distinct ways to set the starting position. In addition, the possible number of link up pairs is extremely high and its calculation is so complex. If you are interested this way of calculation could be found at http://www.codesandciphers.co.uk/enigma/steckercount.htm . This shows the difficulty of breaking code further.

At the same time still there is the problem of distributing the key. The problem is conveying a long key securely to the parties who need it takes time and there can be mistakes in key distribution.

But if a fixed setup is using this might not make a much trouble। But if it is as military event as was the case with German army, then there is a immense problem as the changed key need to be distributed daily. But what they were doing was using a key sheet specifying the required set up for each month. Hence when using rotors, it is required to use some trick as such to avoid the problems relating to distribution of long key.

in everyday writing, accents are often omitted in Arabic; the reader recognizes the words as a result of experience as well as the context.This may expose a threat in security of contextual languages. If there is a possibility for reader to recognize words because of experience as well as the context, then simple guesswork could do a great job in decrypting. Means by identifying some amount of letters without taking a further effort hacker can understand the meaning of plaintext. But again only understanding would be possible instead of modifying. If the plain text is small in length, as the key repetition is not occurred there is a possibility that hacker can map unidentified letters based on his/her prediction also. However, this is less likely to occur in case of a long plaintext.

When comparing with other attempts of cipher designers one advantage in rotor machine is that it does not require extraordinary abilities from their users. This was not the case with other methods, as they required patience to carry out lengthy, letter-perfect evolutions and uncertainty under time pressure or battle strength in military context.