Friday, October 19, 2007

Magic Cube of order 3

Magic square of order n is a nXn matrix having same sum of all rows and coloums.
Eg.








It is a magic square of order three. Sum of all the rows and columns is 15.

Now the question is, can we make a magic cube of order three with same sum of all the faces and same sum of all the rows and columns of all the faces.

Here also method to make the magic cube is more important than just finding the answer by hit and trial.

Thanks,
Agry

Wednesday, October 3, 2007

The Code Book by Simon Singh - Chronology

In continuation to previous blog, this one describes the evolution of various encryption techniques mentioned in the book. This goes back to the time of Julius Caesar. Initially when encryption was not widely used, people used to employ Steganography, which is to hide the message by writing it in invisible ink ("milk" of the thithymallus) plant could be used as an invisible ink. Although transparent after drying, gentle heating chars the ink and turns it brown. Many organic fluids behave in a similar way, because they are rich in carbon and therefore char easily. Another method was to write on the shell of a egg by a solution of alum and vinegar and then message can be retrieved from albumen. Cryptography itself can be divided into two branches, known as transposition and substitution.



In transposition, the letters of the message are simply rearranged, effectively generating an anagram. For example: Spartan scytale, which is a wooden staff around which a strip of leather or parchment is wound. The sender writes the message along the length of the scytale, and then unwinds the strip, which now appears to carry a list of random letters; only by rewinding the strip around another scytale of the correct diameter will the message reappear.



In substitution cipher each letter in the plaintext is substituted for a different letter, thus acting in a complementary way to the transposition cipher. In transposition each letter retains its identity but changes its position, whereas in substitution each letter changes its identity but retains its position. The first documented use of a substitution cipher for military purposes appears in Julius Caesar's Gallic Wars. One of the earliest descriptions of encryption by substitution appears in the Kama-Sutra, a text written in the fourth century A.D. by the Brahmin scholar Vatsyayana, but based on manuscripts dating back to the fourth century B.C. The Kama-Sutra recommends that women should study 64 arts, such as cooking, dressing, massage and the preparation of perfumes. The list also includes some less obvious arts, namely conjuring, chess, bookbinding and carpentry. Number 45 on the list is “mkcchita-vikalpd”, the art of secret writing, advocated in order to help women conceal the details of their liaisons.



To encrypt a plaintext message, the sender passes it through an encryption algorithm. The algorithm is a general system for encryption, and needs to be specified exactly by selecting a key. Applying the key and algorithm together to a plaintext generates the encrypted message, or ciphertext. The ciphertext may be intercepted by an enemy while it is being transmitted to the receiver, but the enemy should not be able to decipher the message. However, the receiver, who knows both the key and the algorithm used by the sender, is able to turn the ciphertext back into the plaintext message.



Following are the major advancements done in the field of cryptography:





  1. Caesar shift or Cipher of Queen Mary of Scott

  2. Vigenere Cipher(Le chiffe’re Indechifferable)

  3. Enigma

  4. Alien Language or Linear B

  5. Public Key Cryptography

  6. RSA and PGP

  7. Quantum Computers



Caesar cipher or Caesar Shift



This one is supposed to be the first documented encryption method used by mankind. As the name suggests, it was discovered by Julius Caesar, when he needed to send a war message to Cicero, who was on the verge of surrendering.


In this cipher each letter of the plaintext is shifted to certain number of places relative to its position in normal alphabetical order. For example: “I Love You” becomes “L Oryh Bry” with a shift of 3.Frequency analysis is applied to break this cipher. This method was devised by Al-kind, around 7th century. Main drawback with frequency analysis was that it depends entirely on pattern generated for a particular type of literature. For example "From Zanzibar to Zambia and Zaire, ozone zones make zebras run zany zigzags." Or like French author Georges Perec who wrote a 200 page novel, “La Disparition”, without using letter ‘e’.



But how Queen Mary scott got associated with the cipher? There is a interesting story behind this, which you can read in the book itself, however I have mentioned her name because she was, sadly, the first one who lost her life due to cryptanalysis.


Vigenere Cipher



This cryptic system was first invented by Leon Battista Alberti in 15th century. He is probably best known as an architect, having designed Rome's first Trevi Fountain and having written De re aedificatoria, the first printed book on architecture, but unfortunately he didn’t get the credit for this. People came to know of this system by Blaise de Vigenere, a French diplomat born in 1523. In the Vigenere cipher a different row of the Vigenere Square (a different cipher alphabet) is used to encrypt different fetters of the message. In other words, the sender might encrypt the first letter according to row 5, the second according to row 14, the third according to row 21, and so on. To unscramble the message, the intended receiver needs to know which row of the Vigenere Square has been used to encipher each letter, so there must be an agreed system of switching between rows. This is achieved by using a keyword. The strength of the Vigenere cipher lies in its using not one, but 26 distinct cipher alphabets to encrypt a message. The first step in en-cipherment is to draw up a so-called Vigenere square, as shown in pic., a plaintext alphabet followed by 26 cipher alphabets, each shifted by one letter with respect to the previous alphabet. Hence, row 1 represents a cipher alphabet with a Caesar shift of 1, which means that it could be used to implement a Caesar shift cipher in which every letter of the plaintext is replaced by the letter one place further on in the alphabet. Similarly, row 2 represents a cipher alphabet with a Caesar shift 2, and so on. To unscramble the message, the intended receiver needs to know which row of the Vigenere Square has been used to encipher each letter, so there must be an agreed system of switching between rows. This is achieved by using a keyword. As well as being invulnerable to frequency analysis, the Vigenere cipher has an enormous number of keys. The sender and receiver can agree on any word in the dictionary, any combination of words, or even fabricate words.



The most intriguing figure in nineteenth-century cryptanalysis is Charles Babbage, the eccentric British genius best known for developing the blueprint for the modern computer. His inventions include the speedometer and the cowcatcher, a device that could be fixed to the front of steam locomotives to clear cattle from railway tracks. In terms of scientific breakthroughs, he was the first to realize that the width of a tree ring depended on that year's weather, and he deduced that it was possible to determine past climates by studying ancient trees. In 1823 Babbage designed "Difference Engine No. 1," a magnificent calculator consisting of 25,000 precision parts. After ten years of toil, he abandoned "Difference Engine No. 1," cooked up an entirely new design, and set to work building "Difference Engine No. 2." Lack of government funding meant that Babbage never completed Difference Engine No. 2. The scientific tragedy was that Babbage's machine would have been a stepping-stone to the Analytical Engine, which would have been programmable. In fact, the Analytical Engine provided the template for modern computers. The design included a "store" (memory) and a "mill" (processor), which would allow it to make decisions and repeat instructions, which are equivalent, to the "if . . . then . . ." and "loop" commands in modern programming. In his own lifetime, Babbage made an equally important contribution to code breaking: he succeeded in breaking the Vigenere cipher, and in so doing he made the greatest breakthrough in cryptanalysis since the invention of frequency analysis. Babbage's work required no mechanical calculations or complex computations. Instead, he employed nothing more than sheer cunning.



Babbage's successful cryptanalysis of the Vigenere cipher was probably achieved in 1854, soon after his spat with Thwaites, but his discovery went completely unrecognized because he never published it. The discovery came to light only in the twentieth century, when scholars examined Babbage's extensive notes.



Another interesting story associated with Vigenere Cipher is of Beale Cipher, which made cryptanalysis really famous and people devoted their entire lives in order to break it. Till date it hasn’t been deciphered, at least officially.




Enigma



Around 1890, Marconi invented Radio, one of the most important inventions of mankind. After the invention of radio, reliable encryption became a necessity. If the enemy were going to be able to intercept every radio message, then cryptographers had to find a way of preventing them from deciphering these messages. When World War broke out in 1914, German cryptos found a device to encrypt their messages, called Enigma, made by German inventor Arthur Scherbius and his close friend Richard Ritter.


Scherbius's Enigma machine consisted of a number of ingenious components, which he combined into a formidable and intricate cipher machine. However, if we break the machine down into its constituent parts and rebuild it in stages, then its underlying principles will become apparent. The basic form of Scherbius's invention consists of three elements connected by wires: a keyboard for inputting each plaintext letter, a scrambling unit that encrypts each plaintext letter into a corresponding ciphertext letter, and a display board onsisting of various lamps for indicating the ciphertext letter. An operator wishes to send a secret message. Before encryption begins, the operator must first rotate the scramblers to a particular starting position. The initial setting of the scramblers will determine how the message is encrypted, i.e. it acts as a key. The initial settings are usually dictated by a code-book, which lists the key for each day, and which is available to everybody within the communications network. Distributing the code-book requires time and effort, but because only one key per day is required, it could be arranged for a codebook containing 28 keys to be sent out just once every four weeks. Once the scramblers have been set according to the codebook's daily requirement, the sender can begin encrypting. He types in the first letter of the message, sees which letter is illuminated on the lampboard, and notes it down as the first letter of the ciphertext. Then, the first scrambler having automatically stepped on by one place, the sender inputs the second letter of the message, and so on. Once he has generated the complete ciphertext, he hands it to a radio operator who transmits it to the intended receiver. In order to decipher the message, the receiver needs to have another Enigma machine and a copy of the codebook that contains the initial scrambler settings for that day. He sets up the machine according to the book, types in the ciphertext letter by letter, and the lampboard indicates the plaintext.



Weakness of Enigma were its code-book and key patterns, devised by its operator. Nobody was able to break Enigma by the end of WWI. With the help of Hans-Thilo Schmidt, a traitor in German Army, allies came to know the working of Enigma. Although they now had the machine but they were still too far away from breaking the cipher, as Enigma cipher didn’t depend upon the machine, but the initial scrambler setting. In due course of time, it was finally broken and it all started with Biuro Szyfrow, a polish mathematician. Rejewski's strategy for attacking Enigma focused on the fact that repetition is the enemy of security: repetition leads to patterns, and crypt-analysts thrive on patterns. The most obvious repetition in the Enigma encryption was the message key, which was enciphered twice at the beginning of very message. If the operator chose the message key ULJ, then he would encrypt it twice so that ULJ ULJ might be enciphered as PEFNWZ, which he would then send at the start before the actual message. The Germans had demanded this repetition in order to avoid mistakes caused by radio interference or operator error. But they did not foresee that this would jeopardize the security of the machine. Rejewski proceeded as follows. Thanks to Hans-Thilo Schmidt's espionage, he had access to replica Enigma machines. His team began the laborious chore of checking each of 105,456 scrambler settings, and cataloguing the chain lengths that were generated by each one. It took an entire year to complete the catalogue, but once the Biuro had accumulated the data, Rejewski could finally begin to unravel the Enigma cipher. Each day, he would look at the encrypted message keys, the first six letters of all the intercepted messages, and use the information to build his table of relationships. Rejewski could now go to his catalogue, which contained every scrambler setting indexed according to the sort of chains it would generate. Having found the catalogue entry that contained the right number of chains with the appropriate number of links in each one, he immediately knew the scrambler settings for that particular day key. The chains were effectively fingerprints, the evidence that betrayed the initial scrambler arrangement and orientations. Rejewski was working just like a detective who might find a fingerprint at the scene of a crime, and then use a database to match it to a suspect. Within a year following Rejewski's breakthrough, German communications became transparent. Rejewski's skills eventually reached their limit in December 1938, when German cryptographers increased Enigma's security.



Enigma operators were all given two new scramblers, so that the scrambler arrangement might involve any three of the five available scramblers. After this Polish general offered the British and French two spare Enigma replicas thinking that perhaps Britain and France, with their extra resources, could fully exploit the concept of the bombe, which infact they did, thanks to Alan Turing, one of the British Cryptanalyst.



Alien Language or Linear B



It was not much of a concept rather it was innovative thinking. Americans used a different language for their communications, used by one of their tribes, named Navajo. As for Linear B goes, it was an ancient language, used by people of Mycenae, around 2000 B.C., but it took ages to get it deciphered.




à Mishra

Tuesday, September 25, 2007

Number Puzzle

Hi,

Recently I came across a good puzzle. It says "what is lowest possible number which when divided by 2,3,5,7,9 and 11 leaves remainder 1,2,3,4,5 and 6 respectively".
In this puzzle method and approach is more important than answer.
Give it a shot.

Agry

Tuesday, September 18, 2007

The Code Book by Simon Singh - Concepts

Recently I read this book and I was really amazed by the concepts of cryptography. Frankly speaking I never thought that this field of mathematics can be so interesting. This particular post describes concepts used in Modern cryptography. Since Julius Caesar, who is supposed to be the first one who used encryption, all the cryptic algorithms faced the problem of Key Distribution i.e. how to send key, used for encryption, to the desired receiver.

Bob, Alice and Eve

Problem of key distribution can be described with the help of Alice, Bob and Eve, three fictional characters who have become the industry standard for discussions about cryptography.

In a typical situation, Alice wants to send a message to Bob, or vice versa, and Eve is trying to eavesdrop. If Alice is sending private messages to Bob, she will encrypt each one before sending it, using a separate key each time. Alice is continually faced with the problem of key distribution because she has to convey the keys to Bob securely, otherwise he cannot decrypt the messages. One way to solve the problem is for Alice and Bob to meet up once a week and exchange enough keys to cover the messages that might be sent during the next seven days. Exchanging keys in person is certainly secure, but it is inconvenient and, if either Alice or Bob is taken ill, the system breaks down. Alternatively, Alice and Bob could hire couriers, which would be less secure and more expensive, but at least they have delegated some of the work. Either way, it seems that the distribution of keys is unavoidable. For two thousand years this was considered to be an axiom of cryptography-an indisputable truth. However, there is a thought experiment that seems to defy the axiom.
Imagine that Alice and Bob live in a country where the postal system is completely immoral, and postal employees will read any unprotected correspondence. One day, Alice wants to send an intensely personal message to Bob. She puts it inside an iron box, closes it and secures it with a padlock and key. She puts the padlocked box in the post and keeps the key. However, when the box reaches Bob, he is unable to open it because he does not have the key. Alice might consider putting the key inside another box, padlocking it and sending it to Bob, but without the key to the second padlock he is unable to open the second box, so he cannot obtain the key that opens the first box. The only way around the problem seems to be for Alice to make a copy of her key and give it to Bob in advance when they meet for coffee. So far, I have just restated the same old problem in a new scenario. Avoiding key distribution seems logically impossible--surely, if Alice wants to lock something in a box so that only Bob can open it, she must give him a copy of the key. Or, in terms of cryptography, if Alice wants to encipher a message so that only Bob can decipher it, she must give him a copy of the key. Key exchange is an inevitable part of en-cipherment or is it?

Now picture the following scenario. As before, Alice wants to send an intensely personal message to Bob. Again, she puts her secret message in an iron box, padlocks it and sends it to Bob. When the box arrives, Bob adds his own padlock and sends the box back to Alice. When Alice receives the box, it is now secured by two padlocks. She removes her own padlock, leaving just Bob's padlock to secure the box. Finally she sends the box back to Bob. And here is the crucial difference: Bob can now open the box because it is secured only with his own padlock, to which he alone has the key.

The implications of this little story are enormous. It demonstrates that a secret message can be securely exchanged between two people without necessarily exchanging a key. Alice uses her own key to encrypt a message to Bob, who encrypts it again with his own key and returns it. When Alice receives the doubly encrypted message, she removes her own encryption and returns it to Bob, who can then remove his own encryption and read the message. It seems that the problem of key distribution might have been solved, because the doubly encrypted scheme requires no exchange of keys.

However, there is a fundamental obstacle to implementing this system. The problem is the order in which the encryptions and decryptions are performed, which should obey the maxim "last on, first off." In other words, the last stage of encryption should be the first to be decrypted. In the above scenario, Bob performed the last stage of encryption, so this should have been the first to be decrypted, but it was Alice who removed her encryption first, before Bob removed his. The importance of order is most easily grasped by examining something we do every day. In the morning we put on our socks, and then we put on our shoes, and in the evening we remove our shoes before removing our socks--it is impossible to remove the socks before the shoes. We must obey the maxim "last on, first off."

However, in the 1970s it seemed that any form of strong encryption must always obey the "last on, first off" rule. If a message is encrypted with Alice's key and then with Bob's key, then it must be decrypted with Bob's key before it can be decrypted with Alice's key. Although the doubly padlocked box approach would not work for real-world cryptography, it inspired Diffie and Hellman to search for a practical method of circumventing the key distribution problem.

Their research concentrated on the examination of various mathematical functions. Most mathematical functions are classified as two-way functions because they are easy to do, and easy to undo. For example, doubling" is a two-way function because it is easy to double a number to generate a new number, and just as easy to undo the function and get from the doubled number back to the original number. However, Diffie and Hellman were not interested in two-way functions. They focused their attention on one-way functions. As the name suggests, a one-way function is easy to do but very difficult to undo. In other words, two-way functions are reversible, but one-way functions are not reversible.

Once again, the best way to illustrate a one-way function is in terms of an everyday activity. Cracking of an egg is a one-way function, because it is easy to crack an egg but impossible then to return the egg to its original condition. For this reason, one-way functions are sometimes called Humpty Dumpty functions. Modular arithmetic, sometimes called dock arithmetic in schools, is an area of mathematics that is rich in one-way functions. In modular arithmetic, mathematicians consider a finite group of numbers arranged in a loop, rather like the numbers on a clock. Modular arithmetic is relatively simple, and in fact we do it every day when we talk about time. If it is 9 o'clock now, and we have a meeting 8 hours from now, we would say that the meeting is at 5 o'clock, not 17 o'clock. Rather than visualizing clocks, mathematicians often take the shortcut of performing modular calculations according to the following recipe. First, perform the calculation in normal arithmetic. Second, if we want to know the answer in (mod x), we divide the normal answer by x and note the remainder. This remainder is the answer in (mod x). To find the answer to 11x9 (mod 13), we do the following:
11 x 9=99 à 99 /13= 7, remainder 8

Functions performed in the modular arithmetic environment tend to behave erratically, which in turn sometimes makes them one-way functions. This becomes evident when a simple function in normal arithmetic is compared with the same simple function in modular arithmetic. In the former environment the function will be two-way and easy to reverse; in the latter environment it will be one-way and hard to reverse. As an example, let us take the function 3X. This means take a number x, then multiply 3 by itself x times in order to get the new number. For example, if x = 2, and we perform the function, then:
3^ = 32 = 3x3 = 9.

Hence, if we were given the result of the function it would be relatively easy to work back- ward and deduce the original number. However, in modular arithmetic this same function does not behave so sensibly. Imagine that we are told that 3X in (mod 7) is 1, and we are asked to find the value of x. No value springs to mind, because we are generally unfamiliar with modular arithmetic. We could take a guess that x= 5, and we could work out the result of 35 (mod 7). The answer turns out to be 5, which is too big, because we are looking for an answer of just 1. We might be tempted to reduce the value of x and try again. But we would be heading in the wrong direction, because the actual answer is x= 6. In normal arithmetic we can test numbers and can sense whether we are getting warmer or colder. The environment of modular arithmetic gives no helpful clues, and reversing functions is much harder. Often, the only way to reverse a function in modular arithmetic is to compile a table by calculating the function for many values of x until the right answer is found. It is a classic example of a one-way function, because I could pick a value for x and calculate the result of the function, but if I gave you a result, say 5,787, you would have enormous difficulty in reversing the function and deducing my choice of x. It took me just seconds to do my calculation and generate 5,787, but it would take you hours to draw up the table and work out my choice of x.

After two years of focusing on modular arithmetic and one-way functions, Hellman's foolishness began to pay off. In the spring of 1976 he hit upon a strategy for solving the key exchange problem. In half an hour of frantic scribbling, he proved that Alice and Bob could agree on a key without meeting, thereby disposing of an axiom that had lasted for centuries. Hellman's idea relied on a one-way function of the form Yx (mod P). Initially, Alice and Bob agree on values for Y and P. Almost any values are fine, but there are some restrictions, such as Y being smaller than P. These values are not secret, so Alice can telephone Bob and suggest that, say, Y= 7 and P= 11. Even if the telephone line is insecure and nefarious Eve hears this conversation, it does not matter, as we shall see later. Alice and Bob have now agreed on the one-way function lx (mod 11). At this point they can begin the process of trying to establish a secret key without meeting. By using Hellman's scheme, Alice and Bob have been able to agree on a key, yet they did not have to meet up and whisper the key to each other. The extraordinary achievement is that the secret key was agreed via an exchange of information on a normal telephone line. But if Eve tapped this line, then surely she also knows the key? Let us examine Hellman's scheme from Eve's point of view.

If she is tapping the line, she knows only the following facts: that the function is lx (mod 11), that Alice sends a = 2 and that Bob sends b = 4. In order to find the key, she must either do what Bob does, which is turn a into the key by knowing b, or do what Alice does, which is turn b into the key by knowing A. However, Eve does not know the value of A or B because Alice and Bob have not exchanged these numbers, and have kept them secret. Eve is stymied. She has only one hope: in theory, she could work out A from a, because ‘a’ was a consequence of putting A into a function, and Eve knows the function. Or she could work out B from b, because 3 was a consequence of putting B into a function, and once again Eve knows the function. Unfortunately for Eve, the function is one-way, so whereas it was easy for Alice to turn A into ‘a’ and for Bob to turn B into ‘b’, it is very difficult for Eve to reverse the process, especially if the numbers are very large. Bob and Alice exchanged just enough information to allow them to establish a key, but this information was insufficient for Eve to work out the key.

As an analogy for Hellman's scheme, imagine a cipher that somehow uses color as the key. First, let us assume that everybody, including Alice, Bob and Eve, has a three-liter pot containing one liter of yellow paint. If Alice and Bob want to agree on a secret key, each of them adds one liter of their own secret color to their own pot. Alice might add a peculiar shade of purple, while Bob might add crimson. Each sends their own mixed pot to the other. Finally, Alice takes Bob's mixture and adds one liter of her own secret color, and Bob takes Alice's mixture and adds one liter of his own secret color. Both pots should now be the same color, because they both contain one liter of yellow, one liter of purple and one liter of Crimson. It is the exact color of the doubly contaminated pots that is used as the key. Alice has no idea what color was added by Bob, and Bob has no idea what color was added by Alice, but they have both achieved the same end. Meanwhile, Eve is furious. Even if she intercepts the intermediate pots she cannot work out the color of the final pots, which is the agreed key. She might see the color of the mixed pot containing yellow and Alice's secret color on its way to Bob, and she might see the color of the mixed pot containing yellow and Bob's secret color on its way to Alice, but in order to work out the key she really needs to know Alice and Bob's original secret colors. However, Eve cannot work out Alice and Bob's secret colors by looking at the mixed pots. Even if she takes a sample from one of the mixed paints, she cannot unmix the paint to find out the secret color, because mixing paint is a one-way function. The Diffie-Hellman-Merkle key exchange scheme, as it is known, enables Alice and Bob to establish a secret via public discussion. It is one of the most counterintuitive discoveries in the history of science, and it forced the cryptographic establishment to rewrite the rules of encryption. Henceforth, Alice and Bob no longer had to meet in order to exchange a key. Instead, Alice could just call Bob on the phone, exchange a couple of numbers with him, mutually establish a secret key and then proceed to encrypt.

Although Diffie-Hellman-Merkle key exchange was a gigantic leap forward, the system was not perfect because it was inherently inconvenient. Imagine that Alice lives in Hawaii, and that she wants to send an email to Bob in Istanbul. Bob is probably asleep, but the joy of e-mail is that Alice can send a message at any time, and it will be waiting on Bob's computer when he wakes up. However, if Alice wants to encrypt her message, then she needs to agree a key with Bob, and in order to perform the key exchange it is preferable for Alice and Bob to be on-line at the same time--establishing a key requires a mutual exchange of information. In effect, Alice has to wait until Bob wakes up. Alternatively, Alice could transmit her part of the key exchange, and wait 12 hours for Bob's reply, at which point the key is established and Alice can, if she is not asleep herself, encrypt and transmit the message. Either way, Hellman's key exchange system hinders the spontaneity of email.

The Birth of Public Key Cryptography

So far, all the encryption techniques discovered have been symmetric, which means that the unscrambling process is simply the opposite of scrambling. For example, the Enigma machine uses a certain key setting to encipher a message, and the receiver uses an identical machine in the same key setting to decipher it. Both sender and receiver effectively have equivalent knowledge, and they both use the same key to encrypt and decrypt-their relationship is symmetric. On the other hand, in an asymmetric key system, as the name suggests, the encryption key and the decryption key are not identical. In an asymmetric cipher, if Alice knows the encryption key she can encrypt a message, but she cannot decrypt a message. In order to decrypt, Alice must have access to the decryption key. This distinction between the encryption and decryption keys is what makes an asymmetric cipher special.

At this point it is worth stressing that although Diffie had conceived of the general concept of an asymmetric cipher, he did not actually have a specific example of one. However, the mere concept of an asymmetric cipher was revolutionary. If cryptographers could find a genuine working asymmetric cipher, a system that fulfilled Diffie's requirements, then the implications for Alice and Bob would be enormous. Alice could create her own pair of keys: an encryption key and a decryption key. If we assume that the asymmetric cipher is a form of computer encryption, then Alice's encryption key is a number, and her decryption key is a different number. Alice keeps the decryption key secret, so it is commonly referred to as Alice's private key. However, she publishes the encryption key so that everybody has access to it, which is why it is commonly referred to as Alice's public key. If Bob wants to send Alice a message, he simply looks up her public key, which would be listed in something akin to a telephone directory. Bob then uses Alice's public key to encrypt the message. He sends the encrypted message to Alice, and when it arrives Alice can decrypt it using her private decryption key. Similarly, if Charlie, Dawn or Edward wants to send Alice an encrypted message, they too can look up Alice's public encryption key, and in each case only Alice has access to the private decryption key required to decrypt the messages. The great advantage of this system is that there is no toing and froing, as there is with Diffie-Hellman-Merkle key exchange. Bob does not have to wait to get information from Alice before he can encrypt and send a message to her; he merely has to look up her public encryption key. Furthermore, the asymmetric cipher still overcomes the problem of key distribution. Alice does not have to transport the public encryption key securely to Bob: in complete contrast, she can now publicize her public encryption key as widely as possible. She wants the whole world to know her public encryption key so that anybody can use it to send her encrypted messages. At the same time, even if the whole world knows Alice's public key, none of them, including Eve, can decrypt any messages encrypted with it, because knowledge of the public key will not help in decryption. In fact, once Bob has encrypted a message using Alice's public key, even he cannot decrypt it. Only Alice, who possesses the private key, can decrypt the message.

This is the exact opposite of a traditional symmetric cipher, in which Alice has to go to great lengths to transport the encryption key securely to Bob. In a symmetric cipher the encryption key is the same as the decryption key, so Alice and Bob must take enormous precautions to ensure that the key does not fall into Eve's hands. This is the root of the key distribution problem. Returning to padlock analogies, asymmetric cryptography can be thought of in the following way. Anybody can close a padlock simply by clicking it shut, but only the person who has the key can open it. Locking (encryption) is easy, something everybody can do, but unlocking (decryption) can be dene only by the owner of the key. The trivial knowledge of knowing how to click the padlock shut does not tell you how to unlock it. Taking the analogy further, imagine that Alice designs a padlock and key. She guards the key, but she manufactures thousands of replica padlocks and distributes them to post offices all over the world. If Bob wants to send a message, he puts it in a box, goes to the local post office, asks for an "Alice padlock" and padlocks the box. Now he is unable to unlock the box, but when Alice receives it she can open it with her unique key. The padlock and the process of clicking it shut is equivalent to the public encryption key, because everyone has access to the padlocks, and every one can use a padlock to seal a message in a box. The padlock's key is equivalent to the private decryption key, because only Alice has it, only she can open the padlock, and only she can gain access to the message in the box.
The system seems simple when it is explained in terms of padlocks, but it is far from trivial to find a mathematical function that does the same job, something that can be incorporated into a workable cryptographic system. To turn asymmetric ciphers from a great idea into a practical invention, somebody had to discover an appropriate mathematical function. Diffie envisaged a special type of one-way function, one that could be reversed under exceptional circumstances. In Diffie's asymmetric system, Bob encrypts the message using the public key, but he is unable to decrypt it--this is essentially a one-way function. However, Alice is able to decrypt the message because she has the private key, a special piece of information that allows her to reverse the function. Once again, padlocks are a good analogy-shutting the padlock is a one-way function, because in general it is hard to open the padlock unless you have something special (the key), in which case the function is easily reversed. Diffie published an outline of his idea in the summer of 1975, whereupon other scientists joined the search for an appropriate one-way function, one that fulfilled the criteria required for an asymmetric cipher.
Initially there was great optimism, but by the end of the year nobody had been able to find a suitable candidate. As the months passed, it seemed increasingly likely that special one-way functions did not exist. It seemed that Diffie's idea worked in theory but not in practice. Nevertheless, by the end of 1976 the team of Diffie, Hellman and Merkle had revolutionized the world of cryptography. They had persuaded the rest of the world that there was a solution to the key distribution problem, and had created Diffie-Hellman-Merkle key exchange--a workable but imperfect system. They had also proposed the concept of an asymmetric cipher--a perfect but as yet unworkable system. They continued their research at Stanford University, attempting to find a special one-way function that would make asymmetric ciphers a reality. However, they failed to make the discovery. The race to find an asymmetric cipher was won by another trio of researchers, based 5,000 km away on the East Coast of America.

In April 1977, Rivest, Shamir and Adleman spent Passover at the house of a student, and had consumed significant amounts of Manischewitz wine before returning to their respective homes some time around midnight. Rivest, unable to sleep, lay on his couch reading a Mathematics textbook. He began mulling over the question that had been puzzling him for weeks-is it possible to build an asymmetric cipher? Is it possible to find a one-way function that can be reversed only if the receiver has some special information? He spent the rest of that night formalizing his idea, effectively writing a complete scientific paper before daybreak. Rivest had made a breakthrough, but it had grown out of a yearlong collaboration with Shamir and Adleman, and it would not have been possible without them. Rivest finished off the paper by listing the authors alphabetically; Adleman, Rivest, Shamir.

Before exploring Rivest's idea, here is a quick reminder of what scientists were looking for in order to build an asymmetric cipher:
(1) Alice must create a public key, which she would then publish so that Bob (and everybody else) can use it to encrypt messages to her.
Because the public key is a one-way function, it must be virtually impossible for anybody to reverse it and decrypt Alice's messages.
(2) However, Alice needs to decrypt the messages being sent to her. She must therefore have a private key, some special piece of information, which allows her to reverse the effect of the public key.

Therefore, Alice (and Alice alone) has the power to decrypt any messages sent to her. At the heart of Rivest's asymmetric cipher is a one-way function based on the sort of modular functions described earlier in the chapter. Rivest's one-way function can be used to encrypt a message—the message, which is effectively a number, is put into the function, and the result is the ciphertext, another number. I shall not describe Rivest's one-way function in detail, but I shall explain one particular aspect of it, known simply as N, because it is N that makes this one-way function reversible under certain circumstances, and therefore ideal for use as an asymmetric cipher. N is important because it is a flexible component of the one-way function, which means that each person can choose a different value of N, and personalizes the one-way function.

In order to choose her personal value of N, Alice picks two prime numbers, p and q, and multiplies them together. So, Alice could choose her prime numbers to be p = 17,159 and q = 10,247. Multiplying these two numbers together gives N = 17,159 * 10,247 = 175,828,273. Alice's choice of N effectively becomes her public encryption key, and she could print it on her business card, post it on the
Internet, or publish it in a public key directory along with everybody else's value of N. If Bob wants to encrypt a message to Alice, he looks up Alice's value of N (175,828,273) and then inserts it into the general form of the one-way function, which would also be public knowledge. Bob now has a one-way function tailored with Alice's public key, so it could be called Alice's one-way function. To encrypt a message to Alice, he takes Alice's one-way function, inserts the message, notes down the result and sends it to Alice. At this point the encrypted message is secure because nobody can decipher it. The message has been encrypted with a one-way function, so reversing the one-way function and decrypting the message is, by definition, very difficult. However, the question remains-how can Alice decrypt the message?

In order to read messages sent to her, Alice must have a way of reversing the one-way function. She needs to have access to some special piece of information that allows her to decrypt the message. Fortunately for Alice, Rivest designed the one-way function so that it is reversible to someone who knows the values off and q, the two prime numbers that are multiplied together to give N. Although
Alice has told the world that her value for N is 175,828,273, she has not revealed her values for p and q, so only she has the special information required to decrypt her own messages. We can think of N as the public key, the information that is available to everybody, the information required to encrypt messages to Alice. Whereas, p and q is the private key, available only to Alice, the information required to decrypt these messages. The exact details of how p and q can be used to reverse the one-way function are outlined in Appendix J. However, there is one question that must be addressed immediately. If everybody knows N, the public key, and then surely people can deduce p and q, the private key, and read Alice's messages? After all, N was created from p and q. In fact, it turns out that if
N is large enough, it is virtually impossible to deduce p and q from N, and this is perhaps the most beautiful and elegant aspect of the RSA asymmetric cipher.

Alice created N by choosing p and q, and then multiplying them together. The fundamental point is that this is in itself a one-way function. To demonstrate the one-way nature of multiplying primes, we can take two prime numbers, such as 9,419 and 1,933, and multiply them together. With a calculator it takes just a few seconds to get the answer, 18,206,927. However, if instead we were given 18,206,927 and asked to find the prime factors (the two numbers that were multiplied to give 18,206,927) it would take us much longer. If you doubt the difficulty of finding prime factors, then consider the following. It took me just ten seconds to generate the number 1,709,023, but it will take you and a calculator the best part of an afternoon to work out the prime factors. This system of asymmetric cryptography, known as RSA, is said to be a form of public key cryptography. To find out how secure RSA is, we can examine it from Eve's point of view, and try to break a message from Alice to Bob. To encrypt a message to Bob, Alice must look up Bob's public key. To create his public key, Bob picked his own prime numbers, pB and qB, and multiplied them together to get NB. He has kept pB and qB secret, because these make up his private decryption key, but he has published NB, which is equal to 408,508,091. So Alice inserts Bob's public key NB into the general one-way encryption function, and then encrypts her message to him. When the encrypted message arrives, Bob can reverse the function and decrypt it using his values for pB and qB, which make up his private key.

Meanwhile, Eve has intercepted the message en route. Her only hope of decrypting the message is to reverse the one-way function, and this is possible only if she knows pB and qB. Bob has kept pB and qB secret, but Eve, like everybody else, knows NB is 408,508,091. Eve then attempts to deduce the values for pB and qB by working out which numbers would need to be multiplied together to get 408,508,091, a process known as factoring. Factoring is very time-consuming, but exactly how long would it take Eve to find the factors of 408,508,091? There are various recipes for trying to factor NB. Although some recipes are faster than others, they all essentially involve checking each prime number to see if it divides into NB without a remainder. For example, 3 is a prime number, but it is not a factor of 408,508,091 because 3 will not perfectly divide into 408,508,091. So Eve moves on to the next prime number, 5. Similarly, 5 is not a factor, so Eve moves on to the next prime number, and so on. Eventually, Eve arrives at 18,313, the 2,000th prime number, which is indeed a factor of 408,508,091. Having found one factor, it is easy to find the other one, which turns out to be 22,307. If Eve had a calculator and was able to check four primes a minute, then it would have taken her 500 minutes, or more than 8 hours, to find pB and qB. This is not a very high level of security, but Bob could have chosen much larger prime numbers and increased the security of his private key. For example, he could have chosen primes that are as big as 10^5. This would have resulted in a value for N that would have been roughly 1065 x 1065, which is 10130. A computer could multiply the two primes and generate N in just a second, but if Eve wanted to reverse the process and work out p and q, it would take inordinately longer. Exactly how long depends on the speed of Eve's computer. Security expert Sim-son Garfmkel estimated that a 100 MHz Intel Pentium computer with 8 MB of RAM would take roughly 50 years to factor a number as big as 10130.

Cryptographers tend to have a paranoid streak and consider worst-case scenarios, such as a worldwide conspiracy to crack their ciphers. So, Garfinkel considered what would happen if a hundred million personal computers (the number sold in 1995) ganged up together. The result is that a number as big as 10130 could be factored in about 15 seconds. Consequently, it is now generally accepted that for genuine security it is necessary to use even larger primes. For important banking transactions, N tends to be at least 10308.
The combined efforts of a hundred million personal computers would take more than one thousand years to crack such a cipher. With Sufficiently large values off and q, RSA is impregnable. The only caveat for the security of RSA public key cryptography is that at some time in the future somebody might find a quick way to factor N. It is conceivable that a decade from now, or even tomorrow, somebody will discover a method for rapid factoring, and thereafter RSA will become useless. However, for over two thousand years mathematicians have tried and failed to find a shortcut, and at the moment factoring remains an enormously time-consuming calculation. Most mathematicians believe that factoring is an inherently difficult task, and that there is some mathematical law that forbids any shortcut.

PGP and Digital signature

Today, electronic mail is gradually replacing conventional paper mail, and is soon to be the norm for everyone, not the novelty it is today. Unlike paper mail, email messages are just too easy to intercept and scan for interesting keywords. This can be done easily, routinely, automatically, and undetectably on a grand scale. This is analogous to driftnet fishing-making a quantitative and qualitative Orwellian difference to the health of democracy. The difference between ordinary and digital mail can be illustrated by imagining that Alice wants to send out invitations to her birthday party, and that Eve, who has not been invited, wants to know the time and place
of the party. If Alice uses the traditional method of posting letters, then it is very difficult for Eve to intercept one of the invitations. To start with, Eve does not know where Alice's invitations entered the postal system, because Alice could use any postbox in the city. Her only hope for intercepting one of the invitations is to somehow identify the address of one of Alice's friends, and infiltrate the local sorting office. She then has to check each and every letter manually. If she does manage to find a letter from Alice, she will have to steam it open in order to get the information she wants, and then return it to its original condition to avoid any suspicion of tampering. In comparison, Eve's task is made considerably easier if Alice sends her invitations by e-mail. As the messages leave Alice's computer, they will go to a local server, a main entry point for the Internet; if Eve is clever enough, she can hack into that local server without leaving her home. The invitations will carry Alice's e-mail address, and it would be a trivial matter to set up an electronic sieve that looks for e-mails containing Alice's address. Once an invitation has been found, there is no envelope to open, and so no problem in reading it. Furthermore, the invitation can be sent on its way without it showing any sign of having been intercepted. Alice would be oblivious to what was going on. However, there is a way to prevent Eve from reading Alice's e-mails, namely encryption.

If Alice wants to use RSA to encrypt a message to Bob, she looks up his public key and then applies RSA's one-way function to the message. Conversely, Bob decrypts the ciphertext by using his private key to reverse RSA's one-way function. Both processes require considerable mathematical manipulation, so encryption and decryption can, if the message is long, take several minutes on a personal computer. If Alice is sending a hundred messages a day, she cannot afford to spend several minutes encrypting each one. To speed up encryption and decryption, Zimmermann employed a neat trick that used asymmetric RSA encryption in tandem with old-fashioned symmetric encryption. Traditional symmetric encryption can be just as secure as asymmetric encryption, and it is much quicker to perform, but symmetric encryption suffers from the problem of having to distribute the key, which has to be securely transported from the sender to the receiver. This is where RSA comes to the rescue, because RSA can be used to encrypt the symmetric key.

Zimmermann pictured the following scenario. If Alice wants to send an encrypted message to Bob, she begins by encrypting it with a symmetric cipher. Zimmermann suggested using a cipher known as IDEA, which is similar to DES. To encrypt with IDEA, Alice needs to choose a key, but for Bob to decrypt the message Alice somehow has to get the key to Bob. Alice overcomes this problem by looking up Bob's RSA public key, and then uses it to encrypt the IDEA key. So, Alice ends up sending two things to Bob: the message encrypted with the symmetric IDEA cipher and the IDEA key encrypted with the asymmetric RSA cipher. At the other end, Bob uses his RSA private key to decrypt the IDEA key, and then uses the IDEA key to decrypt the message. This might seem convoluted, but the advantage is that the message, which might contain a large amount of information, is being encrypted with a quick symmetric cipher, and only the symmetric IDEA key, which consists of a relatively small amount of information, is being encrypted with a slow asymmetric cipher. Zimmermann planned to have this combination of RSA and IDEA within the PGP product, but the user-friendly interface would mean that the user would not have to get involved in the nuts and bolts of what was going on. Having largely solved the speed problem, Zimmermann also incorporated a series of handy features into PGP. For example, before using the RSA component of PGP, Alice needs to generate her own private key and public key. Key generation is not trivial, because it requires finding a pair of giant primes. However, Alice only has to wiggle her mouse in an erratic manner, and the PGP program will go ahead and create her private key and public key--the mouse movements introduce a random factor which PGP utilizes to ensure that every user has their own distinct pair of primes, and therefore their own unique private key and public key. Thereafter Alice merely has to publicize her public key.

Another helpful aspect of PGP is its facility for digitally signing an email. Ordinarily e-mail does not carry a signature, which means that it is impossible to verify the true author of an electronic message. For example, if Alice uses e-mail to send a love letter to Bob, she normally encrypts it with his public key, and when he receives it he decrypts it with his private key. Bob is initially flattered, but how can he be sure that the love letter is really from Alice? Perhaps the malevolent Eve wrote the email and typed Alice's name at the bottom. Without the reassurance of a handwritten ink signature, there is no obvious way to verify the authorship. In order to develop trust on the Internet, it is essential that there is some form of reliable digital signature. The PGP digital signature is based on a principle that was first developed by Whitfield Diffie and Martin Hellman. When they proposed the idea of separate public keys and private keys, they realized that, in addition to solving the key distribution problem, their invention would also provide a natural mechanism for generating e-mail signatures. Now we now that the public key is for encrypting and the private key for decrypting. In fact the process can be swapped around, so that the private key is used for encrypting and the public key is used for decrypting. This mode of encryption is usually ignored because it offers no security. If Alice uses her private key to encrypt a message to Bob, then everybody can decrypt it because everybody has Alice's public key. However, this mode of operation does verify authorship, because if Bob can decrypt a message using Alice's public key, then it must have been encrypted using her private key--only Alice has access to her private key, so the message must have been sent by Alice. In effect, if Alice wants to send a love letter to Bob, she has two options. Either she encrypts the message with Bob's public key to guarantee privacy, or she encrypts it with her own private key to guarantee authorship. However, if she combines both options she can guarantee privacy and authorship.

There are quicker ways to achieve this, but here is one way in which Alice might send her love letter. She starts by encrypting the message using her private key, then she encrypts the resulting ciphertext using Bob's public key. We can picture the message surrounded by a fragile inner shell, which represents encryption by Alice's private key, and a strong outer shell, which represents encryption by Bob's public key. The resulting ciphertext can only be deciphered by Bob, because only he has access to the private key necessary to crack the strong outer shell. Having deciphered the outer shell, Bob can then easily decipher the inner shell using Alice's public key-the inner shell is not meant to protect the message, but it does prove that the message came from Alice, and not an impostor. Now To send a message to Bob, Alice would simply write her e-mail and select the PGP option from a menu on her computer screen. Next she would type in Bob's name, then PGP would find Bob's public key and automatically perform all the encryption. At the same time PGP would do the necessary jiggery-pokery required to digitally sign the message. Upon receiving the encrypted message, Bob would select the PGP option, and PGP would decrypt the message and verify the author.

Nothing in PGP was original-Diffie and Hellman had already thought of digital signatures and other cryptographers had used a combination of symmetric and asymmetric ciphers to speed up encryption—but Zimmermann was the first to put everything together in one easy-to-use encryption product, which was efficient enough to run on a moderately sized personal computer. At the moment, a purchase on the Internet can be secured by public key cryptography. Alice visits a company's Web site and selects an item. She then fills in an order form which asks her for her name, address and credit card details. Alice then uses the company's public key to encrypt the order form. The encrypted order form is transmitted to the company, who are the only people able to decrypt it, because only they have the private key necessary for decryption. All of this is done automatically by Alice's Web browser (e.g., Netscape or Explorer) in conjunction with the company's computer. As usual, the security of the encryption depends on the size of the key. The cost of the equipment required to decipher Alice's credit card details is vastly greater than the typical credit card limit, so such an attack is not cost-effective. However, as the amount of money flowing around the Internet increases, it will eventually become profitable for criminals to decipher credit card details. In short, if Internet commerce is to thrive, consumers around the world must have proper security, and businesses will not tolerate crippled encryption.

However, one aspect of future encryption policy seems certain, namely the necessity for certification authorities. If Alice wants to send a secure e-mail to a new friend, Zak, she needs Zak's public key. She might ask Zak to send his public key to her in the mail. Unfortunately, there is then the risk that Eve will intercept Zak's letter to Alice, destroy it and forge a new letter, which actually includes her own public key instead of Zak's. Alice may then send a sensitive e-mail to Zak, but she will unknowingly have encrypted it with Eve's public key. If Eve can intercept this e-mail, she can then easily decipher it and read it. In other words, one of the problems with public key cryptography is being sure that you have the genuine public key of the person with whom you wish to communicate. Certification authorities are organizations that will verify that a public key does indeed correspond to a particular person. A verification authority might request a face-to-face meeting with Zak as a way of ensuring that they have correctly catalogued his public key. If Alice trusts the certification authority, she can obtain from it Zak's public key, and be confident that the key is valid. I have explained how Alice could securely buy products from the Internet by using a company's public key to encrypt the order form. In fact, she would do this only if the public key had been validated by a certification authority.

In 1998, the market leader in certification was Verisign, which has grown into a $30 million company in just four years.

--> Mishra

Thursday, September 6, 2007

Vietnam War

First movie which I saw, based on Vietnam War, was ‘Rambo II’. But at that time I hardly knew anything about VW, and I was too much fascinated by Rambo, the great. After that I saw Rambo I, and I got an idea that it was not just a war and what terrible things it did to people, on both the sides. Then after quite some time I watched ‘Full Metal Jacket’, by great Stanley, and this movie gave me quite a information on what Vietnam war was, what it did to merican soldiers and how so many of them had almost lost their mental balance. I really liked the movie, mainly the first half, depicting funny and not-so funny incidences at military training camp, that training officer, his marching song, that poor fat fellow and many more. Second half was not that entertaining and more of an eye opener. It showed the effects of war on the psyche of soldiers, Vietnamese people and on that God-forsaken country.

Next movie was ‘The Deer Hunter’. Quite a long movie, almost 3 hours, but worth watching. It shows the life of Deniro and Christopher Walken, who are real close friends, enjoying their time in US of A, and then they went to VW, and how their lives were changed irreversibly. First hour shows the life of a group of friends, who work in a factory and enjoy their lives. Their unique hobby is deer hunting, and Deniro is really good at it. Then in next hour shows their VW stay and how each of them went through it. Last one hour showed that what VW did to soldier’s psyche. Walken lost control of his life and never recovered.

Platoon was the next. This one shows two entirely different army captains, fighting in VW, but with completely different view. One just wants to kill each and every Charlie and the other who just wants to end the war. Between the is a rookie, who is really confused as to who is right and who is wrong. In all a really good movie.

After this I watched, greatest of them all, ‘Apocalypse Now’. It had mix of all of the above ones. It shows the methods used by American army in VW, frustration of American soldiers and the after effect of this.

-- Mishra

Friday, August 31, 2007

Freakonomics by Steven Levitt & Sthephen Dubner

Few months back I read this book, and I completed it in almost no time, given that I’m a slow reader, sometimes it takes me months to complete a book. This can you an idea how interesting this book is. For my own reference, I usually write down a summary of the book.

The book is written by Steven D. Levitt, a young economist at the University of Chicago, who had just won the John Bates Clark Medal (awarded every two years to the best American economist under forty), Harvard undergrad, a PhD from MIT.

“The Steven Levitt tends to see things differently than the average person. Differently, too, than the average economist. This is either a wonderful trait or a troubling one, depending on how you feel about economists.”
—The New York Times Magazine, August 3, 2003

According to Levitt: “I’m not good at math, I don’t know a lot of econometrics, and I also don’t know how to do theory. If you ask me about whether the stock market’s going to go up or down, if you ask me whether the economy’s going to grow or shrink, if you ask me whether deflation’s good or bad, if you ask me about taxes—I mean, it would be total fakery if I said I knew anything about any of those things.”.


As Levitt sees it, economics is a science with excellent tools for gaining answers but a serious shortage of interesting questions. His particular gift is the ability to ask such questions. For instance:

How Is the Ku Klux Klan Like a Group of Real-Estate Agents?
If drug dealers make so much money, why do they still live with their mothers?
Which is more dangerous, a gun or a swimming pool?
What really caused crime rates to plunge during the past decade?
Do real-estate agents have their clients’ best interests at heart?
Why do black parents give their children names that may hurt their career prospects?
Do schoolteachers cheat to meet high-stakes testing standards?
Is sumo wrestling corrupt?
And how does a homeless man in tattered clothing afford $50 headphones?




What really caused crime rates to plunge, in USA, during the past decade?

In the United States in the early 1990s crime had been rising relentlessly. Other criminologists, political scientists, and similarly learned forecasters laid out a horrible future, as did President Clinton. “We know we’ve got about six years to turn this juvenile crime thing around,” Clinton said, “or our country is going to be living with chaos. And my successors will not be giving speeches about the wonderful opportunities of the global economy; they’ll be trying to keep body and soul together for people on the streets of these cities.” The smart money was plainly on the criminals. And then, instead of going up and up and up, crime began to fall.

The magnitude of the reversal was astounding. The teenage murder rate, instead of rising 100 percent or even 15 percent as warned, fell more than 50 percent within five years. By 2000 the overall murder rate in the United States had dropped to its lowest level in thirty-five years. So had the rate of just about every other sort of crime, from assault to car theft.

According to Levitt’s theory, it was due a case, filed by a teenager, Norma McCorvey, against the Dallas County district. The story was that Ms McCorvey was a poor, uneducated, unskilled, alcoholic, drug-using twenty-one-year-old woman who had already given up two children for adoption and now, in 1970, found herself pregnant again. But in Texas, as in all but a few states at that time, abortion was illegal.
On January 22, 1973, the court ruled in favor of Ms. Roe, allowing legalized abortion throughout the country. Levitt argues that a child born into an adverse family environment is far more likely than other children to become a criminal. Just for the sake of reference, in US, 1.5 millions abortions are carried out every year.


Do real-estate agents have their clients’ best interests at heart?

How any given expert treats you, will depend on how that expert’s incentives are set up. But as incentives go, commissions are tricky. First of all, a 6 percent real-estate commission is typically split between the seller’s agent and the buyer’s. Each agent then kicks back half of her take to the agency, which means that only 1.5 percent of the purchase price goes directly into your agent’s pocket. So on the sale of your $300,000 house, her personal take of the $18,000 commission is $4,500. Still not bad, you say. But what if the house was actually worth more than $300,000? What if, with a little more effort and patience and a few more newspaper ads, she could have sold it for $310,000? After the commission, that puts an additional $9,400 in your pocket. But the agent’s additional share—her personal 1.5 percent of the extra $10,000—is a mere $150. If you earn $9,400 while she earns only $150, maybe your incentives aren’t aligned after all. Especially when she’s the one paying for the ads and doing all the work. Is the agent willing to put out all that extra time, money, and energy for just $150? When she sells her own house, an agent holds out for the best offer; when she sells yours, she pushes you to take the first decent offer that comes along.

Is’nt this interesting, as recently I have been dealing with estate agents and never figured that out.


Consider the folktale of the czar who learned that the most disease ridden province in his empire was also the province with the most doctors. His solution? He promptly ordered all the doctors shot dead. This describes the difference between Causation and Correlation.


Do schoolteachers cheat to meet high-stakes testing standards?

Who cheats? Well, just about anyone, if the stakes are right. You might say to yourself, I don’t cheat, regardless of the stakes. And then you might remember the time you cheated on, say, a board game. Last week. Or the golf ball you nudged out of its bad lie. Or the time you really wanted a bagel in the office break room but couldn’t come up with the dollar you were supposed to drop in the coffee can. And then took the bagel anyway. And told yourself you’d pay double the next time. And didn’t.

W. C. Fields once said: a thing worth having is a thing worth cheating for.

The Chicago Public School system embraced high-stakes testing in 1996. Under the new policy, a school with low reading scores would be placed on probation and face the threat of being shut down, its staff to be dismissed or reassigned. The CPS also did away with what is known as social promotion. In the past, only a dramatically inept or difficult student was held back a grade. Now, in order to be promoted, every student in third, sixth, and eighth grade had to manage a minimum score on the standardized, multiple-choice exam known as the Iowa Test of Basic Skills.

Schoolchildren, of course, have had incentive to cheat for as long as there have been tests. But high-stakes testing has so radically changed the incentives for teachers that they too now have added reason to cheat. With high-stakes testing, a teacher whose students test poorly can be censured or passed over for a raise or promotion. If the entire school does poorly, federal funding can be withheld; if the school is put on probation, the teacher stands to be fired. High-stakes testing also presents teachers with some positive incentives. If her students do well enough, she might find herself praised, promoted, and even richer: the state of California at one point introduced bonuses of $25,000 for teachers who produced big test-score gains.

So what are the ways to produce better scores:

a.) Write the answers on the board.
b.) Give extra time to students to finish the test.
c.) If she obtains a copy of the exam early—that is, illegitimately—she can prepare them for specific questions.
d.) She might even fill in the blanks for them after they’ve left the room
e.) Correct the answers afterwards, before submitting the answer sheets to be read by electronic scanner.

First four are easily to identify, but the last one is little tricky. To know trick, read the book. J

If it strikes you as disgraceful that Chicago schoolteachers and University of Georgia professors will cheat—a teacher, after all, is meant to instill values along with the facts—then the thought of cheating among sumo wrestlers may also be deeply disturbing.

Is sumo wrestling corrupt?

In Japan, sumo is not only the national sport but also a repository of the country’s religious, military, and historical emotion. Indeed, sumo is said to be less about competition than about honor itself. As with the Chicago school tests, the data set under consideration here is surpassingly large: the results from nearly every official sumo match among the top rank of Japanese sumo wrestlers between January 1989 and January 2000, a total of 32,000 bouts fought by 281 different wrestlers.

All the sumo-wrestlers are divided into two categories, makuuchi and juryo, (higher & lower). And its obvious that everyone wants to be in the upeer one, reason being that a wrestler near the top of this elite pyramid may earn millions and is treated like royalty. Any wrestler in the top forty earns at least $170,000 a year and low-ranked wrestlers have to serve their superiors, like preparing meals and cleaning their quarters and even soaping up their hardest to-reach body parts. A wrestler’s ranking is based on his performance in the elite tournaments that are held six times a year. Each wrestler has fifteen bouts per tournament, one per day over fifteen consecutive days. If he finishes the tournament with a winning record (eight victories or better), his ranking will rise. So as to avoid the relegation the top wrestlers make a settlement that as and when required they’ll let other win the fight.

Let’s now consider the following statistic, which represents the hundreds of matches in which a 7–7 wrestler faced an 8–6 wrestler on a tournament’s final day. The left column tallies the probability, based on all past meetings between the two wrestlers fighting that day, that the 7–7 wrestler will win. The right column shows how often the 7–7 wrestler actually did win.

7–7 WRESTLER’S PREDICTED WIN PERCENTAGE AGAINST 8–6 OPPONENT -- 48.7
7–7 WRESTLER’S ACTUAL WIN PERCENTAGE AGAINST 8–6 OPPONENT ---- 79.6

So numbers speak for themselves. No formal disciplinary action has ever been taken against a Japanese sumo wrestler for match rigging. Officials from the Japanese Sumo Association typically dismiss any such charges as fabrications by disgruntled former wrestlers. In fact, the mere utterance of the words “sumo” and “rigged” in the same sentence can cause a national furor. People tend to get defensive when the integrity of their national sport is impugned.

So if sumo wrestlers and schoolteachers are all cheat, are we to assume that mankind is innately and universally corrupt?
And if so, how corrupt? As Levitt says:

Incentives are the cornerstone of modern life.

The conventional wisdom is often wrong. Conventional wisdom is often shoddily formed and devilishly difficult to see through, but it can be done.

There is a tale, “The Ring of Gyges,” which comes from Plato’s Republic. A student named Glaucon offered the story in response to a lesson by Socrates— who, like Adam Smith, argued that people are generally good even without enforcement. Glaucon, disagreed. He told of a shepherd named Gyges who stumbled upon a secret cavern with a corpse inside that wore a ring. When Gyges put on the ring, he found that it made him invisible. With no one able to monitor his behavior, Gyges proceeded to do woeful things—seduce the queen, murder the king, and so on. Glaucon’s story posed a moral question: could any man resist the temptation of evil if he knew his acts could not be witnessed? Glaucon seemed to think the answer was no. But Paul Feldman sides with Socrates and Adam Smith—for he knows that the answer, at least 87 percent of the time, is yes.

Two Paths to Harvard
In the book, Levitt has mentioned about two different boys, one white and one black. The white boy who grew up outside Chicago had smart, solid, encouraging. Loving parents who stressed education and family The black boy from Daytona Beach was abandoned by his mother, was beaten by his father, and had become full-fledged gangster by his teens. So what became of the two boys?
The second child, now twenty-seven years old, is Ronald G. Fryer Jr., the Harward economist studying black underachievement.
The white child also made it to Harvard. But soon after, things went badly for him. His name is Ted Kaczynski. If you don't know him -- http://en.wikipedia.org/wiki/Ted_Kaczynski

There are many more interesting stories, told be Levitt, but I have mentioned the ones which I felt most interesting and will motivate you to read the book.

--Mishra

Tuesday, August 28, 2007

Blue Umbrella


Yesterday I had nothing much to do and was not in the mood to read also, and it has been a while since I watched a decent Hindi movie. So I tried “Blue umbrella”, and I’m glad I wasn’t disappointed. I’m truly amazed by Vishal Bharadwaj. This fellow is so talented that at times I feel a bit jealous towards him. Great Musician, Fantastic Direction and Innovative Scripts, you name it and you get it. Omkara was the first, of his masterpieces which I saw, and I was speechless or I should say I couldn’t stop talking about the movie. Plot, Music, Performances, Direction, dialogues, everything was inch-perfect. Then I watched Maqbool, and almost same experience, except this one was more serious but with added flavor of Irfaan Khan.

To complete the series I decided for Blue umbrella. The title gave me the impression that this one might be similar to “Makdee”, but I was wrong. This one has more emotional touch than “Makdee”. By reviews, I came to know that it is inspired from a novel by Ruskin bond.

I liked the movie because of its simplicity and purity. The Blue Umbrella is a charming story, but it is also a powerful film exploring multiple themes of greed, innocence. It is shot in the amazing surroundings of Himachal Pradesh.

After Maqbool, I was really impressed by Pankaj Kapur and after this one, I admire him. Pankaj Kapur plays Nand Kishore, local village baniya, who steals the umbrella and then gets caught. In fact, Pankaj Kapur is so good in this film, he almost brought tears to my eyes. I will recommend this movie to all, who are fed up with typical Hindi masala movies and like off-beat movies.

--- Mishra

Monday, July 23, 2007

Investment Strategies - II

This blog is in continuation with the previous one posted, so please do read the first one before
starting with this one.

1) What you want is a stock that none is looking at or that is not of favour with big investment funds and is rolling at a lower price.
2) The skills you need to be a good investor are addition, subtraction, multiplication and division and the ability to rapidly calculate percentages and probability. Anything more is a waste.
3) Don't follow the herd. Identify the stocks that the market does not want today, but will be dying tomorrow. But for those who follow the herd usually spend a lot of time scrapping their shoes.
4) There is a great deal of comfort when you invest with the crowd. Everone agrees with you. However when you invest with the crowd,you have to worry about when the crowd will leave the party,because just like in high school none stays popular forever. There usually is not much upside left in a stock after it becomes popular.
5) Look for stocks that are through an unpopular phase because that is where you are going to find the tomorrow's Mr.Popular, selling at a discount price.
6) If you understand the investment process, there would be no need for investment analysts, advisors nor would we need Mutual funds or any of the priests of profession.
7) If you were to invest in 50 different stocks,then your attention and ability to keep track of the business economics of each and everyone would be severly limited. You would end indeed end up with a zoo in which none of the animals got the attention it needed. It is like being a jugglar with two many balls in the air. You don't just drop one,you end up dropping them all.
8) If you are getting more than one brilliant investment idea in a year,you are probably deluding yourself.
9) Concentrate your investments on a few well chosen eggs and then watch them like a Hawk.
10) The best temperament for good investment is to be greedy when others are scared and scared when others are greedy.
11) At times Investors are wildly enthusiastic about a stock and overprice it. At times, people become overly fearful and grossly undervalue a stock. What we do not know is when it will happen, but know just that will happen. Be ready to take advantage of the low prices, that folly and fear bring.
12) People often humanise inanimate objects, be they cars or stocks. When this happens with a stock, emotional thought replaces rational thought, That is a bad thing when it comes to investments. When it is time to sell, you don't want to hesitate because you love the stocks. When the stocks gets down, there is no reason to be mad at it, it does not know that you own it.
13) Greed is a wonderful thing if it is the servant and not the master. You can't get rich without a dose of it and you won't be happy if you have too much of it. Too much of greed leeds to envy and envy is a road paved with inadequacy of never having enough.
14) When you are born, you get a card with 20 Investment ideas and each time you make a mistake,you get a punch. So,you would better make them count.
15) Don't fear the bear markets, embrace them in a bear hug. That way they can't hurt you.
16) Mr.Market appears daily and names a price at which he will either buy your interest or sell you his. The main characteristic of Mr.Market is that he has incurable and emotional problems. At times, he is deprsessed and can see nothing but trouble ahead for both business and world. When maniac, he demands higher prices, when depressed, he will sell or buy cheaply. You should take the advantages of Mr.Market's moods, but should not be influenced by them.

Here are some of the thumb rules suggested by the legends for selecting stocks, which I stumbled upon and want to share with you.
PETER LYNCH :(Earnings growth + Dividend yield )/P.E should be greater than 1.5. Twice is excellent. The expected earnings growth can be based only on what the company says and the analyst's prediction about the companies growth rate.
2) BENJAMIN GRAHAM :The intinsic value of stock =EPS [( 2 * EARNINGS GROWTH) +O.O85]* 4.4 / AAA BOND YIELDHere is an example :Let us assume the outstanding shares as 10 lakhs,Let us assume the earnings as 20 lakhs,Then EPS will be 2Assuming a growth rate of 5% (don't think I am a bear ) and the AAA bond rate as 7.33% ( you can substitute this by even the FD rate )The intrinsic value is :2 ( 2* 0.05 + 0.085 ) * 4.4 / 0.0733 =22.20If the value on a given day is lesser than this value, then the stock price is cheap.

MIKE BERRY :His thumb rule is 2 - 2 - 2.First the stock should be trading at half the market multiples. i.e , Half of the average P.E. of the appropriate index.Second, The companies should be growing their earnings at twice the market rate of growth.Third, the price to book ratio must be less than
2. It should be mentioned that Berry was always interested in value spiced with growth.N.B : These are only thumb rules and not recipes to follow mechanically in arriving at your decisions It will be misleading to consider them as formulaes. This can be the basic criteria for selecting the stocks.


--> Mishra

Thursday, July 12, 2007

Investment Strategies

Yesterday i was just browsing through some random message boards and i came across a really good article, where a group of people had mentioned their opinions about Warren Buffet and his strategies. I have collated whatever i felt useful.

Investment Rules from Warren:

Rule No 1: Never lose money (Never forget rule No 1)
2) It is easier to stay out of trouble than it is to get out of trouble.
3) The market behaves like the God, helps those who help themselves. But unlike the God, the market does not forgive those who don't know what they do.
4) Don't try to jump over seven-foot bars; look around for one-foot bars that can step over.
5) The chains of habit are too light to be felt until they are too heavy to be broken.
6) It is not necessary to do extraordinary things to get extraordinary results.
7) Look at stocks as small pieces of a business.
8) Invest in a business that even a fool can run,because someday a fool will.
9) With investment you make,You should have the courage and the conviction to place at least 10% of your networth in that stock.
10) If a business does well, the stock eventually follows.
11) The reaction of weak management to weak operations is often weak accounting.
12) In a difficult business,no sooner one problem is solved than another surfaces-never is there just one cockroach in the kitchen.
13) You don't have to make money the same way you lost it.
14) With enough insider information and a million dollars,you can go broke in a year.
15) If principles become dated,they are no longer principles.
16) If calculus or algebra were required to be a great investor,I would have to go back to delivering newspapers.
17) It is only when the tide goes out that you learn who has been swimming naked.
18) If you hit a hole in one on every hole,you would not play golf for very long.
19)Never ask a barber if you need a haircut.
20) Forecasts usually tells us more of the forecaster than of the forecasts.
21) There seems to be some perverse human characteristic that likes to make easy things difficult.
22)Diversification is a protection against ignorance.
23) Brokers make money on activity,You make your money on inactivity.
24) You only have to do a few things right in your life so long as you don't do too many things wrong.
25) If you let yourself be undisciplined on the small things,you will probably be undisciplined on the large things as well.
26)When proper temperament joins up with the proper intellectual framework, then you get rational behaviour.
27) The fact that people are full of greed or folly is predictable.The sequence is unpredictable.
28) Be fearful when others are greedy and be greedy only when others are fearful.
29) The most important thing to do when you are in a hole is to stop digging.
30) If at first you do succeed,quit trying.
31) Most people get interested in stocks when everyone else is.The time to get interested is when no one else is. You can't buy what is popular and do well.
32) Risk comes from not knowing what you are doing.
33) If you can't make mistakes,you can't make decisions.
34) Investment must be rational,If you don't understand it,don't do it.
35) In the business world,the rear view mirror is always clearer than the windshield.
36) For some reason people take their cues from price action rather than from values. Price is what you pay. Value is what you get.
37) At the beginning, prices are driven by fundamentals and at some point, speculation drives them. It is the old story: what the wise man does in the beginning the fool does in the end.
38) A pin lies in wait for a bubble and when the two eventually meet,a new wave of investors learn some very old lessons.
39) I never attempt to make money on the stock market. I buy on the assumption that they could close the market the next day and not reopen it for 5 years.
40) What we learn from history is that people don't learn from history.
41) Look at stock market fluctuations as your friend rather than your enemy-profit from folly rather than participate in it.
42) Uncertainty actually is the friend of the buyer of long-term values.
43) No matter how great the talent or effort,some things just take time: You can't produce a baby in a month by getting nine women pregnant.
44) If the past history was all there was to the game, the richest people would be librarians.
45) I would be a bum on the street with a tin cup, if the markets were efficient.

Making profits is obviously the objective of each investor.Possibility of maximising returns increases with better understanding of market forces and what drives them.Information being the only tool available,one can never have enough of it,be it stock and sector specific,or the general market trend.Since Buffetology is all about Long term investment,it is important to understand and differentiate between 'Long Term and Short Term Investment'. Mr.K Vijayan,CEO,JP Morgan,has said in The Economic Times of 10/7/07, and I quote,'----
short-term is not a function of time but of intention, displayed by the reasons you choose to exit an investment. If you exit an investment because you have hit an arbitrary target price (up or down), it is short-term regardless of when it happens. If you exit because the reason for the decision appears to have developed some flaws, or there is need for the money, one would consider it longterm' Yes,indeed,it is nearly impossible particularly for an ordinary investor, to collect relevant and reliable data,about Indian cos. Numbers available are invariably historic,and hide more than they reveal. Shareholders meetings are more a Tamasha, than serious deliberations. Annual reports highlight achievements but lack transparency. Media and analyst's buy/sell recommendations are arbitrary and sometimes biased.

After this, one fellow had given certain checks to be performed, before entering any script:

1. Is the business simple and understandable ?
2. Does the business have a consistent operating history ?
3. Does the business have favourable long term prospects ?
4.Is management rational ?
5.Is management candid with shareholders ?
6.Does the management resist the institutional imperative ?
7.Focus on RONW not EPS.
8.Calculate owner's earnings to get the true reflection of business value.
9.Look for the companies with high profit margins.
10.For every dollar retained, make sure the company has created at least one dollar of market value.
11.What is the value of the business?
12. Can the business be purchased at a significant discount to its value ?
This is the most important conclusion. If you buy a great a company for unrealistic value (overpriced). you are not going to make money.( Don't confuse the terms business value and market value. Both are not same). Example Wipro , it is tough to make money if you buy wipro when it is selling at 400 p/e.

For more info please follow the link:

http://chinese-school.netfirms.com/Warren-Buffett-interview.html

-- Mishra

My Shelfari Bookshelf

Shelfari: Book reviews on your book blog