Welcome To Security.Fx-Vista.Com

Computer Security Information

Home

Cryptography: Split Wide Open

<<< Back

“Although transaction security on the Internet is a hot topic, it’s only part of the colourful story of digital cryptography.”

 

As a kid I was always very excited about opening a new gift pack sent by the Maggi Fun Club. Not because I enjoyed the Fun Comic Series (I didn't), but because there was a prize in each box. And no prize was more sought after than the Secret Detective’s Handbook.

 

It contained a Secret Codebook with which I used to exchange en-coded messages among my friends and always felt elated to do it.

 

Now as a grown up, I am again drawn to secret decoders, but my motive, now, is not limited to send messages. Now I use to safeguard my privacy on the Internet. I also like knowing that the data that has been sent to me hasn't been tampered with.

 

I use it to provide authentication via digital signatures or certificates and for preventing users from repudiating (i.e. rejecting ownership of) their transmitted messages. To do such things it is apparent that I don’t use that Secret Detective’s Handbook but use a more profound modus operandi known as Cryptography.

 

          Most of us think of cryptography (if we actually ever think of it at all) as something used by the military to conceal their operations from the enemy during wartime, or by governments to keep their secrets guarded from other’s eyes. But today this ancient mathematical science has many more areas underneath its hood than anyone can envision.

 

In today's world of Electronic Commerce on the Internet, the need for secure communications is obviously crucial. Cryptographic technologies provide enterprises with the best mechanisms of protecting their information, without putting the business at risk by exposing it on the Net. Cryptography allows you to transmit data securely over the Internet. If you are creating any sort of Web site that will take advantage of e-commerce, you need to assure your customers that their personal information (including credit card information) is being sent to you directly, and isn't being intercepted and used for nefarious purposes.

 

When downloading controls from a Web site, you have no doubt run into a prompt asking if you trust the person(s) responsible for the download. That prompt, known as a Certificate, ensures that the data has been transmitted directly

 

Encryption

          Encryption is the name given to the process of applying an algorithm to a message, which scrambles the data in it – making it very difficult and time consuming, (but not practically impossible), to deduce the original data, given only the encoded data. Inputs to the algorithm typically involve additional secret data called keys, which prevents the message from being decoded – even if the algorithm is publicly known. The output is usually garbled text, which is useless unless you decrypt it.

 

The safekeeping of keys, in other words, their generation, storage and exchange, is of paramount importance to ensure the security of the data. There is no point applying the strongest levels of cryptographic algorithms, if your keys are stored on a scrap of paper in your in-tray. The strength of the encryption is dependent on two basic items: the nature of the mathematical algorithm and the size of the keys involved. The term message is used to refer to any piece of data. This message can consist of ASCII text, a database file, or any data you want to store or transmit securely. Plaintext is used to refer to data that has not been encrypted, while cipher text refers to data that has been.

 

What are keys?

          Keys are additional secret data inputted along with the plain text, which is used in the algorithm to encode data in a pattern specific to the key. One of the vital roots of the strength of the encryption is the size/length of the keys involved, generally expressed in bits. The key is generally a long number produced by multiplying two much larger prime numbers using the algorithm of Factoring.

 

1. Symmetric Cryptography – Secret Keys

In symmetric cryptography, the encryption algorithm requires the same secret key to be used for both encryption and decryption. Because of the type of key, this is sometimes called secret key encryption.

 

The advantage of these algorithms is that they are fast and efficient. However, the problem is that of key exchange - it is, the mechanism for safely ensuring both parties, the sender and the receiver, have the secret key. This is one of the weakest areas of symmetric cryptography. How do you send the key to your partners? You cannot just send it in an email message, because it could be intercepted and, possibly unknowingly, compromise your security. Furthermore, how can you be sure that your partners will keep your key secure?

 

2. Asymmetric Cryptography – Public/Private Keys

One solution to the problem of key security is asymmetric cryptography. This uses two keys that are mathematically related. One key is called the private key and is never revealed, and the other is called the public key and is freely given out to all potential correspondents. The complexity of the relationship between the public key and the private key means that, provided the keys are long enough, it is practically impossible to determine one from the other.

 

The one problem with asymmetric cryptography is that the processing required is very CPU intensive and this can cause potential performance problems when many simultaneous sessions are required.

 

The almost universal public/private key algorithm is named RSA after its creators (Ron Rivest, Adi Shamir, and Len Adleman), and patented by RSA Data Security Inc. in 1977. A sender uses the receiver's public key to encrypt the message. Only the receiver has the related private key to decrypt the message. This is shown here:

 

 

 

So far, we are able to encrypt and decrypt documents. Both of these functions require our ability to distribute public keys and match them to the holder of the private key.

 

If Rahul wants to send Riya some encrypted data, he needs to know her public key.

 

If Riya wants to verify the digital signature on a document as coming from Rahul, she needs to know his public key.

 

Hash – Its not just for Breakfast

Like a breakfast hash of eggs, breadcrumbs, and potatoes, a hash function in computing terms allows you to input data (such as a document and a key or signature) and then moosh that data into something more compact (i.e., a really, really big number), called a digest. In cryptography, a one-way hash is used to determine whether data has changed. This allows you to ensure that someone hasn't maliciously tampered with your control.

 

A one-way function is a mathematical function that is significantly easier to perform in one direction (the forward direction) than in the inverse direction. One might, for example, compute the function in minutes but only be able to compute the inverse in months or years. A trapdoor one-way function is a one-way function where the inverse direction is easy if you know a certain piece of information (the trapdoor), but is difficult otherwise.

 

Public-key cryptosystems are based on (presumed) trapdoor one-way functions. The public key gives information about the particular instance of the function; the private key gives information about the trapdoor. Whoever knows the trapdoor can perform the function easily in both directions, but anyone not knowing the trapdoor can perform the function only in the forward direction. The forward direction is used for encryption and signature verification; the inverse direction is used for decryption and signature generation.

 

Digital Signature

          A digital signature is not much different from the handwritten signatures that are used to authenticate a document. But its much more secure and is not vulnerable to the handwriting-forgers, whose mere mention may fright some men to death.

 

          Digital signatures can be used when you have a message that you plan to distribute in plaintext form, and you want the recipients to be able to verify that the message comes from you and that it hasn't been tampered with since it left your hands. Signing a message does not alter the message, it simply generates a digital signature string you can bundle with the message or transmit separately.

 

Digital signatures are generated using public-key signature algorithms. A private key is used to generate the signature, and the corresponding public key is used to validate the signature. This process is shown in the following illustration:

 

 

A digital signature is hash encrypted with a private signature key. Verifying a digital signature is done by decrypting the signature using the public signature key, and matching the result against a hash of the original document.

 

          The strength of a signature is dependent on the quality of the one-way hash function, and the strength of the encryption of that hash. If the one-way hash function can be subverted, than the original document might be changed. If the encryption isn't sufficiently strong, then the document might have come from someone other than the holder of the private key.

 

          Nowadays digital signatures are intermittently used to sign documents over the net. And you can easily visualize a day when only celebrities will use their hands to sign autographs for their fans.

           

But this raises the question – “How does someone know that an arbitrary public key belongs to someone?” If you received a public key and were told that this was the public key for your bank, would you believe it? One very appropriate answer to this question might be "Who told me?"  The answer to this question lies in Certificates.

 

Certificates

          In essence, they are signed documents, which match public keys to other information, such as a name or e-mail address. Certificates are signed by certificate authorities (CAs), which issue certificates. In essence, a certificate authority is a commonly trusted third-party, who is relied upon to verify the matching of public keys to identity, e-mail name, or other such information (e.g. issuance of credit, access privileges). Certificate authorities are similar to notaries public.

 

The benefit of certificates and CAs is that if two people both trust the same CA, then by exchanging certificates signed by the CA, they can learn each others public keys, and use them to encrypt data and send it to one another or to verify the signatures on document.

 

To verify a certificate, all that is necessary is the public key of the CA (plus a possible check against a revocation list). Certificates and CA's reduce the public-key distribution problem from verifying and trusting one (or more) public keys per individual to verifying and trusting the CA's public key and relying on that to allow verification of others

 

Certificates have a limited life. They are requested, created, and then either are revoked (if compromised) or expire. Expiration is important, as advances in computing power, and the potential for the discovery of holes in algorithms or protocols may make certificates unreliable.

 

Cracking the Code

          As now it’s quite clear that the strength of the encryption predominantly depends on the key, which should be sufficiently large to secure the encryption. For e.g. when a 128-digit number is used as a key, it amounts to an encryption of 425-bits. Now guessing such a large number is impracticable and someone would be really nuts to think of a Brute-Force method (i.e. trying all the possible combinations).

Factoring, which is the underlying, presumably difficult-to-solve problem, is something that’s the crux of several public-key cryptosystems, including RSA. Factoring, in essence, is the act of splitting an integer into a set of factors. For example, the factors of 15 are 3 and 5; the factoring problem is to find 3 and 5 when given 15. That's easy, but what about a really big number such as ‘94,877,863,212,576’? Or how about a 254-digit number? Prime factorisation requires splitting an integer into factors that are prime numbers; every integer has a unique prime factorisation. Multiplying two prime integers together is easy, but as far as we know, factoring the product is much more difficult. Factoring a key or "modulus" would allow an attacker to figure out the private key; thus, anyone who can factor the modulus can decrypt messages and forge signatures. The security of a key, therefore, depends on making factoring difficult.

 

But if a thing is difficult, it doesn’t means that it’s impossible. Factorising a really-really big number is a very CPU intensive task and a 512-bit encryption is sufficient to boggle a Super Computer.  By the way, the standard degree of encryption used by the military forces, now days, is 1024-bit. And as it’s said, cracking it is not theoretically impossible but even with the latest state-of-the-art machines, the time it’ll take would be much beyond our lifetimes.

 

Significant advances in the mathematics of factoring have emerged in recent decades, which make the task somewhat easier. Therefore, factoring researchers still consider the possibility that a quick-and-easy factoring method might be discovered quite likely.

 

Written By: -
Môhit Nanda

Mail me: katty@rediffmail.com

<<< Back

 

Copyright ©2008 www.Security.Fx-Vista.Com | All rights reserved