From: Neil Smith Date: Thu, 7 Nov 2013 17:13:26 +0000 (+0000) Subject: Done challenge 3, added list of solutions X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=e6332a16567643e66c2a491b94994f9482384d34;p=cipher-tools.git Done challenge 3, added list of solutions --- diff --git a/2013/3a.ciphertext b/2013/3a.ciphertext new file mode 100644 index 0000000..628c9b0 --- /dev/null +++ b/2013/3a.ciphertext @@ -0,0 +1 @@ +LODDA RLSKS KKRDS CRNAQ AQKIB NAXSF QUSBY RQKMS RLRLQ INNOJ AMOKQ BIYEL RIESF QIYDR QCLEY AKOLQ OJOCL QBIRL SBEUY CLKLI MQJYB JQDYN RDOFS INQRV YRRLQ AUOBO EQJRI CORCL OKCDO PSBEI XFODB SKLXD IURLQ VOCGI XRLQP OSBRS BEOBJ XIYBJ LSELC IBCQB RDORS IBKIX NQOJR LQAJS JBIRQ TPQCR RLSKO BJMQO DQRDA SBERI EQRPQ DUSKK SIBRI TDOAL QDVYR RLQCY DORID SKBIR GQQBX IDLQD RIVQU IFQJO EOSBO XRQDR LQAQO DKIXR DOFQN JYDSB ERLQM ODIYD OEQBR KODQR DASBE RIRDO CGLQD UIFQU QBRKJ YDSBE RLORR SUQRI KQQML QBKLQ USELR LOFQV QQBVD IYELR RIUIB RUODR DQKLQ NQXRP ODSKI BRLQR MQBRA QSELR LIXOY EYKRZ YKRVQ XIDQR LQIYR VDQOG IXMOD OBJRD OFQNN QJSBO CIBFI AIXRL SDRAK QFQBR DYCGK RIOPN OCQCO NNQJC LOUVI DJSMS NNNQR AIYGB IMSXS LQODO BAUID QOVIY RLQDR DOFQN KOKXI DKODO LMQXI YBJIY RONSR RNQUI DQOVI YRLQD XOUSN AIBQI XRLQV YCLQB MONJB QSELV IYDKU QBRSI BQJOC IBBQC RSIBM SRLSR ONAML SCLSK KYEEQ KRSFQ ESFQB RLQPQ DYEES OKRID ARLIY ELQTO CRNAM LORRL QCIBB QCRSI BUSEL RVQSO UBIRK YDQUI DQMLQ BSLOF QRSUQ PLSN diff --git a/2013/3b.ciphertext b/2013/3b.ciphertext new file mode 100644 index 0000000..a68290d --- /dev/null +++ b/2013/3b.ciphertext @@ -0,0 +1 @@ +SYIEZ LKKZR IVPYI MPQVZ FSLML CKILV WMPFU BIVSZ PYHLZ EPMLE VULER LMOQP PYIHK FGIMM FKYIC HIVDI ITHCL ZEPFV LEZIC PYLPP YIGFK NIKZI MSFQC VOIJQ ZUBCW VIPIU PIVZG SIQMI VPYID MYISL MHLZE PIVFE LHFHC LKOFL KVKLP YIKPY LELMP KIPUY IVULE RLMLE VPYIH ZNDIE PMQMI VOWPY IDLMP IKSIK IRIKW VZGGI KIEPG KFDPY IFEIM SIQMI PFVLW EFSPY IWOKZ ENDIP YIHZN DIEPM ZLMBG FKMFG PUYLC BWOCF FVKIV MLENQ ZEILE VDQMP LKVWI CCFSF UYKIM GKFDP YIMFZ CMFGZ PLCWZ DZTPY IDSZP YCZEM IIVFZ COFZC IVLEV LNIVZ ELBIP PCIHK FHIKC WHKIH LKIVP YIMIH LZEPM LKIZE VZMPZ ENQZM YLOCI GKFDP YIFEI MQMIV FEPYI FKZNZ ELCLE VPYIU FHWZM DFKIC ZBICW PFOIO IPKLW IVOWL ULKIC IMMOK QMYMP KFBIF KLDZM HCLUI VYZNY CZNYP PYIHK FGIMM FKMII MJQZU BCWSY IEDWP ZKIVI WIMYL RIDZM MIVLP FEILE VZYLR IDLVI IEFQN YVICZ OIKLP IDZMP LBIMP FUFER ZEUIP YIDPF DFRID WMPQV ZFPFP YILPP ZUSYI KIPYI CZNYP ZMOIP PIKGK FDPYI KIZYL RILRZ ISFGP YIUZP WLEVL KIDZE VIKFG GKIIV FDPYI WMPZC CZEMZ MPPYL PZMCI IHYIK IZEPY IUICC LKOQP PYLPN ZRIMD ILEFP YIKGK IIVFD PYIGC ZUBIK ZENUL EVCIM ULMPV IIHMY LVFSM SYZUY YZVID WFPYI KSFKB ZGZUL EEFPO IGKII HIKYL HMMYI ULE diff --git a/2013/solutions.txt b/2013/solutions.txt new file mode 100644 index 0000000..851fd43 --- /dev/null +++ b/2013/solutions.txt @@ -0,0 +1,6 @@ +1a: caesar_decipher(c1a, 8) +1b: caesar_decipher(c1b, 14) +2a: affine_decipher(c2a, 3, 3, True) +2b: caesar_decipher(c2b, 6) +3a: affine_decipher(c3a, 7, 8, True) +3b: keyword_decipher(c3b, 'louvigny', 2) diff --git a/cipher.py b/cipher.py index f271120..bc173a7 100644 --- a/cipher.py +++ b/cipher.py @@ -516,7 +516,9 @@ def keyword_break_mp(message, helper_args = [(message, word, wrap, metric, target_counts, message_frequency_scaling) for word in wordlist for wrap in range(3)] - breaks = pool.starmap(keyword_break_one, helper_args, chunksize) # Gotcha: the helper function here needs to be defined at the top level (limitation of Pool.starmap) + # Gotcha: the helper function here needs to be defined at the top level + # (limitation of Pool.starmap) + breaks = pool.starmap(keyword_break_one, helper_args, chunksize) return min(breaks, key=lambda k: k[1]) def keyword_break_one(message, keyword, wrap_alphabet, metric, target_counts,