title: How to decrypt a vigenere columnar transposition cipher
body: <p>I am going through old exams, my final is in a few days. I want to decrypt a ciphertext, it was first encrypted by vigenere and then encrypted by columna transposition. How do I decrypt to get original message?</p>
  
  <pre><code>message -&gt; rgyqhbmnwaazxcajittuzqyagkx
  vigenere key -&gt; final
  columnar transposition key -&gt; exam
  </code></pre>
  
  <p>I have spent hours on this, but am not getting anything out. I first want to decrypt by columnar then Vigenere. I think output should look English, but am just getting junk. My vigenere code is below, I guess the problem is with the columnar, all the codes I have come across take numbers as key, but I have a letter key. </p>
  
  <pre><code>def decrypt(message, password):
      decrypted = ''
      for i in range(0, len(message)):
          letter = ord(message[i]) - ord(password[i%len(password)]) + 65
          if letter &lt; 65:
              letter += 26
          decrypted += chr(letter)
      return decrypted
  </code></pre>
  
  <p>thanks</p>