THE NGO NETWORK ALLIANCE PROJECT - an online community for Zimbabwean activists  
 View archive by sector
 
 
    HOME THE PROJECT DIRECTORYJOINARCHIVESEARCH E:ACTIVISMBLOGSMSFREEDOM FONELINKS CONTACT US
 

 


Back to Index

Data encryption basics - sending secret messages
Robert Ndlovu
September 30, 2011

What is it about?

Encryption in its raw form this is scrambling of a message so that only the intended recipient gets the message using a special pre-determined or agreed method. This is Cryptography which has been in existence time in memorial in different formats reflecting the communication modes of the day. Cryptography is the art and science of secret writing. It is derived from the Greek words krypto which means secret and graphos which means writing.

But what is the fuss? Well you might want to protect and secure your trade secrets, marketing strategies, telephone conversations, product formulations, list of girl friends, military operations etc in storage or in transit. Encryption is perfectly useful and necessary but what you decide to encrypt and transmit might be subject to the laws of the land where you reside. Cryptography is an art and science of encoding and decoding secret messages. Like any other technology it can be used for good or otherwise. As a technocrat my interest lies only in its implementation, deployment and monitoring. Any way why encrypt and transmit? Well you don't know who might be trying to intercept and steal your crucial data while in transit. Why intercept and decrypt? Again governments might want to know who is up to what and scheming what. Kind of a round robin hey. Well for those in this trade, it creates opportunities either way. Whether by encryption or decryption - bills get paid.

Thence encryption is the actual process of applying cryptography. Much of cryptography is math oriented and uses patterns and algorithms to encrypt messages, text, words, emails, SMS, radio signals, TV, and other forms of communication including wireless communications! One way to achieve privacy for both the sender and the intended recipient is to share a key - typically a string of numbers to provide randomness for creating and deciphering secret messages. Such encryption is totally secure provided the key's sequence of numbers is truly random and is used once only and then discarded.

Public key cryptosystems

These make use a pair of complimentary keys instead on one key as in the above examples. The public key encrypts the message and the secret key only known to the recipient deciphers (decrypt) it, In other words what the public key does the secret key can do. And moreover one cannot easily deduce the secret key from the public one. One such system RSA is based on the concept of multiplying two secret prime numbers to get a lengthier public key. It is easy to get a product of two prime numbers number than it is to deduce prime factors of a huge number. Ok an example. Lets say your two prime numbers are 17 and 29. Their product on multiplication is 483 which is the public key .It is not difficult to get up to 17 and deduce 29 as the other prime number - fine. But if the prime factors have are more than 100 digits long, you will have will formidable computational change in front of you! Give it a try with ten digit prime numbers multiply them. Get the answer and see how long you would have taken to deduce the prime factors from their resulting product. I like practice here we go: 7602837319(secret key) and 9383837391(secret key) whose product is 71343786899296749 (public key). Read backwards and deduce's prime factors. Now mind you this info will all be in binary form of zeros and 1s. You know 2 in decimal is 10 in binary etc. Work out the prime factors of the following number and text it to my mobile for a prize! 6.32313176201858537 E+23

Native Example - Don't run away its simpler than you have ever imagined let me give you an example of cryptography that I encountered when I was in my teens while visiting my granny in rural Lower Gwelo area. My Aunts used to communicate between themselves by reversing words. To the uninitiated one this was just gibberish but as time went by it was very easy to decrypt what they were saying. If say my aunt wanted to say "buya lapha" she would say "phala yabu" which means come here. Or translated to "nopa yawu" meaning "wuya pano" in siShona. And this encoding scheme or lingo was of course called "lalenduphe" from phendulela or "rarindipu" which is pindurira translated in Shona. The trick was to speak very fast to the intended listener and thereby minimize interception by anyone the message was not directed to. So breaking the code by figuring out what the actual message is decryption. Here a lot of terms are used interchangeably like this whole study falls under cryptonalysis - analysis of cryptography. Cool of off. To encrypt is to encode. To decrypt is to decode. You have seen a decoder for satellite TV right? You are on the right path.

Cryptography: Code & Cipher

Cryptography has two main areas: code and cipher. Code - this involves replacements of words with certain codes and one would need a codebook to understand a transmitted for that unique communication. For example I might represent "iwe" with code RZ72, "buya" with code ND47, "lapha" with 34TB.Now the message "iwe buya lapha" would be encrypted and sent as RZ72 ND47 34TB.This will never make sense to you, unless of course you have prior access to the decoder "book" that spells out code for each word. Cipher - this encryption is based on the replacement of single characters, with other characters and are often based on complex mathematical operations, just looking at the code is discouraging enough to try figuring out what it means. Let us take a very simple example by representing the letters of the alphabet with sequential numbers in this case A to Z is replaced by numbers 1 to 26 in that order. A B C D E becomes 1 2 3 4 5 etc. So the name NDLOVU becomes 14 4 12 15 22 21. Easy right. Here the characters in the word NDLOVU are replaced by the corresponding numbers. That is encryption, however simple. A simplistic approach in complex subject areas makes them easily understandable to the reader. No rocket so far. If however you saw those numbers without any prior knowledge of the matching pattern that was used, you would not have guessed what 14 4 12 15 22 21 meant.

These very simple examples serve as the basis of understanding what encryption is all about. For starters figure out what your last name is "encrypted" to using the same pattern used above. After you get the gist of it now "encrypt" my last name Ndlovu by replacing the alphabet characters with numbers in the reverse order, that is 26 to 1 and add 7 to each number you get. Try it now before you proceed. If you didn't get 28 30 22 19 11 21, then your encoding pattern is unreliable. Break down. Ndlovu is the message in clear text. Reversal of the numbers of the alphabet 26,25,24,,,,3,2,1 and adding 7 is the algorithm. A secure encryption must not make sense to the naked eye for general level security. Such random numbers do win lottos because they don't make sense - random chaos. Of course this can be reduced into a simple math formula for computers to crunch. Better still one can use a computer program to generate random numbers to encrypt your message - but the principle remains the same only the complexity differs.

There is also the use of a Cipher Key, which is basically a password. The computer can only decrypt the message if the password is the same one used when a message was encrypted. Expressed in simple math the equation looks like:

Plaintext message + Encryption algorithm + Key = Scrambled message

As you can see the first encoding was simpler than the second one. This variability of the encoding pattern is what is technically known as an "algorithm". One can develop an even more complex algorithm by playing and toying around with character replacement. Use of mathematics and computers gives birth to "iron" coded encryption schemes.

Decryption - is the process of interpreting an encrypted message. The intended recipients will need a "key" in order to understand the message being transmitted to him or her. Without this it would be impossible to interpret an encryption using the code method because the sender will chose and determine what code represent which word. You don't believe me what word is represented by D0YH2G? Do not bother trying. In my codebook it means Bosso my favourite team - beating Dynamos 2-0! Crazy stuff right? No. This is serious business explained in layman terms.

In the high tech industry there are several security implementations that comply with specific rules and standards. There is PGP (Pretty Good Privacy), Blowfish, 3AES and son on whose strength and complexity vary. Now it is BlackBerry's encryption protocols that I will touch on my next article, which seems to have stirred a lot of interest in many country from Albania through South Africa via the USA and even Zimbabwe, Blackberry is a product from Canadian based company called RIM. Make sure you don't miss one, as I will attempt to explain its security implementations and implications in plain "English".

Web browsing?

Most web browsers that you use to access your e-mail are generally secure. They use a security protocol known as SSL. If you use either Gmail or Yahoo for your e-mail take a note on the address panel and you will see "https" instead of http. This is an inbuilt security layer to protect your passwords as you log into your e-mail system or even Facebook. But some web browsers especially those on mobile phones don't have this SSL and the browsers will even warn you that your password is being sent in clear text. This means that a determined hacker can see what it is if he is skilled enough to do "a man in the middle attack". If you however want extra security with your emails, simply encrypt all your attached documents before sending them. A strong password will be needed to protect them. This is the key that you will send to recipients via a different communications channel e.g. Facebook or an SMS. This applies of course to sensitive documents like groundbreaking products.

Passwords

So most people get their email passwords compromised because of a number of reasons .I have covered these in depth in previously published Cyber Security articles. But suffice to say that don't choose short passwords. Use long passwords that make no sense with capital letters, numbers and characters e.g. my Gmail password looks something like this: mZeth88BoSso2000R90 based on my high school, soccer team and my UZ registration number! I change the password regularly by toying around with same characters. The bottom line is that make your password hard to crack BUT easy to remember. Avoid using your son or daughter's name birthday combinations, like Tino98. Don't sign up for dubious services online that ask you to a certain friend of yours wants to get in touch with you and then ask for your e-mail and your password. When accessing the web from an Internet cafe make sure you uncheck the "remember me" box. Don't open emails claiming you have won a million bucks - just delete them. Who do you think you are to win $ 1,000,000 via an email from anonymous person whose whereabouts you don't know - don't be stupid. Clear your browser's cache as well. Protect your USB drives in case they are lost. Use your common sense. Most importantly don't transmit illegal stuff it's that simple! Remember that what is illegal offline is still illegal online - no need of a Law Degree to figure that out.

Facebook Security

Do not accept requests of friendship from people whose identity you are not sure of or who could have a reason to post embarrassing, revealing and compromising info or pictures about you. Don't join groups whose mission and agenda you don't fully understand. For God's sake use your common sense - not so common unfortunately judging by the number of abuse complaints logged in every minute back at the California based company. Remember protect your data. Encrypt what is important. The web is full of predators who take advantage of its virtual nature. Any one can be an angel online!

Do you want to be able to protect and secure your sensitive, private, confidential information and data transmissions? Comments and questions always welcome.

Robert Ndlovu is an ICT consultant based in Bulawayo formerly based in Silicon Valley, USA .He offers limited and free consultancy via email, phone and text. ndlovu@ymail.com / ifoni@live.com / Cell: (077) 600 2605 / 077 310 000

Please credit www.kubatana.net if you make use of material from this website. This work is licensed under a Creative Commons License unless stated otherwise.

TOP