Uses of Cryptography

The crux of what you’ve learned so far is that cryptography is the art of writing or storing information in such a way that it’s revealed only to those who need to see it and hides it from all others. Long before the information age, cryptography was used only to ensure secrecy of information. Encryption was used to ensure confidentiality in communications by spies, military leaders and diplomats. The Egyptian hieroglyphs, the scytale transposition cipher used by the Spartans of Greece, waxed seals and different physical devices to assist with ciphers were used throughout history right up to modern times. These devices underwent further changes when computers and electronics came into the picture, immensely helping in cryptanalysis.


Let’s now discuss the expanded role and usefulness of Cryptography in modern times

The crux of what you’ve learned so far is that cryptography is the art of writing or storing information in such a way that it’s revealed only to those who need to see it and hides it from all others.

Long before the information age, cryptography was used only to ensure secrecy of information. Encryption was used to ensure confidentiality in communications by spies, military leaders and diplomats. The Egyptian hieroglyphs, the scytale transposition cipher used by the Spartans of Greece, waxed seals and different physical devices to assist with ciphers were used throughout history right up to modern times. These devices underwent further changes when computers and electronics came into the picture, immensely helping in cryptanalysis. Cryptography has become more mathematical now and also finds applications in day-to-day security. It helps you safely transfer or withdraw money electronically and you’d be hard-pressed to come across an individual without a credit or debit card. The public-key encryption system introduced the concept of digital signatures and electronic credentials. Cryptography has a definitive existence in our lives today and the whole system will crumble in its absence. Let’s now discuss the varied uses of cryptography in modern times and its intersection with computer science.

Secrecy in transmission

The major goal of cryptography is to prevent data from being read by any third party. Most transmission systems use a private-key cryptosystem. This system uses a secret key to encrypt and decrypt data which is shared between the sender and receiver. The private keys are distributed and destroyed periodically. One must secure the key from unauthorized access, because any party that has the key can decrypt the encrypted information.

How an encrypted transmission can be intercepted

Alternately a key-generating-key, called a master key, can be used to electronically generate a one-time session-key for every transaction. The secrecy of the master-key should be maintained by all parties privy to the information. The disadvantage of this method is there’s too much hope riding on the master-key, which if cracked, collapses the entire system.


A better method is to use a public-key cryptosystem. In this system, data can be encrypted by anyone with the public-key, but it can be decrypted only by using the private-key, and data that is signed with the private key can be verified only with the public key. With the development of publickey systems, secrecy can be maintained without having to keep track of a large number of keys or sharing a common master-key. If, say, Alex wants to communicate with Neil, she first generates her public/private key pair and sends the public key to Neil over a non-secure channel. Neil  to encrypt information and sends it back to Alex. Only Alex has the private key with which she can decrypt the information. Anyone who intercepts the public key or the encrypted data can’t decrypt the message due to the protocols followed during information transfer.

Secrecy in storage

Storage encryption refers to the application of cryptographic techniques on data, both during transit and while on storage media. Storage encryption is gaining popularity among enterprises that use storage area networks (SANs). Secrecy in storage is maintained by storing data in encrypted form. The user has to provide the key to the computer only at the beginning of a session to access the data and it then takes care of encryption and decryption throughout the course of normal use. Hardware devices can also be used for PCs to automatically encrypt all information stored on disk. When the computer is turned on, the user must supply a key to the encryption hardware. The information is plain gibberish without its key thus preventing misuse if the disk is stolen.

Multiple ciphers can be used for individual files and folders. The ciphers and keys should be changed frequently to ensure security of data. However, if the user forgets a key, all of the information encrypted with it makes no sense and is rendered useless. This is why backups of encrypted information are advised to be stored in plaintext. The data is only encrypted while in storage, not when in use. This leaves a loophole for the attackers. The system is vulnerable to a security breach if the encryption and decryption are done in software, or if the key is stored somewhere in the system.

Integrity in transmission

We can use cryptography to provide a means to ensure that data is not altered during transmission, i.e. its integrity is preserved. In electronic funds transfer, it is very important that integrity be maintained. A bank can lose millions if a transaction is illicitly intercepted. Cryptographic techniques are employed to prevent accidental or intentional modification of data during transmission, leading to erroneous actions. One of the ways to ensure integrity is to perform a checksum on the information being transmitted and to transmit the checksum in an encrypted form as well.

The information is received on the other end and again checksummed. The transmitted checksum is decrypted and compared with the previous checksum. If the checksums agree, the information is most likely unaltered. The problem with this scheme is that the checksum of the original message can be known and another message with the same checksum can be generated and sent instead of the original one. This problem can be overcome by using a public-key cryptosystem. After generating the public-key/private-key pair, if we throw away the private-key and use only the public-key to encrypt the checksum, the checksum becomes impossible to decrypt. In order to verify the checksum, we generate a new checksum for the received information, encrypt it using the public-key and match it with the encrypted checksum. This is also known as a one-way function as it is hard to invert.

Integrity in storage

Integrity in storage had been ensured by access control systems with lock and keys and other guards to prevent unauthorized access to stored data. The existence of computer viruses has changed the scenario and the need of integrity against intentional attack has become a problem of epic proportions. Cryptographic checksums to ascertain validity of stored data are of help here. As in the case of transmission, a cryptographic checksum is produced and compared to the expected value. However, storage media are more vulnerable to attacks than transmission channels due to longer exposure and larger volumes of information.

Authentication of identity

Authentication is the process of verifying if the user has enough authority for data access. Simple passwords are used to identify someone. You must also have seen in classic gangster movies, the exchange of keywords to prove identity. Cryptography is similar to the practice of providing passwords for identity authentication. Modern systems use cryptographic transforms in conjunction with other characteristics of individuals to provide more reliable and efficient authentication of identity. Many systems allow passwords to be stored in an encrypted form, with read access available to all programs which may use them. Since passwords are not stored as plaintext, an accidental of data doesn’t compromise the system’s security.Passwords are analogous to the key in a cryptosystem that allows encryption and decryption of anything the password has access to. The principal element of this system is the password selection process. And that’s a whole other subject that we can’t cover here. But in a nutshell, the longer the password, the more random it will be and the harder it is to guess. So if you think it’s easy for you to remember, you should know that it will be all the easier to crack.

Credentialing systems

A credential is a proof of qualification or competence that is attached to a person to indicate suitability for something. Suppose you go to a bank for a loan, they check your credentials before approving the loan. Your credenctials are checked not only from the paperwork, but also from your past record and your references. Your driver’s license and passport are forms of credentials. Progress in the field of implementing electronic credentials has been rather slow. Electronic credentials allow electronic verification of the credence of a claim. It’s not a standalone system, but is being used in conjunction with other devices such as smart cards which perform cryptographic functions and store secret information. CIBIL (Credit Information Bureau (India) Limited) is India’s first credit information bureau. It shares credit information with banks, financial institutions and credit card companies and generates Credit Information Reports.

Digital signatures

A digital signature is a mechanism by which a message is authenticated i.e. proving that a message is coming from a given sender, much like a signature on a paper document. To be as effective as a signature on paper, digital signatures must be hard to forge and accepted in a court of law as binding upon all parties to the transaction. The need for digital signatures arises when the parties dealing in a transaction are not physically close, and the volume of paperwork is high, in other words big business dealings. Digital signatures can be created using a public key cryptosystem and hashing process.

Hashing in action

Hashing produces a message digest that is a small and unique representation of the original message. Hashing is a one-way algorithm, i.e. the message can’t be derived from the digest. Let’s say that Alex is sending a message to Neil. Alex first hashes the message to produce a digest, and then encrypts the digest with her private-key to create her personal signature; the public-key and hash algorithm are appended to it. The whole message including the digest is then encrypted using a one-time symmetric-key which is known only to Alex and Neil. Neil decrypts the message using the symmetric-key. He then decrypts the message digest using the public-key. He would then hash the original message using the same hash algorithm (whose name was appended in the message) with which it was previously hashed. If the evaluated digest and decrypted digest match, then the signature has been verified and the recipient would be sure that the message integrity has been preserved.

Another aspect of this system is the non-repudiation of digital signatures. Since the private-key is only privy to the sender, he can’t deny signing the message. Also, a digital signature can be verified by anyone using the sender’s public-key which is usually included in the digital signature format.

Electronic money

Electronic information has replaced cash for financial transactions between individuals for quite a long time now. Such a system uses cryptography to keep the assets of individuals in electronic form. Electronic funds transfer (EFT), digital gold currency, virtual currency and direct deposit are all examples of electronic money. Electronic funds transfer (EFT) is the electronic exchange of money between two accounts through computer-based systems. This includes online payments, debit card payments, ATM withdrawals, direct deposits, wire transfers and the like. Another application of electronic money is in e-commerce, and businesses such as PayPal mediate the transfer. Clearly any attack on such a system would allow wipe out national economies in the blink of an eye. The significance of integrity in such a system is staggering.

The key property of cash is anonymity: when you take money out of the bank, the bank gives you the cash without knowing what you do with that money. The merchant doesn’t know who you are or ask for your credentials when you pay in cash. On the other hand, when you buy something with a credit card, you have to tell the merchant who you are, and you have to tell the credit card company who you’re purchasing from. Anonymity is not maintained thus failing to protect your privacy. Concerns that anonymity in e-money could encourage tax evasion and money laundering led to demands by various institutions for digital cash to be traceable. This called for an elaborate method of encryption so that the information wouldn’t get into the wrong hands.


The man behind it all is Dr. David Chaum. He formulated the blinded signature, a special form of a cryptographic signature that allowed a virtual coin to be signed without the signer seeing the actual coin, and permitted a form of digital money that offered anonymity and untraceability. This form of currency is known as Digital Cash.

Threshold cryptosystem

Threshold systems are designed to allow use only if a minimum number of parties, exceeding a threshold, agree to the said use. Technically, it means that in order to decrypt a ciphertext a minimum number of parties are required to collaborate in the process. Any less than that won’t have sufficient information. For example, if in a bank at least 5 out of 10 people authorize the transaction, only then will it occur. Such systems obviate a single individual acting alone, while at the same time allowing many of the parties to be absent without the transaction being halted. Most threshold cryptosystems have keys which are distributed into parts. The most common technique for partitioning a key is to form the key as the solution to equations in N variables. Only if all the N equations are known, the key can be determined by solving them. If any less than N equations are known, the key can’t be determined since there’s at least one independent variable in each equation. The minimum required threshold number can be chosen for N and the equations can be held by separate individuals. The same general concept can be used to form arbitrary combinations of key requirements by forming ORs and ANDs of encryptions using different sets of keys for different combinations of key holders. The major difficulties with such a system lie in the key distribution problem and the large number of keys necessary to achieve arbitrary key holder combinations.

Such systems are mostly employed in organizations with very valuable secrets, such as militaries and the governments. One of the applications is to store the secret information in multiple locations to prevent access to the ciphertext itself and thus prevent cryptanalysis on it.

Secure multi-party computation

Secure multi-party computation involves a set of parties with private inputs who wish to jointly compute a function of their inputs so that certain security properties (such as privacy and correctness) are preserved. It provides solutions to various real-life problems such as private auctions, distributed voting, sharing of signature or decryption functions, and situations that require private information retrieval. One popular application of secure MPC (multi-party computation) is solving the Yao’s millionaire problem, i.e. two millionaires want to know which one of them is richer but without revealing their net worth to the other. The millionaires’ problem is a secure two-party computation problem.

It has been generalized for multi-party computations. In a secure MPC, if no party can learn more from the public function and its result then what can it learn from its own input. For a better understanding of the concept, visit: http://dgit.in/Qe37wP


This concept is of great value in the field of cryptography. It has been proved that the multi-party computation problem can be solved if there exist unconditionally secure authenticated channels between pairs of participants. Consider four individuals Alice, Bob, Carol and Dave who want to calculate their average salary without revealing their salary to others.


One way to calculate the salary is as follows:

1 Alice adds a secret random number to her salary, encrypts the result with Bob’s public key and sends it to Bob.

2 Bob decrypts Alice’s result with his private key. He adds his salary to Alice’s message, encrypts the result with Carol’s public key and sends it to Carol.

3 Carol decrypts Bob’s result with her private key. She adds her salary to Bob’s message, encrypts the result with Dave’s public key and sends it to Dave.

4 Dave decrypts Carol’s result with his private key. He adds his salary to Carol’s message, encrypts the result with Alice’s public key and sends it to Alice.

5 Alice decrypts Dave’s result with her private key. She subtracts the random number from Step 1 to recover the sum of everyone’s salaries.

6 Alice divides the result by the number of people (four, in this case) and announces the result.


This way no one knew anybody else’s salary and the function to calculate average salary was successfully computed. More such examples can be seen at http://dgit.in/V06ZU8.

The aforementioned applications of cryptography help us understand that its use transcends almost all aspects of human dealings. Cryptography ensures security and integrity of information and prevents misuse of data by unauthorized persons. It also makes our lives convenient by providing such instruments as electronic cash and digital signatures. It was used by early man to pass on secret messages to one another, and has evolved continuously to serve our ever increasing demands.


DMCA.com Protection Status