## Seecrets on Security: A gentle introduction to cryptography

Written by Stan Seecrets

With increasing incidence of identity thefts, credit card frauds, social engineering attacks, digital world is facing challenges in years ahead. Obviously, cryptography, a young science, will play a prominent role in security of protecting digital assets. This article tries to explain basics of cryptography (encryption) using plain language.

Let us take example of scrambling an egg. First, crack shell, pour contents into a bowl and beat contents vigorously until you achieved needed result - well, a scrambled egg. This action of mixing molecules of egg is encryption. Since molecules are mixed-up, we say egg has achieved a higher state of entropy (state of randomness). To return scrambled egg to its original form (including uncracking shell) is decryption. Impossible?

However, if we substitute word “egg” and replace it with “number”, “molecules” with “digits”, it is POSSIBLE. This, my friend, is exciting world of cryptography (crypto for short). It is a new field dominated by talented mathematicians who uses vocabulary like "non-linear polynomial relations", "overdefined systems of multivariate polynomial equations", "Galois fields", and so forth. These cryptographers uses language that mere mortals like us cannot pretend to understand.

In computer, everything stored are numbers. Your MP3 file is a number. Your text message is a number. Your address book is a longer number. The number 65 represents character "A", 97 for small "a", and so on.

For humans, we recognize numbers with digits from 0 to 9, where else, computer can only recognize 0 or 1. This is binary system which uses bits instead of digits. To convert bits to digits, just simply multiply number of bits by 0.3 to get a good estimation. For example, if you have 256-bits of Indonesian Rupiah (one of lowest currency denomination in world), Bill Gates’ wealth in comparison would be microscopic.

The hexadecimal (base 16) system uses ten digits from 0 to 9, plus six extra symbols from A to F. This set has sixteen different “digits”, hence hexadecimal name. This notation is useful for computer workers to peek into "real contents" stored by computer. Alternatively, treat these different number systems as currencies, be it Euro, Swiss Franc, British Pound and like. Just like an object can be priced with different values using these currencies, a number can also be "priced" in these different number systems as well.

To digress a bit, have you ever wondered why you had to study prime numbers in school? I am sure most mathematics teachers do not know this answer. Answer: A subbranch called public-key cryptography which uses prime numbers especially for encrypting e-mails. Over there, they are talking of even bigger numbers like 2048, 4096, 8192 bits.)

When we want to encrypt something, we need to use a cipher. A cipher is just an algorithm similar to a recipe for baking a cake. It has precise, unambiguous steps. To carry out encryption process, you need a key (some called it passphrase). A good practice in cryptography needs key used by a cipher must be of high entropy to be effective.

Data Encryption Standard (DES), introduced as a standard in late 1970's, was most commonly used cipher in 1980's and early 1990's. It uses a 56-bit key. It was broken in late 1990’s with specialized computers costing about US\$250,000 in 56 hours. With today's (2005) hardware, it is possible to crack within a day.

Subsequently, Triple-DES superseded DES as logical way to preserve compatibility with earlier investments by big corporations (mainly banks). It uses two 56-bit key using three steps:-

1. Encrypt with Key 1. 2. Decrypt with Key 2. 3. Encrypt with Key 1.

The effective key length used is only 112-bits (equivalent to 34 digits). The key is any number between 0 and 5192296858534827628530496329220095. Some modify last process using Key 3, making it more effective at 168-bit keys.

Written by David D. Deprice