Computing Encryption & Decryption Unit
Index
A computer science term for position
Loop
A sequence of instruction s that is continually repeated until a certain condition is reached
Who was the main leader that decrypted the WW2 Caesar Cipher?
Alan Turing
Shifted alphabet
An alphabet shifted by a certain number
Cipher text
Ciphertext is encrypted text
Decryption
Decrytpion is converting informatiomn into plainTExt
Encirption
Encryption converts information into what is known as Ciphertext.
Caesar Cipher
It is a type of substitution cipher in which each letter in the plaintext is 'shifted' a certain number of places down the alphabet.
Concatenation
It means to link or join words/ numbers together
Strings
Letters, combinations of letters, symbols and even numbers in a code
Can you identify what key has been used? You don't need to crack the whole code! Just find the Key: rozzrksoyysallkzygzutgzallkzkgzotmnkxiaxjygtjcnkegrutmigskgyvojkxcnuygzjucthkyojknkxgtjlxomnzktkjsoyysallkzgcge
Little miss muffet sat on a tuffet eating her curds and whey along came a spider who sat down beside her and frightened miss muffet away
Plain text
Pictures, Video, Audio as well as Text
What can be described as plain Text?
Pictures, Video, Audio as well as Text can all be described as Plaintext.
What was the Caesar Cipher used for in WW2?
The Germans used the Caesar Cipher to pass messages to each other so the British took their Enigma Machine to break their codes
Vignere Cipher
The Vigenere cipher is a plain-text form of encoding that uses alphabetical substitution to encode text.
True Alphabet
The normal alphabet used in the English language
Decrypt
To convert cipher text into plain text
Encrypt
To convert plain text into cipher text
What do we surround strings?
We surround strings with inverted speech marks
How do you allow the user to enter a sentence to be encrypted?
alphabet = key = 3 newMessage = ' ' message = input('Please enter a message') for character in message: position = alphabet.find(character) newPosition = (position + key) % 26 newCharacter = alphabet[newPosition] #print ('The new chracter is:', newCharacter) newMessage += newCharacter print('Your new message is', newMessage)
The code for an encrypted code
trueAlphabet = 'abcdefghijklmnopqrstuvwxyz' shiftedAlphabet = 'defghijklmnoqprstuvwxyzabc' plainText = 'hello' cipherText = '' for letter in trueAlphabet: print(letter) For letter in plainText: position = trueAlphabet.index(letter) shiftedLetter = shiftedAlphabet[position] cipherText = cipherText + shiftedLetter print(cipherText)