From: Neil Smith Date: Sat, 5 Dec 2020 09:25:10 +0000 (+0000) Subject: Done challenge 6 X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=31de8482cc0ad3d8a1f4813cf78f9ac6e2c1ffe8;p=cipher-challenge.git Done challenge 6 --- diff --git a/2020/2020-challenge5.ipynb b/2020/2020-challenge5.ipynb index 363693c..fbedeb9 100644 --- a/2020/2020-challenge5.ipynb +++ b/2020/2020-challenge5.ipynb @@ -339,6 +339,29 @@ "[pbs[i+1] for i, w in enumerate(pbs) if w == 'stop']" ] }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'ttargetrdfk'" + ] + }, + "execution_count": 106, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pbs = pb.split()\n", + "cat(pbs[i+1][0] for i, w in enumerate(pbs) if w == 'stop')" + ] + }, { "cell_type": "code", "execution_count": 90, diff --git a/2020/2020-challenge5.md b/2020/2020-challenge5.md index 4f3b7ea..63d6351 100644 --- a/2020/2020-challenge5.md +++ b/2020/2020-challenge5.md @@ -109,6 +109,11 @@ pbs = pb.split() [pbs[i+1] for i, w in enumerate(pbs) if w == 'stop'] ``` +```python Collapsed="false" +pbs = pb.split() +cat(pbs[i+1][0] for i, w in enumerate(pbs) if w == 'stop') +``` + ```python Collapsed="false" wcat(segment(cat(w[0] for w in pbs))) ``` diff --git a/2020/2020-challenge6.ipynb b/2020/2020-challenge6.ipynb new file mode 100644 index 0000000..da53ea3 --- /dev/null +++ b/2020/2020-challenge6.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "Collapsed": "false" + }, + "outputs": [], + "source": [ + "from szyfrow.keyword_cipher import *\n", + "from szyfrow.column_transposition import *\n", + "from szyfrow.vigenere import *\n", + "from szyfrow.support.text_prettify import *\n", + "from szyfrow.polybius import *\n", + "import collections" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "Collapsed": "false" + }, + "outputs": [], + "source": [ + "challenge_number = 6\n", + "plaintext_a_filename = f'plaintext.{challenge_number}a.txt'\n", + "plaintext_b_filename = f'plaintext.{challenge_number}b.txt'\n", + "ciphertext_a_filename = f'ciphertext.{challenge_number}a.txt'\n", + "ciphertext_b_filename = f'ciphertext.{challenge_number}b.txt'" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "Collapsed": "false" + }, + "outputs": [], + "source": [ + "ca = open(ciphertext_a_filename).read()\n", + "sca = sanitise(ca)\n", + "rsca = cat(reversed(sca))\n", + "cb = open(ciphertext_b_filename).read()\n", + "scb = sanitise(cb)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "Collapsed": "false" + }, + "outputs": [], + "source": [ + "fc = collections.Counter(sca)\n", + "plot_frequency_histogram(fc, sort_key=fc.get)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "held KeywordWrapAlphabet.from_last \n", + "\n", + "eutzo propo khzdc gowfs jovhp ahbsa euvwn ctotq lwssk bdtsd ukcvv dnorc shhgm ebpqf unotk enwhc putjs eqjat egceo giutb femtq jcuwt ebuop ategj euuss ebfiz dvhkp ewpio fsoaq urwag pyier hwhpg auwfh btuwn oesvq dussv vatsw ehnqi ikbhv erhfo tiwjw ejwsp etega ezswg ptwsh osxys cgowf ierdn gaery xstvs fezov egvva oongt owbfp etjwn ciots pqgtv vafga eytjg owuia omhki hbops oiiih zdprl erchh mhbtk enhrt jotuv ayosu ofves hsihg ptsvk euuga uwfhb tnsdx ssqhu grapz yfctc zdgii eitjs yjoff sapob nstqg aaemo snghu avdpw ehgar zdasm hbtie rvvai zdvwm kuivv dxsmk hshrt jscof otidp qaqtt jwsfc tysih orgii hhdos sverd otvvr hsfkt ghgap idgrr hhshh cpiih sduia proiz oprop olnkc vvtjs sedag spegt wgago thong iieie qwnaw fhrwk iivva qgccw nezdt gcxol qttjs srmen wsvio wgcpu hteur trqdn qggqz kqbaq ttjsl ebfno fkssj ofuem hkiei gqgtw wtqcs nmkhf tegaa ergeg vvaae mkbhu onguo kbhue gjsrt sskra piseb fyose plhio gssag cfsvk hcver uiovv agspe gthrt hbdpi tjsrh vdgpa hbdpw nagae hakbt jsnwd bhgox srvva vvrhs whsku zaerc puuri ovvak gfhfd tiuts dprtj otgot hqokb ekrag kcvvt jsdtg cxolq ttjss rmenw sviow gcpuh teurw nvvaw ycawr aclei agrau qrkft kenue gvvag spegt hrthb dpisv eowgd csnvh dviih fotid wiiqg cvwau ongii hmwhg aeplh ioaen iwroi ieidc gowfm eiejw nciih rauqr kftke njofn sgvii hqowb ttmtj sfemd iiati ihhpd qlkht cgowf dtgcx sfeik kbhuq rqhsq creua piseb feyan ohteu rhcps susxe bfmsn vkats duyag iotsp qgtqb tjssr menws vurqc puwnv vakgn hwhjp owgiq efuon gpovv thomu hapim holkh tqttj stqcr kbhro rvwau gaaen awlkb hvvao ohewn uitjs pegtd egvka piyvv dvhav egitr qdlkb eqzny sieja nesvo nqiih ggkja ezopu tjswe mlwqk kzyvv aeyan ohteu rwnhh shlie rbhsn yotav cpugq gtjsf hfdti utsgt emvva hosvs ngong hoysk pewvv dviih tunzt ysnvm shioi tdnen ciihi iedau wnvko cgowf sqtth bwkii hwhji dtgcx wncwn ukdns dprsh japot aonhk fqbtj sdago uicaw nvvan osvia nshto myscp iatqa riagh phzlh rowit jsmhh seuae itegh hirgt dprct onvvd vfdui mdoct dcpws vgyae nvoev hwjed vzdui dcgah rtqpr ksgos opiih wraen asrph rgtsv onghg qgrer cqrct sevwo pongt cprcp ucsca uicqb agiik htjwn mwncw tyose batgo tongi ieitj syosd pirer cqrct sevwo ptcpr cputj snejc cotke numsv smysu usbwi drfdt snvzy vvcuw suemh iikbh pswig ooiih poitc phopi ihicb orgqo odcvi ahiih meezl kiejo cpvoo sdprc vgais ruioe bayoa tepno nhrav sevwo phyui aoiie iuuss tsgns evwop egtof kewej auiot oncsg kbfeh whzle hcprc aothp aegcp ugtem ewrvv rhotu iihmi ejafs apsxr srkda picpu wkiiv vcuto towjw lhong orhbo ypukz fkbhq cteha twaue goosv htquc xsgte nvzcp swegn kbhqt dkgdv idays vvaiw ruigh ksvot kenuo rhpak bhfcc nicpb otton ylkbe qzneb fhhsh ltqfr qjcgs dtwnc eggsg hbeho rqcng zopro pongw tneom hlkya qcruf yazcu igtwa prseg ajcnv wncto twnie rootk enepo witjw svsej boneh dwtkh nqien sdtwg vvady nqkwj otkic upuvw tkheh gtewn vvdvk ajovh iouio riihd gkbfk bhqct komez sqbov hutsw jotvv aowsu wncfd tiyos mfsru orhro kbhki eebtf sjwht oerhh pdwnc osvva kgeqj atkcv vtjst qcrkb hrorv wauol newhr tjsme hmwqi eqehh sehtj syysr hzcms ldioc stues qdavv cpuan hakhu rwdov orwnc iieit jsdvi davag wnvsr aspvk cnzhk jawhd azuhk aebdn mshrt jsapq rdfth rthza cgdoo ngtow bfvvd vwtwh auoen osuwe ergcj xawpj srkiu ussvv auomh yadko trgqg tjstt onufo uwtke nuidc soiii hqcrv atosk vdxsu usfie rvvcu jccsn hgaaw pjsre bfmbo ywnci ieicv hiqcl gpats duene pldht toccv tiery orgio agday tjsct dauhd csbwi yqcwk zljov hioav aaytj sfhid kzsie rdeut hantd uwiej avehq vdtgy joseh khrmh iovgd xslve eewsv erves hiuro eqdme bfres votvv atrgv ewhgc pqdus whbah rtqoe vaukq knmci kaaon agday tjwsq baebf yerme uvkie icuuo kbhqb tjsnk vorsw hqdpd owbte qowbt hgtqi ihhpd qlkht qfato tkenf sgqga kiswq ehsfu faegl\n", + "\n" + ] + } + ], + "source": [ + "(word_a, wrap_a), score_a = keyword_break_mp(rsca, fitness=Pletters)\n", + "print(word_a, wrap_a, '\\n')\n", + "pa = keyword_decipher(ca, word_a, wrap_a)\n", + "print(pa)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rdf \n", + "\n", + "ourlondonakelagroupshavebeenscoutingforcluesinareaswithalargegermanpopulationusingthecoverofgoodturndaytovisitanumberofhousesandflatsknowntobeoccupiedbyforeignresidentsinmostcasestherewasnothingtoreportwhichisnotarealsurpriseasvksgrouphadalreadyvettedalotofthemandfoundnothingtoreportthebreakthroughcamewhenoneofthelandladiesmentionedthatshewassadtoseeherpreviousresidentleavesosuddenlybutgladthattheyhadbeenabletorecommendsuchanicereplacementfortheflatimighthavemissedtheimportanceofthisbutweheardthesamestoryatthreedifferentaddressesintheeastendoflondonallwiththesamedeparturedateandthatcoincidedwiththeoriginalarrivalofthespyclisttouringgroupfromnorfolkoneofthelandladieshadsomewhatfortuitouslykeptarecordofthecomingsandgoingsofherresidentsandwasabletodescribevisitorstothedepartedtenanttherehadbeenanincreaseinthenumberoverthethreeweeksleadinguptotheirdepartureandthatdatecoincidedwiththearrivalofthespyclisttouringgroupintheukicirculateddescriptionsofthedepartedtenantstoouragentsattheportauthoritiesandtheywereabletoconfirmthatagroupmatchingthedescriptionhadleftthecountrythedayafterthespyclistgrouparrivedatkingscrossouragentsandakelagroupsinessexandkentwereaskedtoreportonthespyclistgroupsintheirneighbourhoodsandbothteamssentmealistofthetouringpartiesreconcilingthemagainstthepartyoftwentythatsetofffromlincolnwehavelostanotherfivealongthewayluckilytheakelagroupinessexhadbeenwatchingforthedeparturefromtheeastendandsoweknowthatthefulltwentysetoffalongthethamesintwogroupsoftenwitheightarrivinginswaleandsevenatcanewdontheacrosticinthelasttelegramweinterceptedspelledoutthemessageattargetrdfandiranthatpastmyairministrycontactswhoatlastagreedtobriefmeontheirconcernsrdfstandsforradiodirectionandfindingiquestionedthisthinkingitwasanerrorandthattheymeantradiodirectionfindingthenavigationsystemweusebutapparentlythisissomethingnewfromtheboffinsonthetizardcommitteetheycallitchainhomeanditreferstoanewaeroplanedetectionsystemthatusesreflectionofradiowavestorangefindaswellasindicatebearingfromairthreatstheyhavebeenexperimentingwiththisforawhileandarenowbuildingoutaseriesofmaststogivefrontlinewarningofairattacksthefirstfewstationsarebeingbuiltinnorfolklincolnandessextoprovidearingofdefencearoundlondonanditlookslikeourspyclistfriendsarehuntingforinformationaboutthistechnologyitisnotcleariftheyknowwhatitisbutitiscertainthatwehavetostopthemfindingoutiamalsonotsurewhatthemissingpartymembersaredoingitcantbejustmorespyingastheircoverwiththetouringpartiesallowedthemasmuchaccessastheywerelikelytogetsosomethingelseisupiamhopingthattheattachedinterceptwillgiveusaclueweanalysedtheencryptedtelegramandfoundthatitusesaclassicadfgvxcipheritusesthesamekeywordforthetranspositionstageofthecipherasihaveusedforthisvigenerecipherandknowingthatitshouldbereasonablystraightforwardtocracktheirmessagebutyouwillhavetocheckthedetailsforyourselfasihavetogoharryhasaskedmetotraveltocaistortosetupacommandpostattherdftowerincaseweneedtoactquicklyifwecancrackthisoneandworkoutwhatisgoingonthenihopewecanmountacountertothespyclistoperationbeforeitsucceedspearl\n" + ] + } + ], + "source": [ + "key_a, score_a = vigenere_frequency_break(sca, fitness=Ptrigrams)\n", + "print(key_a, '\\n')\n", + "pa = vigenere_decipher(sca, key_a)\n", + "print(pa)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "our london akela groups have been scouting for clues in areas with a large german population using\n", + "the cover of good turn day to visit a number of house sandflats known to be occupied by foreign\n", + "residents in most cases there was nothing to report which is not a real surprise as v ks group had\n", + "already vetted alot of them and found nothing to report the breakthrough came when one of the land\n", + "ladies mentioned that she was sad to see her previous resident leave so suddenly but glad that they\n", + "had be enable to recommend such a nice replacement for the flat i might have missed the importance\n", + "of this but we heard the same story at three different addresses in the east end of london all with\n", + "the same departure date and that coincided with the original arrival of the spy c list touring group\n", + "from norfolk one of the land ladies had somewhat fortuitously kept a record of the comings and\n", + "goings of her residents and was able to describe visitors to the departed tenant there had been an\n", + "increase in the number over the three weeks leading up to their departure and that date coincided\n", + "with the arrival of the spy c list touring group in the uk i circulated descriptions of the departed\n", + "tenants to our agents at the port authorities and they were able to confirm that a group matching\n", + "the description had left the country the day after the spy c list group arrived at kings cross our\n", + "agents and akela groups in essex and kent were asked to report on the spy c list groups in their\n", + "neighbourhoods and both teams sent me a list of the touring parties reconciling them against the\n", + "party of twenty that set off from lincoln we have lost another five along the way luckily the akela\n", + "group in essex had been watching for the departure from the east end and so we know that the full\n", + "twenty set off along the thames in two groups often with eight arriving in swale and seven at ca new\n", + "don the acrostic in the last telegram we intercepted spelled out the message at target rdf and iran\n", + "that past my air ministry contacts who at last agreed to brief me on their concerns rdf stands for\n", + "radio direction and finding i questioned this thinking it was an error and that they meant radio\n", + "direction finding the navigation system we use but apparently this is something new from the boffins\n", + "on the tizard committee they call it chain home and it refers to a new aeroplane detection system\n", + "that uses reflection of radiowaves to range find as well as indicate bearing from air threats they\n", + "have been experimenting with this for a while and are now building out a series of masts to give\n", + "frontline warning of air attacks the first few stations are being built in norfolk lincoln and essex\n", + "to provide a ring of defence around london and it looks like our spy c list friends are hunting for\n", + "information about this technology it is not clear if they know what it is but it is certain that we\n", + "have to stop them finding out i am also not sure what the missing party members are doing it cant be\n", + "just more spying as their cover with the touring parties allowed them as much access as they were\n", + "likely to get so something else is up i am hoping that the attached intercept will give usa clue we\n", + "analysed the encrypted telegram and found that it uses a classic adfg vx cipher it uses the same\n", + "keyword for the transposition stage of the cipher as i have used for this vi genere cipher and\n", + "knowing that it should be reasonably straightforward to crack their message but you will have to\n", + "check the details for yourself as i have to go harry has asked me to travel to caistor to setup a\n", + "command post at the rdf tower in case we need to act quickly if we can crack this one and workout\n", + "what is going on then i hope we can mount a counter to the spy c list operation before it succeeds\n", + "pearl\n" + ] + } + ], + "source": [ + "pa = prettify(vigenere_decipher(sca, key_a))\n", + "print(pa)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "3756" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "open(plaintext_a_filename, 'w').write(pa)" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'addfaagdgvfgddfddfgxdvfddgdffdffggdgdfggfvgxdfgdaaggddaafgdfgxadfvfgdvgfaagfdvfgggdfgddfgfggdvfgagaagfvafvgvdgaaadgfgvagagdfgfggdfaddvgggxfvgvfdaddadfaafgaddvddaafggfdfdfdgfvgxdvgggxfvgvfdadfddvafggggdgdfgffxdvgddvgggffvaffvgvgddffgagfddvgfdgdgfvgfgggfffaafadvfgagggdgdfffafdfdffdgfaaafdfaafgadgfdfddgvgddfdvfgggdgdfdvgdaffvgdgggddfgfgfdvgffdaafgadgfggfvfxfgdfavdfgdggdgdffddfgfgffgfvggdgdvfgagfvfgggdgdfdfaagdggdgdvgfaffvgddfavdfgdaafgaddvggdgdvfgfaggdgdfvaffaavadgaaavdfaaffdvgffxfdaadddfadafaadvggdgdvfgggdgdvgfaafgadggdgdfdgdfaaavdffgfdvafxfvgxdfgdgfffaavafgfvggdadfgfgggdfvfgagdffgfvgvagdgggfvfxgdfvggdfddggggdgdfffafgdfvffggdgdffvfgddfvffdvfgaggfggfvgdffgfggfvfxggdgdffdfvddaafdfvgdgggfaggdgvfxfxdfgfdgaagddfadgxdvggdgffdfvafvgvgdfdaaggdfgfggagdvafggggdgdfdadfaagvggdvafgvfdddfdfvddfaaddfavdvdddfaafgadgxdfdgaaavdfgffxdffgggffgvdddgggdvffdfaaadffdvgddvfgagdvgggfggfvfxdvgggfgfdvfffxfddvdddvggvadvgfaaadffdvgdaadafddfaafgadfvfgdddfgxdfdgaaavdffddfaagdfgdfadggfvgvgfdfdvggfxgdfvfxdfgdfdvadvgggxdvfdfdfxgdfvavdvaddfgvgfaafdfdgxdvggdgaaavdfgdvadgdvagdgfddfavdffdfvafgfdfddgvgddvggvagfggfvfxgfaaafdfggvaffgvgfggdadffvgvgdfxgddvffaagdvaddfvfgdddfgdfgfgfvgxaagfaafdaaddfafvafddfvfgdddffggggdaaggdvfvfgaaggggdgdvgffxfvdvfgggddfvgvfdaddagddvfgagaddvgfaagfggdfgdgfggfvfxgdaafdafdgaagfdadfdffgagdvavdffgggdgdfaaddddfvfffxaafgvadvfgagfadfvadavaggdgdffvgdgggfaggdgvfxfxdfdvfgfadffgggaafgadfvfgdddfgxdfaagddfgddfgvfgdvggdfaddvgxdvfdfdgvgfdfggdgdvgfggfvgfdfddgvgddffvgvgdafgvgggvgddfddfvffffgvfgdvddaaggdvfvfggfgfggfvfxdfgfggaadafddvgfdgdvfgagaagfaaafdffxfdaafgaffvgdfvgvgddxfvgvgdfgdfvadgfvffdfdvgfdfgfgfdffgggdvaafddvfgfvgdaddfgdggfvaaavfvdvadgvfgfxfddfaagfaafggggfgvgdfxgddvgfdfgfgfggfvfxgagvaagdgddffdgfgxdvggdgfvgvgddgfvgfgggxfvgvfdaddadfaddvafafdvddgvfdggggfvgddfgffvfdavdfaafgaddvgxfvgvfdadfxgddfafdfgddvggdvafgxdfddfvgvfdadgffddvfxaagxaavagvfggddfffaagdfadfadgfggfvfxgvgfdffvafggdgdffdfvddaafdafdvgfdgdvfgagdafvaagggfffdvagdgggdadffxfvgfgfdvdafddfdagvggdvafaafgvaggdgdvfgaggxdfgddfggfvaafdaagdffggdgdffdfvddaafdgfggdgaaggffdvagdggggxdffdfdfxgddfavdffgggfvgvgdaddffxaagdgggvgddfaafgadggdgdfddfdfvddfaddfvgvfdadafaafdfddvfgggfvggdgdfgxgdfvfgagdgaafgadgfgfggfvfxdvafvafvgvdgaaavdfaagfgvagagdfgfggdvfvfgaadafvgvggdgfvgxdadfgfggggfvaagdgdaafgagdffvgvgdgggdaaavdffdggdgdffgfxfddfaagfdffddfgggvgffafgfvgxaafgadgxdfgxdvfdfdffaafadfggdgdfgddfgagvdvgddfadaagdgdaafgagdfffdffggggfgfggfvfxgdaafdafgffxaagdggvagxdvfdfdgddfgggvgdfgggfvfdfvfgadfvfgggdgdvgfgxdfdffaaafgadgxdvfdfdggdgdffggggdaaavdffdggfvffdfdfgggxdvggdggvgfaffvgdggdgdfafdvfgaafdgfggaaagdffvaffvgvgdaaadavdffggggvgddfgxdgdffggxdfgxdvfdfdaafdfdgddfaggdfvgvfxdadfaffvgddfgddfgggvgdfgdvfgagdgfvffdfgfggfvfxdfavdffgdvafvafvgvadfvfgfvgggxdvgfdggvgfggfvfxgdfvdddfdfadgxdvggdgfvgvgdfvgddvagdvfgaafdfxfdaafgggdgdffggxdfaagddfaadafddfggfvgddfgggvgdfggxdvggdgaagxdgfvfddfgggddfaagfgvgddffvafadgdaagxdvfgaggffxdgfvggfvaggdaafxdggfaafgadaddfgfddgddvfxggdvfvfggffvafggdgdfgfdfdvfffxfvgdggaafgggfdaafgadffaagdfagfaffvgdvafvgvaafgadvafvgvgdafgddvdffgadgfggfvgfgggvadvagfggfvfxaddfggaadvfdgffvafvafvgvgdgxdvgfdgdfgfgfdgfvgvfdaddadfgfdffgggdvfgggdgdfgvgfgvaafdgxaavagvgfdvfgagvafvgvgdgddfffaagdfaaadafddfddfdfvddfaaddfavdvdddfgfggfvfxfaaagdfd'" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tscb = column_transposition_decipher(scb, 'rdf', fillcolumnwise=False, emptycolumnwise=True)\n", + "tscb" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'biauxqhoiylokiopwkiwryiuawhaqiybrqlvavlqwiuivwlqdavzrxkabvxddivwiblwyrxobgiaqblhaqviikrylwyrxobolcwwkivslulwvrcrxuiqdolvkkrvwvpanlqdwkipciiovaciaqbvihxuilqwkilucruwuivvlvoaqbvwrsqieiuwkioivvqrwklqdrqwkiiauwklvcruieiuaqblwklqnwkizpazkaeiaplvsoahibcalwklqwklvaqbwkikiaeiqozsryiuvpazqrwgivwurqdiqrxdkwrsurwihwwkipcurpwkirqhrplqdvwrupvwrswkiorhaoruwvduxssivkauibylwkpizrxuoawivwdlcwwkigiaxwlcxohorhnbielhiaqbyikaeivsiqwpxhkwlpiabplulqdlwvwrslwvvlpsolhlwzlvabpluagoiaqbrqhiyikaeioiauqibwrxvilwsursiuozlwyloosurelbixvaooylwkaeiuzkldkoieiorcvihxulwzvwrsvaciwzpxvwgirxusulpauzhrqhiuqqryavaoahnrchrqhiqwuawlrqawwklvsrlqwhrxobgulqdblvavwiuvwrsuaockavgiiqdleiqwkiahhrpsaqzlqdnizgzwkiruwvduxssilqniqwaqbrqhiyiauiuixqlwiblylooxviwklvwrvihxuirxucxwxuihrppxqlhawlrqvvwrsivwagolvklqdavacisoaqcrurxumrxuqizkrpilvivviqwlaolqrubiuwraerlbxqsoiavaqwvxusulvivvwrstxauuiovylwkrxukrvwyrxobgiblcclhxowwruivroeiaqblyrxobsuiciulwlcyihrxobvolsayazxquipaunibvwrsxvircwkiorhaoclvklqdgrawvpldkwgisrvvlgoigxwlcaqzwklqdyiuiwraoaupwkiorhaovwkawpldkwyioosuieiqwrxubisauwxuiaqbwkihorhnhrxobcaoolqwrwkiyurqdkaqbvvwrslczrxkaeiavxddivwlrqagrxwkrygivwwrauuaqdirxuwuaeiowkiqsoiavioiwxvnqryaqbyiyloopaniwkiuitxluibauuaqdipiqwvvwrsuaocvsauwzyloouiwxuqwrorqbrqwklvyiinaqbyloowkiqwuaeiowrpiiwylwkxvcruwkiclqaovwadircrxuabeiqwxuiykiqyiylooaoouidurxsgicruiuiwxuqlqdkrpivwrsieiqlczrxbrqrwylvkxvwrsurhiibylwkrxuruldlqaosoaqwkiqyiauiagoiwruiwxuqylwkaykroiwuiavxuircbuaylqdvskrwrduaskvaqbbivhulswlrqvrcwkivilpsruwaqwoaqbpaunvcruzrxaqbzrxuculiqbvwrvwxbzvwrsbiwalovrczrxuylvkivvkrxobgiviqwlqwkixvxaoyazxvlqdzrxuuipaunagoihorhnbielhivwrsnauo'" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ptscb = polybius_decipher(tscb, 'a', 'adfgvx', 'adfgvx', wrap_alphabet=KeywordWrapAlphabet.from_last)\n", + "ptscb" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aghbicdklmnopqrstuvwxeyfzj \n", + "\n", + "dearunclewilhelmthetoweratcanewdonisasinterestingasyouhadsuggesteditwouldbeandicanseehowitwouldliftthespiritsofourenglishhostsmakingthemfeelsafeandsecureintheirfortressislandstopneverthelessnothingontheearthisforeverandithinktheymayhaveamisplacedfaithinthisandtheheavenlypowersmaynotbestrongenoughtoprotectthemfromtheoncomingstormstopthelocalortsgruppesharedwithmeyourlatestgiftthebeautifulclockdeviceandwehavespentmuchtimeadmiringitstopitssimplicityisadmirableandoncewehavelearnedtouseitproperlyitwillprovideusallwithaveryhighlevelofsecuritystopsafetymustbeourprimaryconcernnowasalackofconcentrationatthispointcouldbringdisasterstopralfhasbeengiventheaccompanyingkeybytheortsgruppeinkentandoncewearereunitediwillusethistosecureourfuturecommunicationsstopestablishingasafeplanforourjourneyhomeisessentialinordertoavoidunpleasantsurprisesstopquarrelswithourhostwouldbedifficulttoresolveandiwouldpreferitifwecouldslipawayunremarkedstopuseofthelocalfishingboatsmightbepossiblebutifanythingweretoalarmthelocalsthatmightwellpreventourdepartureandtheclockcouldfallintothewronghandsstopifyouhaveasuggestionabouthowbesttoarrangeourtravelthenpleaseletusknowandwewillmaketherequiredarrangementsstopralfspartywillreturntolondonthisweekandwillthentraveltomeetwithusforthefinalstageofouradventurewhenwewillallregroupbeforereturninghomestopevenifyoudonotwishustoproceedwithouroriginalplanthenweareabletoreturnwithawholetreasureofdrawingsphotographsanddescriptionsoftheseimportantlandmarksforyouandyourfriendstostudystopdetailsofyourwishesshouldbesentintheusualwayusingyourremarkableclockdevicestopkarl\n" + ] + } + ], + "source": [ + "word_b, score_b = simulated_annealing_break(ptscb, fitness=Ptrigrams,\n", + " plain_alphabet=string.ascii_lowercase, cipher_alphabet=keyword_cipher_alphabet_of('rdf', wrap_alphabet=KeywordWrapAlphabet.from_largest))\n", + "print(word_b, '\\n')\n", + "pb = keyword_decipher(ptscb, word_b)\n", + "print(pb)" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dear uncle wilhelm the tower at ca new don is as interesting as you had suggested it would be and i\n", + "can see how it would lift the spirits of our english hosts making them feel safe and secure in their\n", + "fortress islands top nevertheless nothing on the earth is forever and i think they may have a\n", + "misplaced faith in this and the heavenly powers may not be strong enough to protect them from the on\n", + "coming storms top the local orts gruppe shared with me your latest gift the beautiful clock device\n", + "and we have spent much time admiring its top its simplicity is admirable and once we have learned to\n", + "use it properly it will provide us all with a very high level of security stop safety must be our\n", + "primary concern no was a lack of concentration at this point could bring disasters top ralf has been\n", + "given the accompanying key by the orts gruppe in kent and once we are reunited i will use this to\n", + "secure our future communications stop establishing a safe plan for our journey home is essential in\n", + "order to avoid unpleasant surprises stop quarrels with our host would be difficult to resolve and i\n", + "would prefer it if we could slip away unremarked stop use of the local fishing boats might be\n", + "possible but if anything were to alarm the locals that might well prevent our departure and the\n", + "clock could fall into the wrong hands stop if you have a suggestion about how best to arrange our\n", + "travel then please let us know and we will make the required arrangements stop ralf s party will\n", + "return to london this week and will then travel to meet with us for the final stage of our adventure\n", + "when we will all re group before returning home stop even if you do not wish us to proceed with our\n", + "original plan then we are able to return with a whole treasure of drawings photographs and\n", + "descriptions of these important landmarks for you and your friends to study stop details of your\n", + "wishes should be sent in the usual way using your remarkable clock devices top karl\n" + ] + } + ], + "source": [ + "ppb = prettify(pb)\n", + "print(ppb)" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "Collapsed": "false" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1950" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "open(plaintext_b_filename, 'w').write(ppb)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "Collapsed": "false" + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "jupytext": { + "formats": "ipynb,md" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/2020/2020-challenge6.md b/2020/2020-challenge6.md new file mode 100644 index 0000000..167b5bf --- /dev/null +++ b/2020/2020-challenge6.md @@ -0,0 +1,98 @@ +--- +jupyter: + jupytext: + formats: ipynb,md + text_representation: + extension: .md + format_name: markdown + format_version: '1.2' + jupytext_version: 1.3.4 + kernelspec: + display_name: Python 3 + language: python + name: python3 +--- + +```python Collapsed="false" +from szyfrow.keyword_cipher import * +from szyfrow.column_transposition import * +from szyfrow.vigenere import * +from szyfrow.support.text_prettify import * +from szyfrow.polybius import * +import collections +``` + +```python Collapsed="false" +challenge_number = 6 +plaintext_a_filename = f'plaintext.{challenge_number}a.txt' +plaintext_b_filename = f'plaintext.{challenge_number}b.txt' +ciphertext_a_filename = f'ciphertext.{challenge_number}a.txt' +ciphertext_b_filename = f'ciphertext.{challenge_number}b.txt' +``` + +```python Collapsed="false" +ca = open(ciphertext_a_filename).read() +sca = sanitise(ca) +rsca = cat(reversed(sca)) +cb = open(ciphertext_b_filename).read() +scb = sanitise(cb) +``` + +```python Collapsed="false" +fc = collections.Counter(sca) +plot_frequency_histogram(fc, sort_key=fc.get) +``` + +```python Collapsed="false" +(word_a, wrap_a), score_a = keyword_break_mp(rsca, fitness=Pletters) +print(word_a, wrap_a, '\n') +pa = keyword_decipher(ca, word_a, wrap_a) +print(pa) +``` + +```python Collapsed="false" +key_a, score_a = vigenere_frequency_break(sca, fitness=Ptrigrams) +print(key_a, '\n') +pa = vigenere_decipher(sca, key_a) +print(pa) +``` + +```python Collapsed="false" +pa = prettify(vigenere_decipher(sca, key_a)) +print(pa) +``` + +```python Collapsed="false" +open(plaintext_a_filename, 'w').write(pa) +``` + +```python Collapsed="false" +tscb = column_transposition_decipher(scb, 'rdf', fillcolumnwise=False, emptycolumnwise=True) +tscb +``` + +```python Collapsed="false" +ptscb = polybius_decipher(tscb, 'a', 'adfgvx', 'adfgvx', wrap_alphabet=KeywordWrapAlphabet.from_last) +ptscb +``` + +```python Collapsed="false" +word_b, score_b = simulated_annealing_break(ptscb, fitness=Ptrigrams, + plain_alphabet=string.ascii_lowercase, cipher_alphabet=keyword_cipher_alphabet_of('rdf', wrap_alphabet=KeywordWrapAlphabet.from_largest)) +print(word_b, '\n') +pb = keyword_decipher(ptscb, word_b) +print(pb) +``` + +```python Collapsed="false" +ppb = prettify(pb) +print(ppb) +``` + +```python Collapsed="false" +open(plaintext_b_filename, 'w').write(ppb) +``` + +```python Collapsed="false" + +``` diff --git a/2020/ciphertext.6a.txt b/2020/ciphertext.6a.txt new file mode 100644 index 0000000..979b721 --- /dev/null +++ b/2020/ciphertext.6a.txt @@ -0,0 +1 @@ +FXWCR SURSR NJCDL IRZGV MRYJS HJEVH FXYZQ LWRWT OZVVN EDWVD XNLYY DQRUL VJJIP FESTG XQRWN FQZJL SXWMV FTMHW FILFR IKXWE GFPWT MLXZW FEXRS HWFIM FXXVV FEGKC DYJNS FZSKR GVRHT XUZHI SBKFU JZJSI HXZGJ EWXZQ RFVYT DXVVY YHWVZ FJQTK KNEJY FUJGR WKZMZ FMZVS FWFIH FCVZI SWZVJ RVABV LIRZG KFUDQ IHFUB AVWYV GFCRY FIYYH RRQIW RZEGS FWMZQ LKRWV STIWY YHGIH FBWMI RZXKH RPJNK JERSV RKKKJ CDSUO FULJJ PJEWN FQJUW MRWXY HBRVX RGYFV JVKJI SWVYN FXXIH XZGJE WQVDA VVTJX IUHSC BGLWL CDIKK FKWMV BMRGG VHSRE QVWTI HHFPR VQIJX HYDSZ FJIHU CDHVP JEWKF UYYHK CDYZP NXKYY DAVPN JVJUW MVLRG RWKDS THTWW MZVGL WBVKJ RUIKK JJDRV VYFUD RWYYU JVGNW IJIHS KDIUU JJVJJ LSKKJ VDXKH SURKC RSURS ROQNL YYWMV VFDHI VSFIW ZIHIR WJRQI KKFKF TZQHZ GJUZN KKYYH TILLZ QFCDW ILARO TWWMV VUPFQ ZVYKR ZILSX JWFXU WUTDQ TIITC NTEHT WWMVO FEGQR GNVVM RGXFP JNKFK ITIWZ ZWTLV QPNJG WFIHH FUIFI YYHHF PNEJX RQIXR NEJXF IMVUW VVNUH SKVFE GBRVF SOJKR IVVHI LGVYN JLYFU XKRYY HIVSF IWJUW JEDSK WMVUJ YDISH JEDSZ QHIHF JHNEW MVQZD EJIRA VUYYH YYUJV ZJVNX CHFUL SXXUK RYYHN IGJGD WKXWV DSUWM RWIRW JTRNE FNUHI NLYYW MVDWI LAROT WWMVV UPFQZ VYKRZ ILSXJ WFXUZ QYYHZ BLHZU HLOFK HIUHX TUNGW NFQXF IYYHI VSFIW JUWJE DSKVY FRZID LVQYJ DYKKJ GRWKD ZKKTI LYZHX RQIKK JPZJI HFSOJ KRHFQ KZURK KFKDL IRZGP FKFMZ QLKKJ UHXTU NGWNF QMRGQ VIYKK JTRZE WWPWM VGFPD KKHWK KJJSD TONJW LIRZG DWILA VGFKN NEJXT UTJVT LUFXH SKVFE GFBHQ RJWFX UJLSV VXVAF EGPVQ YNHWV DXBHI KRWVS TIWTE WMVVU PFQZV YXUTL SXZQY YHNIQ JZJMS RZIKT FGXRQ ISRYY WJRPX JHSKP JRONJ WTWWM VWTLU NEJUR UYZHX IHHFQ HZONE JYYHR RJFZQ XKWMV SFIWD FIYNH SKBYY DYJHY FIKWU TDONE FTCQB VKFMH QFVYR QTKKJ IINMH FCRSX WMVZF POZTN NCBYY HFBHQ RJWFX UZQJJ VJOKF UEJVQ BRWHY LSXIT IWMVG JGDWK XWVIW FPYYH JRVYV QIRQI JRBVN SFZYY DYKKJ WXQCW BVQYP VJKRK WDQFQ LKKJK KFDHX ZQYNR LIRZG VTWWJ EZNKK JZJMK DWILA ZQLZQ XNDQV DSUVJ MHSRW HRQJN GTEWM VDHIR XKLHZ QYYHQ RVYKH QVJWR PBVLS KHWTH UKHIJ SJCOJ URZKW MVPJJ VFXHF KWFIJ JKUIW DSULW RQYYD YGDXK PDRLW DLSZV YIBHF QYRFY JZMFD YCDXK DLIHJ UWTSU NVIRV RSKKJ ZUHFQ HVUSJ UIWVY RQIJI TIUFU LTULW VFYZR SRQIW LSULS XLVLH XKLTE HIKKN JWMZQ PZQLZ WBRVF EHWIR WRQIK KFKWM VBRVD SKUFU LTULW VFYZR SWLSU LSXWM VQFML LRWNF QXPVY VPBVX XVEZK DUGDW VQYCB YYLXZ VXFPJ KKNEJ SVZKI RRKKJ SRKWL SJRSK KJKLE RUITR RDLYK HJKKJ PFFCO NKFMR LSYRR VDSUL YIHKV UXKRF EHBRH WFSQR QJUHY VFYZR SJBXK HRKKF KXXVV WVIQV FYZRS FIWRG NFZFM HXKRW RQLVI NEGFJ ZJCOF JLSUL HRWJS HFILS XIWFP FZUYY UJRWX KKJPK FMHGV HSVAU VUNDH SKLSX ZNKKY YLXWR WRZMZ OJRQI RUJER BSXNC GNEJT LWFJH WZHXF IRRVY JWTXL AVIWF QYCLS VZFIQ NEJTW DNIDY KDHBV YYHKZ UXKIJ NVYRW NFQXR UJSHN EJGLL QKLSE RWWRQ BONEF TCQFE GJJVJ OWTGU TMLIV DWZQL FIIVI JEFJR UTLQI CRSUR SRQIZ WQFRP JONBH TLUXG BHCLX KIWZH SUVFI HMLQY ZQLWR WZQKF URRWN FQFSR ZKWMZ VYVFM ERQFJ DZWNJ QTKFQ VDWZI YYHDB QTNZM RWNKL XSXYZ WNJFJ IWFZQ YYDYN HMRYJ KRXKR UKKJD INEGN EJTLW NRPFC VTERY JXWVZ MRWYY HRZVX ZQLGD WKBRV PGVUX RUJUR NEJNK FFEWG VMZJW RFUJJ SDZQL RVYYH NIFTM HWNLY YWMVW TLUNE JURUY ZHXRO QFZJU WMVPF JPZTK FTFJJ VFJWM VBBVU JCLPV ODKRL VWXFV TDHYY LSXHQ JHNJX UZDRY RUZQL KKFKW MVDYK DHYHI ZQYVU HVSYN LQCJN MHZJD HCXJN HFEDQ PVJUW MVHST UDGWJ UWJCH LIDRR QIWRZ EGYYD YZWZJ HXRFQ RVXZF FUILM AHZSM VUNKX XVVYY HXRPJ BHDNR WUITI WMVWW RQXGR XZWNF QXKDL VRKKK JTLUY HWRVN YDAVX XVGKF UYYLX MLLVQ JIHHZ SMVUF EGPER BZQLK KFKLY JKTLO ISHWV DXFQF SODJW WRLLY WKFUB RUIKR HIDHB WMVLW DHXJD LVEZK BTLZN COMRY JKRHY HHBWM VGJKD NCVKF UDFXW JHQWD XZKFM HYFJT YDWIB MRVFJ NJUPJ KRYID AVOYF FFZVY FUYFV JKXUR FTDPF EGUFV YRWYY HWUIY FZJIL STDXV ZJEHJ UWTRF YHXNT NQPLK NHHRQ HIDHB WMZVT EHFEG BFUPF XYNKF KLXXR NEJTE WMVQN YRUVZ JTDSD RZEWF TRZEW JIWTK KJJSD TONJW TGHWR WNFQG VITIH NKVZT FJVGX GHFIO diff --git a/2020/ciphertext.6b.txt b/2020/ciphertext.6b.txt new file mode 100644 index 0000000..5722228 --- /dev/null +++ b/2020/ciphertext.6b.txt @@ -0,0 +1 @@ +DADFD DXFGF FDFFX GADAD XFGGA DGDDG GFGGA GGAFA GGGAV GVFDD AAVAG DFFXG XGDFV GGDFD DGFAV GFADG GFFGF FVAGD FDFGA DAAFD VDVGG DDFDG FGVFA AFFXD VGGDD GFFGD GFGDF ADDVA VDVGA AVDVF GDAAA AVAFG XADAF DGDGD VAGGG DFAFF AFXGF AAFGD FGVAF FVDGF DGFGG DFGVG GFGFF FGGVF FFXDF FDFVG FGVFF DADDD GFFFV FADFA VGGDA AVDFF DFDAF DDAGG FAVGX FGGDG VDAFV DGDGG VDGGV FDDVV VADDD DDAGF GDXDA DDADD DFVDV FDFFF AGXFD GVDDG FFDDG AVGAD GFFDD AFDVD GGGFF AFVFG GDVGX DFGAF GDDFV AFFAF VDVDF GDGVF AGGGX DGDVF DGVAD GAGFG GFDFF AFDFA VDGDF DDFXF AFGDA VGDVG FGVFF FAFGF DFDGF GFDVD GAVDD GFGGG GGFGD FVAVG DDVFV DDGVF FGVDF AADFD GAFAF FAAVF VDVGG VGFFG FGFGV FVFDD DFAFV GGFFG AGFGX DFGFF XGAGF GXGGG DFFGV FDDDA FDVGG GFFDD AAVFV AXDFG VDFDD GDGDF AAAFD FAFFG GFVDV GGFVA DDFDG DVGFD GGAFV GVFFG GAAVG DGGFD GADGF DFFDF FDAFV DGDDF DAFGV GDFAG VDAAG DDFDD VFDAD DGFGD XFGDA AFGVD FFVAV AFAGG GFGDV GGGAG GFAGA AFGDG ADDDF FDAFF FGFFV AGGFD DFADG DDGVG FADAG DFFGG GFDFF FAGAD DGFGD GVFGF GDVGF FAAXF DDFGD AFGVD FGVDV AVGGA VADGA DVFVA DDGGD GGFXG VFAFD ADGXD FGFDG GGFGF FGGFF DGAAG DFVGV DVGVG VDFGV DVGVD GFAFD FGDGD ADAFF FDGVF XGGGG FFGFG VDVAD GVAFD VFGAX GAADG DDXDV GVGGG FFXGG FGAGF AFFFD FVFDF VADDG GGGGA AGVAF AVGVV VGXGG GFFVA AGFGV GGGFA DAAGV AAGDD FGADD DDDAD VDFGV FAFDA GGFFD DDDGG GVDDG DFFAV DFGVG FDFDG AFFVA DGGDF DDGXG DDFFD DAGFD VDGFV ADAGD FFVDG FFGDF GDFDV GFAAF GDFAF FFAFF DDDGF FGDVA VGDGF GDFDG VFFDD DFDFF VDVAV GGDAG GGFGF DDFDG GFADF FADAD ADFFA DDAVD VGGGA AGDGA VFDFV DDFAF VDFGD FGFVA GFXFG DGDFA DFGDV DVDGG GGFGV GGFVA DGGAD FXGGG FGVDF VVGDG FGGAG DFDAG VGDFV FDAVD AAXDA DFDGF VDGFF AFGVA VGGFV GFFXD DGAGA FVAAD AAVDF DGAFD AFFGV GFGXF XGDDG DDFDA VDVAD GVDAD DDVDD AFFFD DGVVF FXAFG AGFDF GDGVA DDVDF FGGAA DDAAD FDFGA GFGGG DFFVG DGDDD FGDFG GGFFX ADDAD FFGAF GGADF FAGDG FFDAD FGGAD FXDGD GAGFG DXADG FFVDD GVFVD GDFFF DVDVG FGVDD FFFVA GFGGG FFGAF VDVAA AFFDF FGVGX GDDAF FDFGF FGADF VAFGV AVAVF DAFFG GDGVD FGVGV GDFFD GFVDV GXGDD FDFDD FGFDG VAFFD GVFDG FDDGV GFFVA FDXGA GGDFG AAFFX GFAGD DDAAV DVAAA GFVDG DXGFD DDVDF FADVA XGFFA ADGGF VADGG GFAGG FFXDV FGGDD XGGGF FDDFF VFDGD AAFVG VDFGV AGFDG GFVVV DADAG GDFDV AAGGF XDFGV GDFGF VGDAF GGFXD ADDGV FGGAA XGVFF FFDFD ADDAA GAAFD GGFFX ADGXG GGVFD GVFGF VAVGG GXDAF DDDGG FGAVF GFFGX GGGFG GDFFA GGAFA VGAAF GVDXD GDXFD FDDGF VDFFD GFGDD GDVDF FXAFD FFVFG GXGGG GFDDF AXGGG DGVDG FXAGD FGFGF DDGVD GGGDG AXFDG DAFGF ADAXF GFGGV GADFF DDFGV GVFFA GDFDF FDAGF AAFGA AVVVA GVVGF DFAFF FGDGG FDGAF FAAGD DFDFD VFDDF FGFGD VGAGA GFFGF VGFAD AADDF DAFDD GGFAG DAFGV DDGVD FFGDG GFAGA GGDFV AFFGG FGVAA VVDAG VAFGF DGFVA AAGDD FFDGG VGVFD DFGGG XGVGV FVDGF VDGGG FADGG GFFDD AFAGG FGDDG DFGFG GDFDF AGGGF GAFGG FFGGG GFGFG DFGGD FFDAF AGDGD GGGVF VGAFF VFDDF AAGGF GDFFD DFDAD GVXGF GFVGG AGGFG DGGGG VGVDD GGFFF FDFFD FVAFF DGGFG DDDAF DGGGX DFADA XGGDA GDAGG GDFGG DFGGA VDDDA DVDFF DDGAF FFGFD GDFAD DDFGG FFXGF DFFVD GDFAF GAFFF DFDGF AVFFG GAGGF DGGVD DVVGV FXFVA FGAFX GGAFV GAGDV FVGFG DGAGV GADGF VGAFV FDFAV DFDGG FXGAA DFFFG DGGAD VAGDV FVFGF VAADG AVAFD DGVGA AGGAD GDVFG DADVF AVVAA VAGGF DGGGX DVFFG AAVDF DADDG GGFDX FDGFD VGVDD GFGDG GGFFF GGDAD VGFFX GGDDG GFGGA DXAGF DGDFV FFDVD VDFDG DADGG DGGAV DDFXD AAGGV FDGFG GFAAD DDGVD VGGGG FVAAA VAVGD GVDFF VAGDX GDFDA FDGAX DVFDF VAXVV GFADD DGVGF FFDFF DFFGG FGFAG FAGDF FFDAD AGVAG GGFGD DGVFA FGDDD AGGAG DGGXF DGFDG FVAFA DGDAG GGDDD AFVAF FDFGG GGDFG AGGFF XAAGG AFGVA FGVFA FVDVD FGGAD AGDVG GAVFG DGFFG FDGGA FXFDD XFDAA GGGFG VDDGD FGFFG FGVGA AFADV XFDDG GGFDF DFGDF DFAGG VFGDG GADDF FDGDG GFFDD FDGFF AGFFG DAVFG GFDFG FDDAD GFGVF AAVDD GVFVA GFFGV DVFVV VAVFG DFGFF XFDDD DGFVF DAVAD FAGGF XADAA DGGFG DGVDA DVDGD AGDFF GADGG XFGAD FGAGA FDDFG FGFFD FDVFV GAGDF DADGF GAGAA AGDGV FDGVG VVFFX DGDDF FFVGV DFGGG DDFDG DGDFG VFXVV DGVVG DFAFA FFFVF DAVDF FXAD diff --git a/2020/plaintext.6a.txt b/2020/plaintext.6a.txt new file mode 100644 index 0000000..e12c118 --- /dev/null +++ b/2020/plaintext.6a.txt @@ -0,0 +1,39 @@ +our london akela groups have been scouting for clues in areas with a large german population using +the cover of good turn day to visit a number of house sandflats known to be occupied by foreign +residents in most cases there was nothing to report which is not a real surprise as v ks group had +already vetted alot of them and found nothing to report the breakthrough came when one of the land +ladies mentioned that she was sad to see her previous resident leave so suddenly but glad that they +had be enable to recommend such a nice replacement for the flat i might have missed the importance +of this but we heard the same story at three different addresses in the east end of london all with +the same departure date and that coincided with the original arrival of the spy c list touring group +from norfolk one of the land ladies had somewhat fortuitously kept a record of the comings and +goings of her residents and was able to describe visitors to the departed tenant there had been an +increase in the number over the three weeks leading up to their departure and that date coincided +with the arrival of the spy c list touring group in the uk i circulated descriptions of the departed +tenants to our agents at the port authorities and they were able to confirm that a group matching +the description had left the country the day after the spy c list group arrived at kings cross our +agents and akela groups in essex and kent were asked to report on the spy c list groups in their +neighbourhoods and both teams sent me a list of the touring parties reconciling them against the +party of twenty that set off from lincoln we have lost another five along the way luckily the akela +group in essex had been watching for the departure from the east end and so we know that the full +twenty set off along the thames in two groups often with eight arriving in swale and seven at ca new +don the acrostic in the last telegram we intercepted spelled out the message at target rdf and iran +that past my air ministry contacts who at last agreed to brief me on their concerns rdf stands for +radio direction and finding i questioned this thinking it was an error and that they meant radio +direction finding the navigation system we use but apparently this is something new from the boffins +on the tizard committee they call it chain home and it refers to a new aeroplane detection system +that uses reflection of radiowaves to range find as well as indicate bearing from air threats they +have been experimenting with this for a while and are now building out a series of masts to give +frontline warning of air attacks the first few stations are being built in norfolk lincoln and essex +to provide a ring of defence around london and it looks like our spy c list friends are hunting for +information about this technology it is not clear if they know what it is but it is certain that we +have to stop them finding out i am also not sure what the missing party members are doing it cant be +just more spying as their cover with the touring parties allowed them as much access as they were +likely to get so something else is up i am hoping that the attached intercept will give usa clue we +analysed the encrypted telegram and found that it uses a classic adfg vx cipher it uses the same +keyword for the transposition stage of the cipher as i have used for this vi genere cipher and +knowing that it should be reasonably straightforward to crack their message but you will have to +check the details for yourself as i have to go harry has asked me to travel to caistor to setup a +command post at the rdf tower in case we need to act quickly if we can crack this one and workout +what is going on then i hope we can mount a counter to the spy c list operation before it succeeds +pearl \ No newline at end of file diff --git a/2020/plaintext.6b.txt b/2020/plaintext.6b.txt new file mode 100644 index 0000000..9a7f2f5 --- /dev/null +++ b/2020/plaintext.6b.txt @@ -0,0 +1,20 @@ +dear uncle wilhelm the tower at ca new don is as interesting as you had suggested it would be and i +can see how it would lift the spirits of our english hosts making them feel safe and secure in their +fortress islands top nevertheless nothing on the earth is forever and i think they may have a +misplaced faith in this and the heavenly powers may not be strong enough to protect them from the on +coming storms top the local orts gruppe shared with me your latest gift the beautiful clock device +and we have spent much time admiring its top its simplicity is admirable and once we have learned to +use it properly it will provide us all with a very high level of security stop safety must be our +primary concern no was a lack of concentration at this point could bring disasters top ralf has been +given the accompanying key by the orts gruppe in kent and once we are reunited i will use this to +secure our future communications stop establishing a safe plan for our journey home is essential in +order to avoid unpleasant surprises stop quarrels with our host would be difficult to resolve and i +would prefer it if we could slip away unremarked stop use of the local fishing boats might be +possible but if anything were to alarm the locals that might well prevent our departure and the +clock could fall into the wrong hands stop if you have a suggestion about how best to arrange our +travel then please let us know and we will make the required arrangements stop ralf s party will +return to london this week and will then travel to meet with us for the final stage of our adventure +when we will all re group before returning home stop even if you do not wish us to proceed with our +original plan then we are able to return with a whole treasure of drawings photographs and +descriptions of these important landmarks for you and your friends to study stop details of your +wishes should be sent in the usual way using your remarkable clock devices top karl \ No newline at end of file