External Exam Download Resources Web Applications Games Recycle Bin

Gronsfeld

gronsfeld.py

#Gronsfeld encryption uses the Vigenere method,
#the difference being that the key is DIRECTLY NUMERIC,
#no need to calculate the rank of the letters of the key in the alphabet:

plain_text = "gronsfeld"
key = 1234
wrapped_key = 123412341 #same length as plain_text

# ... can you implement this yourself?
# start by shifting the first letter 'g' 1 place >> 'h'
# then shifting the next letter 'r' 2 places >> 't'
# then shifting the third letter 'o' 3 places >> 'r'
# etc... so that you end up with this:

ciphered_text = "htrrthhpe"