I'm attempting to make the Caesar cipher slightly more secure by first attaining the ciphertext and then running the ciphertext through the cipher to give a second ciphertext. Not entirely sure how to do this, would this be a loop of the algorithm. Could I just multiply the key*2?
You can encrypt the ciphertext again with the second key, but the property of a Caesar cipher is that each character is encrypted on its own. You have no relation with other characters of the message. That is why you can repeatedly encrypt some plaintext with multiple keys, but this won't give you additional security, because all those keys can be compressed to a single key which does the same as the cascade in a single invocation.
Let's see an example. Let the message be "hi", the keys be 5, 2, 20 and the alphabet of size 26. This gives us the following intermediate and final ciphertexts:
c1: "mn"
c2: "op"
cf: "ij"
Which is of course the same as an encryption with the key 1
. Since our alphabet has the length 26, then the final key can be computed as (5 + 2 + 20) % 26
.
You could implement a Vigenère cipher which is a much more secure classical cipher. It still has nowhere near the same security as modern block cipher like AES.