Just a super basic question - Does the key create the algorithm? I don't understand how the key gives you the algorithm, in other words I am having trouble understanding how the key works in symmetric encryption. My book says:


  "Symmetric encryption transforms plaintext into ciphertext using a secret key and an encryption algorithm"


So what does the secret key do, is it like  a password to give you access to the actual encryption? Also my book says:


  "Plaintext message chosen by cryptanalyst, together with its corresponding ciphertext generated with the secret key"


It says "generated with the secret key", so the key creates the algorithm?
The key does not create the algorithm. 

The algorithm is a fixed, publicly known set of steps. Clearly, a fixed, publicly known set of steps is not capable of encrypting anything.

So we include some secret information into the steps in the form of a key. A key for a symmetric encryption algorithm is a random sequence of bits that is kept secret. The knowledge of this secret random sequence of bits is what enables one to perform the encryption/decryption steps - and what prevents anyone else from doing the same.

For example, the AES algorithm uses the following steps:


Add key
Add constant
Mix Columns
Substitute bytes


The Add key step is the same instruction for everyone who uses the algorithm, but the data that the instruction operates on is different for everyone because of the key.

This may be the source of the confusion. There are two things going on in an encryption algorithm:


The instructions, or steps that are applied
The data, which are the bits of information that the instructions operate upon


The instructions (the algorithm) are fixed and publicly known. The key is data, and it provides the source of secrecy that enables one to compute the encryption/decryption operation. The plaintext and ciphertext are also data, which are operated upon by the instructions in conjunction with the key.