The Aims of Cryptography

Let's start by examining in principle what a cryptographic system should be able to achieve. Just as it's traditional for the first program in a new programming language to display Hello World at the command prompt, in cryptography it's traditional to start by introducing three people called Alice, Bob, and Eve. Alice and Bob want to talk to each other and Eve wants to find out what they are saying or somehow disrupt their conversation.

click to expand

It might sound simplistic, but between them these three people can serve as a model for just about every situation that can occur on a computing network. In the real world, Alice and Bob are likely to be two companies - or in the days of the Internet, Alice may correspond to a user browsing with Internet Explorer, and Bob to a web site, while Eve is a hacker, or - even more seriously - perhaps a member of some criminal, terrorist, or similar organization (with apologies to all people who are actually genuinely called Eve, who I am sure are very nice really).

The first point to note is that the time of greatest risk is when information is passed over the network (between Alice and Bob). The thing that cryptography is most designed to guard against is data being intercepted when it is in transit, for example as it is passed from node to node on the Internet, with the sender and receiver having no idea who might be in charge of or monitoring those nodes - and for this reason much of cryptography theory is based on this model. However, we can also apply the same principles to data storage on one machine without changing much of the underlying theory - in that case the "sender" is the program that stores the data, while the "receiver" is the program that retrieves the data. There are of course many other aspects to securing your system and your data, including, appropriate firewalls, security policies and keeping the buildings it is housed in physically secure is a separate subject, but we'll focus on cryptography here.

Now there are four classic properties that the communication should satisfy, and which we would be relying on the cryptographic system to achieve: authentication, confidentiality, data integrity, and non-repudiation.

  • Authentication means that Alice should be able to be certain that it really is Bob at the other end of the line she is talking to, and not Eve pretending to be Bob. Similarly, Bob needs to be able to be certain that the person claiming to be Alice really is Alice. On the Internet, the classic example is that you need to know that those credit card details you think you're sending to Amazon.com really are going to Amazon.com, and not to some third party that's spoofed IP addresses in order to make itself look like Amazon.com.

  • Confidentiality means that Eve should not be able to read the message Alice is sending to Bob. Or, in other words, those credit card details you're sending can't be read en route. This particular guarantee is normally quite easy to spot if you're on a web browser - you can tell because the http:// URL has been replaced by an https:// URL, indicating Secure Sockets Layer is at work.

  • Data integrity is similar to confidentiality, but now we're looking at Eve's ability to tamper with the message. Note that this is a separate issue from confidentiality, since there might theoretically be a situation in which Eve was unable to read a message but could replace it with one of her own. We need to guard against that too. The classic example of the issue of data integrity is when downloading some code from a web site. We want to be sure that it was not only written by a trusted person, but has not been "processed" or even replaced en route by (for example) a virus, which can then use the code to embed itself on your system.

  • Non-repudiation - this is an issue is one that is sometimes forgotten when learning about cryptography, but it is nevertheless important. We sometimes need to make sure that once Bob has said something to Alice, the proof that he said what he did is available, and can be examined in a court of law if necessary. In other words, once you've handed your credit card details in good faith for some goods, and received the goods, you can't run off to your bank and tell them you never made the transaction. Non-repudiation is closely related to authentication. If you can prove that a message came from a particular person then that's generally equivalent to having the proof that stops them from denying they sent the message.

Although in this discussion we've been talking about messages, don't think we are focusing exclusively on text messages. As far as we are concerned, any data that's transmitted is a message. If you download a file from a web server, that file constitutes the message that is being sent.

Now we've seen what a cryptographic system must achieve, we'll have a look at how this can be done. We are going to start off by exploring the general principles of cryptography: how messages can be encrypted and decrypted.

The algorithms used in encryption techniques these days are unfortunately (or fortunately, depending on your point of view) based on some fairly complex mathematics, and if we start going into what the algorithms actually are we'll quickly get sidetracked. It's not really the math that's important so much as what the algorithms can in principle achieve. So instead of working through the actual mathematics, what I will do instead is use a very simple encryption algorithm to illustrate the basic principles on which cryptography is based.

There are two types of encryption around: symmetric (shared key) encryption and asymmetric (public key) encryption. Of these, symmetric encryption is by far the easier to understand, so we'll look at that first.



Advanced  .NET Programming
Advanced .NET Programming
ISBN: 1861006292
EAN: 2147483647
Year: 2002
Pages: 124

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net