From 6a55783b704379a61ac1e2eaecba03ad714a463a Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Thu, 21 Nov 2013 18:23:38 +0000 Subject: [PATCH] Added files for challenge 5 --- 2013/5a.ciphertext | 1 + 2013/5b.ciphertext | 2 ++ 2013/solutions.txt | 1 + cipher.py | 3 +++ 4 files changed, 7 insertions(+) create mode 100644 2013/5a.ciphertext create mode 100644 2013/5b.ciphertext diff --git a/2013/5a.ciphertext b/2013/5a.ciphertext new file mode 100644 index 0000000..4d91f4b --- /dev/null +++ b/2013/5a.ciphertext @@ -0,0 +1 @@ +BSTWI STHTH ISEWA HIZDH AGASH RTAGP EYIGT EHAYR TITHA IZJOS ZYEIZ REFGP BITSA KEYIS ARIZR EFGPB IAKTO EYEGE DZGAM STWEA YRTAW XZHIR TRYIO EIIST HZYEA IWEAH ITIIE WWHJH ISAIH SEOZI AMAPL JILEP ZYRIS AITAX YZIHJ GEMSA ISABB EYERM SEGER TRHSE OZRTR ISEBA TYITY OOZMT ISSEG AYRTD TIRTR SZMFZ XETIT HYZML AFVTY ISEWZ JKGER TRRAY TEWZG ISEHH ZDDTF EGDZW WZMSE GMSZM AHSER TRSED TYRSE GISEI GATWT HOZTY OFZWR AYRME YEERA YEMTR EATMA HMZYR EGTYO TDISE GEXTO SILEH ZXEIS TYOTY ISEHH AYOWE ISZHE OJPHM EGEYZ ISTYO TDYZI ISZGZ JOSRZ PZJSA KEAFF EHHIZ AYPHH BABEG HDGZX ISAIB AGIZD BAGTH TYISE MAGXA PLEIS EPVYE MMSAI MAHOZ TYOZY TAXSE ARTYO RZMYI ZIAWV IZAWD GERZO EGTSE MAHIS EREAW EGBEG JOOTA HSZME RISEX ZYAWT HAIZL AFVTY XAPLE SEVYZ MHHZX EISTY OALZJ IHAGA HDAXT WPTIH AWZYO HSZIL JIJYW EHHPZ JFZXE JBMTI SHZXE ISTYO DGZXI SEYAQ TMAGG EFZGR TITHA WWMES AKEAY PYEMH ZYISE NGAPS AGGP diff --git a/2013/5b.ciphertext b/2013/5b.ciphertext new file mode 100644 index 0000000..12a3408 --- /dev/null +++ b/2013/5b.ciphertext @@ -0,0 +1,2 @@ +NEWJXVOIYZFLRFJINDFVEQAESOGFEZKMXECCIQCRNPZJTBEOJEPFSXVLNDOWXRTRTZBNLRPLJWS WXUKWOLQBIGJESRWEKBPXMPSRWRNMSEVVEGVMHTXLQCGZJCMKMZGMMPOIESQSYDHVTBPXMPGKEV TWHPFKEVPXMLHKLRVLJQHYEFDIJYRZWPQZJCSUEAFXMLHZAVNPGPQRYTJXYSSJWBHJNNSIZVUMY DZVWFQJYPBESJVLFEVVMFUYWPWRQPCVWJWEKBWXYSSZVVPWYCITXVQRXTQRRAGZJCPVGRTXFTBN LRPLJHWCPAGBYLDGINTFZEVVWRGQJOGRXVUJNPRNMGJQDHCIOGJMXLTKIEPSTYOEHCGVMLDJLRY MQWBFXEGXZCBKSZQVWZKUEAKIQTGFJGGRTFHUYEKRLEVVHNAWTHWKLYWGPXMVWPCTJHWCPAQXGP RZWPQZJCSUYAVMQEVVESVIWYCFRNPHNAZRRGQFJLPFEEFXMPHIEVPFDEVVRZAHTNIDIAVWFCSII NFCYZCKLRAATFZURBVFJLFRGYQWJTBJTREXNZBSYGKJNNOEWGGEQLPFEEFEKFZCXECMSEVVRVVL NYYKLRAANWZJYSHMHPHYIWQYWYSPXBVLJDHRXVQRBTZCFRFMKQWTYYVMSEVVFYCGPZIKFHVQDXO GMFEPJLFRRQVLJXOKGUGWNDHFPRYMQWUZZROIJYCLKUNMLSHKSPJIHVHYIJCCNHWCPUKHJEVZWQ KEWJIEHRTXMPPFEEFWNYHYIPGPQLFNLRTIXSSYEFNMAPRWSEVLJWOJXSGARZBKLFKJFYMKLVPKM LDGIAUXTXSZHBPSYHOEXBWVXECICSQVLZHKIARIWSOGWBPIILMZAVNPWPHLVACRICSKVVGZJTHZ +JAQXFYRPSHCVJCSRHVPKYSWJXUGRBTGYQRNYHVGRVNJ diff --git a/2013/solutions.txt b/2013/solutions.txt index 434832b..0ad88be 100644 --- a/2013/solutions.txt +++ b/2013/solutions.txt @@ -8,4 +8,5 @@ 3b: keyword_decipher(c3b, 'louvigny', 2) 4a: keyword_decipher(c4a, 'montal', 2) 4b: keyword_decipher(c4b, 'salvation', 2) +5a: keyword_decipher(c5a, 'alfredo', 2) diff --git a/cipher.py b/cipher.py index 0e22a2a..3251edd 100644 --- a/cipher.py +++ b/cipher.py @@ -496,6 +496,9 @@ def column_transposition_worker(message, keyword, transposed_columns = untranspose(columns, transpositions) return combine_every_nth(transposed_columns) +def vigenere_encipher(message, keyword): + + def caesar_break(message, -- 2.34.1