Helping people with computers... one answer at a time.
Most encryption algorithms are public knowledge. I'll look at what it is about them that keeps people from breaking the encryption.
Encryption requires algorithms, right? When is it decided what algorithm would be followed when I make payments online? Is it when I login or is it predetermined? Is it the same algorithm always or changes every time I login? If some one knows the algorithm being used; Can they break/over-ride the encryption?
The encryption algorithm you might use when connecting to your bank is typically the same each time.
And everyone in the world knows (or could know) what the algorithm is.
Obviously, it's not the algorithm alone that defines how secure your connection is; there's something else just as, if not more, important.
Of necessity, this will be over-simplified. The nitty-gritty details of encryption are the things of research papers and nightmares - not necessarily in that order.
So please forgive me if I wave my hands a few times and gloss over some of the details.
First, we need to clarify just what an algorithm is. In essence, it's a set of instructions for processing information - a recipe if you like.
For example, "add 2 to a number" is an algorithm; not a terribly sophisticated algorithm, but it is one nonetheless. Give it a 7 and the algorithm produces 9. Give it a -1,009,124 and it'll produce -1,009,122.
An encryption algorithm is similar except:
It's way more complex than just adding two to a number
It takes two inputs: the data to be encrypted and an encryption key
For the moment, think of that encryption key as a kind of password. You provide the password when you encrypt, and you must provide the password again in order to decrypt. This is referred to as "symmetric" encryption since you need to use the same password at both ends.
The algorithm must be such that as long as a good password has been used then given the encrypted data without the password you can't easily recover the unencrypted data. This is a function of how good the algorithm is, not whether or not the algorithm is publicly known.
Data encrypted using a good encryption algorithm will be nearly impossible to recover without its password even if you know the algorithm used as long as a sufficiently complex password was used.
Most encryption algorithms are very publicly defined and documented. In many cases, the actual software that implements the algorithms is also open source and/or available for public inspection. The intended result is that more eyes on the problem make for a better solution.
So once you have a good algorithm - publicly known or not - the true security of any encryption is its key, or password.
But when you connect to your bank's https web site there's no password for that https connection. How's that possible?
To answer that we need to look at a different type of key or password.
As I mentioned above, a symmetric keys is one where you use the same key or password to decrypt the data as you did to encrypt it. This is commonly what you might use to encrypt a .ZIP file, access a TrueCrypt volume or similar tools.
Asymmetric keys are, as you can probably guess, different.
To begin with, you use software to create two keys, according to the encryption algorithm you choose. The algorithm itself and the process by which the keys are made is quite public.
The two keys have a special relationship: data that is encrypted with one key can only be decrypted with the other.
That's really worth understanding. Let's say I have a key pair, A and B. If I encrypt something using key A I can only decrypt it with its matching key B - I can't even decrypt it with the key A that I used to encrypt it - only B.
And yes, that's darned-near magical as I look at it, but it's the heart of the algorithms used in public key cryptography. These are incredibly complex algorithms we're talking about.
I did say "public key", because one of the two keys is made public - anyone can see it. The other must be kept secret. It's this secrecy - much like keeping your password a secret - that keeps the encrypted data safe from prying eyes.
by Anonymous on Flickr.
So let's look at your bank.
When you want to connect to your bank via https:
your browser gets the bank's public key. (There's a standard protocol in place to fetch it, and to confirm that it does, indeed, belong to your bank.)
your browser encrypts your data using that public key. Remember this encrypted data can now only be decrypted using the bank's private key.
the encrypted data is sent to your bank over the internet. Anyone watching the data on your connection can see the encrypted data, but they can't decrypt it because they don't have the bank's private key.
the bank decrypts the data, because it holds the secret key.
The data has been transmitted securely. Everyone who cares to can know the algorithm, and perhaps even see the encrypted data, but because they don't know the secret key they simply cannot access the encrypted data.
Comments on this entry are closed.
If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.
If you don't find your answer, head out to http://askleo.com/ask to ask your question.