One of the components of both SSL and SSH that I kept meeting is the encryption of the data.
Quite apart from SSL and SSH, encryption of data is becoming increasingly important in many areas of both data storage and data transmission.
So this webpage is a look at encryption.
So far I have come across two basic kinds of encryption -
Encryption based on character substitution using a look-up table is as old as the hills, and doesn`t even need a computer - as long as the sender and the receiver have the same look-up table, they can exchange messages. However if you add an evesdropper with a bit of processing power, the security is low.
Key based encryption is a whole different ball game - computer processing power is required to perform the mathematical manipulation of both the encryption and the un-encryption of the data. A lot of processing power is required for an evesdropper to extract the data - there is no such thing as an encryption method that cannot be cracked - all you can do is to design an encryption method that requires so much processing power to crack it, it is impractical for the average evesdropper to assemble enough processing power.
Unless they happen to work for an organisation like a government or a university, with a handy number crunching cluster ........
First off, a key is just a number - usually a large number. Back in the days of Windows NT and Windows 2000, 40 bit numbers were used. As commonly available processing power has increased, 128 bit numbers are now regarded as the minimum that should be used, however they are crackable. 256 bit numbers are quite a bit harder to crack, and 1024 bit numbers are very much harder to crack, but under threat of being cracked all the same.
Secondly, an algorithm is the technical term for the mathematical manipulation that the raw data undergoes in order to encrypt it.
As I described in the page about SSL, there are two main kinds of key based encryption systems -
Symmetric key encryption can be subdivided into two types -
Some of the more common block cipher algorithms include -
There are fewer stream ciphers, and they include -
Some of the encryption algorithms designed around public / private key encryption include -
An additional advantage of SRP is that is does not require the existence of certificates and a PKI, most other private / public key algorithms require these
There are several more algorithms for public / private key encryption or signatures, but they are getting somewhat obscure.
Apart from symmetric key encryption and public / private key encryption, there is a third way to use keys for encryption, that doesn`t require any kind of key exchange.
It is known as three-pass protocol - each party has their own pair of keys, which they keep to themselves. The basic process is -
So the message is always encrypted, and neither party needs to know the keys of the other party.
At least two different algorithms exist for the encryption process.
The three-pass protocol only does encryption, if authentication is required, this would have to set up on top of the three-pass protocol.
It would appear to have two weaknesses - the first is that the same keys are being repeatedly used, which is a known weakness of encryption - both parties would have to be responsible for generating new key pairs at regular intervals. This could be done at any time without telling the other party, but not within any particular message set.
The other weakness is that this system is vulnerable to a man-in-the-middle attack, where a rogue receiver replaces the intended receiver - the sender would not know this had happened.
There is an increasing amount of pressure on both individuals and organisations to protect data. One of the ways that is continually being recommended is to encrypt the data. However the disadvantages and problems of encrypting data in files are rarely mentioned. I haven`t gone into this in great detail, but what follows are some of the issues that people should be aware of, before starting to encrypt files. I have based it around MS Windows, as that is the operating system most likely to be found in organisations.
Vista introduced an additional completely different type of encryption from EFS - it is called BitLocker - and it can encrypt the whole hard drive on a per volume basis, so it makes stolen laptops a lot more resistent to unauthorised access. It is a completely different subject, and I haven`t gone into at all in this web page.
However BitLocker in Windows 7 can be used to encrypt USB memory sticks and external hard drives, even if they are using FAT32.
When I started to look at file encryption and MS Windows, I had no idea that I would find so many tripwires. In their efforts to make encryption transparent to users, Microsoft seem to have built an overly complicated system - is it really neccessary to use a combination of both public / private key encryption AND symmetric key encryption just to encrypt some files on the hard drive ?
Do you really need more than a password/pass-phrase driven private symmetric key encryption system, which uses a standard well-proven symmetric key algorithm ?
Perhaps there would be advantages in not using the encryption system built into MS Windows, but instead to use some kind of third party application software to do the encryption. The users would have to be more interactive with the encryption mechanism, but it would remove most of the tripwires associated with the MS Windows encryption system. It would also make copying and moving encrypted files between different hardware much simpler, and may possibly allow for the same encrypted files to be used on different operating systems - ie, moving and using encrypted files on MS Windows, MAC`s, Linux, etc - instead of being restricted to MS Windows.
It appears that for an organisation, or an individual, to start using file encryption, a lot of research is required, to find out how encryption is going to fit into their IT environment. Setting up a file encryption environment is not trivial, it is going to change things, it adds a whole new layer of technology which can go wrong, and I`ll guarantee it will increase support calls.
Just how do you tell someone that all their work for the last 5 years is safely stored away - but completely inaccessible because their key is corrupted ?
One of the aspects of encryption systems that may get overlooked is the importance of key management - whether an organisation is using symmetric key encryption or public / private key encryption, the security gained through the use of encryption is only as good as the security of the keys used.
Like many aspects of IT, there is probably a bigger risk of encryption being cracked by keys being obtained through poor key security within the organisation, rather than through communications being evesdropped in the outside world.
After doing these pages on SSL, SSH, and encryption, one of the thoughts I am left with is that internet security is just an illusion.
We have mathematicians, software writers, and hardware designers all designing encryption systems that use larger and larger key lengths, and more and more robust algorithms, to produce encryption systems that can take 10 years to crack.
Yet we build the whole system on the assumption that the server we are talking to is the server we actually want to talk to.
We base this assumption on a certificate that is in our browser.
The certificate is in our browser either because the browser creator put it there, or we tried to connect to a server that our browser didn`t know about - and the server put it there. All we had to do was just tick a box that allows the server to install the certificate.
Or maybe a completely innocent looking website offering downloads put it there, and we ticked the box without really having any understanding of what was happening.
Once that certificate is in the browser, any server that relates to that certificate is regarded as safe. No matter how unsafe the purpose of the server.
Now at this point it could be argued that the internet is quite safe, because the Public Key Infrastructure is there as a mechanism to ensure that everybody is who they say they are.
However there are snags with the PKI.
The first is that the PKI is a big money making machine - a lot of companies are making a lot of money selling certificates and providing a trust tree - so there is a strong vested interest in perpetuating the idea that the PKI is making the internet safe.
The second is that the PKI only has an involvement in certificates that are bought through Certificate Authorities that are part of the PKI - the PKI doesn`t have an involvement in certificates that come from elsewhere - so the PKI itself can confirm that some certificates relate to who they say relate to - it can`t provide information on the others. How to deal with these is left to the browser and ultimately the user.
Finally, it is quite easy to acquire a legitimate certificate with little more than a domain name and an e-mail address, at low cost. Certificate Authorities are companies that want to make money by selling certificates - and some of them don`t ask too many questions.
So I don`t think that the PKI provides the assurances that it should.