Fixed some formatting issues in some puzzles.

This commit is contained in:
Paul S. Ferrell 2009-10-15 16:29:52 -06:00
parent 39ef9d4694
commit 39d7b98852
6 changed files with 13 additions and 21 deletions

View File

@ -1,6 +1,2 @@
<dl> <dl><dt>Alice<dd> OaRnC xYDMj mRfUF NHloY MdDhM<BR>AsGEX EWVcd EluiG ZpfMD sXmLa<BR>wnwCQ FCrpx HlKVQ UdVRB VWXmq<BR>aALLS JoklQ zKmXb zvdFc GCess<BR>vQvLJ twVsy CQCzt AWkLr FUbVE<BR>KMACs bfNJf aWlgx UtXUR fmSHV<BR>JiQtb lOChG IdziE sGCJk uqTBp<BR>bLMxX FHLVG xzHyE DhEgc RxajT<BR>DVyFG UUDWl qnQqR MNypE pQKCK<BR>uoKBh EsZZf HFTPH XyidJ TvfLf<BR>nCIUD nXqwQ vkLmI plZRq HzINo<BR>WWPQK MywcI ryqWh jIVQT pTrwj<BR>vEYqL ObBcu CPUIy YOSQS SxpRJ<BR>TrZOm nqClB sUtqz DjHNC WqPCM<BR>JDJue jLgMB TmcIc GHEQm lRZiW<BR>bHPaH YOFET jlWvr KFVkp UXHDd<BR>JbyjO CwbSc oxGmH QRJqZ FENRH<BR>vumHE qjFvj zQcMV LyaPG xVyJc<BR>opOKT SNIeI FESGS mfRgY QlLgt<BR>mDCvv UWlZT VBMRk dWTqS JZatQ<BR>iVXkL kzRBx iFQqc JQmdS RffSC<BR>zPqVq fyHHa CUgoN DuTzV pvEnc<BR>uTZdh wNpNP OPdHr hpK
<dt>Alice <dt>Bob<dd> WmVtZ tinFr jWKqY dNVxD VJKGG<BR>qbrQv ujOyj Naaag ZilxP tTjOp<BR>bMbeD GSheG NgDQY jnGib wDRTd<BR>YTkqo InauZ sRRFZ lGZSK MPyhb<BR>TmjoG qaGHX GnDno ClwsT OwyeA<BR>cFGKX bLAPJ XIeyu RuZAC qkPqK<BR>IYLzj YHeWz CmzZu xCcGL lWRJF<BR>LAjvc DkEJV bgUfl mbWVv ZJRCB<BR>EfaJQ uvyIk oBWqO kZuap XnGYD<BR>GjYTA UCWwo gRZnd LxguW iNZQg<BR>soHjR dQheM SNcxH dgXiH fdHXw<BR>LNOFX NcfaX BqgGt bMqtv oOUsU<BR>XDGXO lvSTi XoGma SPVFo DeelQ<BR>WyCYe aNkwY WXuog vWKcV CwAnd<BR>MLJJv YXTTS LmbmU husBq aIuvc<BR>uVwzu KcEqW jtCpe IAUtg CJxUH<BR>JAuAD SCXFg pcBvo pIewT HhRlM<BR>Ndfoo hfVQd HGKKM FtSvW DmSMm<BR>cMMMN iEzgq VlWOB UpKAN DZTkK<BR>WWeiM YsxKe FUgHw uZqvx QHftF<BR>mVcu </dl>
<dd>KiTvXqBKSkdOiVHAKgyAdZXuTwudIHqzLHcJBCXRPnxCxuxhUmdKcqvNSgkHGgYmKIdQKAOPMatvHAalZzrZcMCFGaiSklvsNsgbLiJmPagZobKLLpgJJcIMDUvKEXFJMiwVbVFKZdjDMKSvTdugBqjPBdlJTlXnDAvFUPNAFpjFESbJNsgJTnCgNeeZIwGfMkmZwnhGCDrOWWYIPafuXZrKNroELoGjXwtQdlSZZwdDTEZxTulhKsAMFthZfHGqSyxnXzdPShkXVrRqDpoNmuTINniddWNvMThBQEWAVbaRLrChBicNXWYbGuwdAQrvLdfdxEJgPErTwysQ
<dt>Bob
<dd>LqItUzQMBgbWoNMNNavSLvNyBStVGUCWNjgQxghYZevZYvWuBcdweBUETsflAiXPPLxBFVHUOrdhFDARCngbRdLnHiytxFnSSpknmEvZDioBdxTRLnlAOcAfPKvODVUWJpstBLmtXskjWuBBHizDKXRtPobcLVyQHjtzKiFFMwzzOVnfHTqZGKKDQinlYgZDHzmWhHEKYwtDMmDiUKrZYARDIoceQDugJhrXVOZnAbbFneByTliWIpTsMWoVGGSAIzpBZXOvIihvSBcjABbCXEZIRblsPxJFUnuXrIDBFphHpFSzUrpsNUzbPXdLNBUAInuJifwtRigMdtzWGkvLAwYqIQmEetyEPSrMHNTBRLtZCJZPRcEdDQdEXdnILAAfNpwzEsVWPUzYJVBCVbUTVojLIviMzWRpMqpQotsYAqtDcFpe
</dl>

View File

@ -4,6 +4,7 @@ binary with one character per binary bit. Lower case characters are 1's,
and upper case is 0. The letters are chosen at random. Tricky, eh?""" and upper case is 0. The letters are chosen at random. Tricky, eh?"""
import random import random
import crypto
lower = b'abcdefghijklmnopqrstuvwxyz' lower = b'abcdefghijklmnopqrstuvwxyz'
upper = lower.upper() upper = lower.upper()
@ -40,9 +41,4 @@ def decode(text):
out.append(c) out.append(c)
return bytes(out) return bytes(out)
c = encode(plaintext[0]) crypto.mkIndex(encode, decode, plaintext[0], plaintext[1], crypto.groups)
print('<dl><dt>Alice<dd>', str(c, 'utf-8'))
assert decode(c) == plaintext[0]
c = encode(plaintext[1])
print('<dt>Bob<dd>', str(c, 'utf-8'), '</dl>')
assert decode(c) == plaintext[1]

View File

@ -0,0 +1,2 @@
<dl><dt>Alice<dd> OsaZO qrVCc bBEwT uVaeD cUIgs<BR>XBoLu SiOcy GqSMq LuoKN xjYUn<BR>MepZO lOeYl PqOiU ycJqJ RxnOo<BR>DsXEj CehRl WXsXw mKCka ILpaZ<BR>qWkCf MEyTt CyJtf AsYaD TvyYB<BR>xKgGg ZjrNS qQdRm McJzG uiEuE<BR>DxsLt VvXkY IpcVy FGnfM iAdOL<BR>kTybM kCJaV rlDRw tQBpZ aoTNj<BR>RrSbB nXzSc fBcIE qcFOw AjeBO<BR>ncVnJ nLXyV nuToR YuWdt FFlQq<BR>SxWeW wKpqA bQBok KNkQg qIIdf<BR>JfQWc sQrFd JDzUo ErzCA wGoJt<BR>SzEyT zeIUw TkzQa DNzdN FsrIo<BR>FGllP kOrPn SFjwI uYcNJ yUldB<BR>SmUez OaYzO EpIkc ZGuGl dRvRC<BR>dcEYq FtoZD bjWpS yMXvR jvSvC<BR>PgAnx KOqUe GdUdM xNotY YuYxN<BR>nYmaD nZBgu MzCUo lMcVk ZjCWt<BR>jPaCF kRwgZ SnDuX rbZzK NcIvr<BR>FIwrR AtYaf MLsiX zWiVM rQlJh<BR>oGIxC sEjJc KfSsN dfBFr LfOiM<BR>eBkKe pUBsd CMzoY DltIW knBtT<BR>UbnJl DrPYs QlyJx VJvfO cBNlL<BR>zHqnP wZUob QQcWm tUVff PcUPb<BR>gUGwp PmYRe dCcDO oWfmF GhmXU<BR>iEjhR OoRcT rKhNu CovZo IeFVm<BR>kDIdO jDsjZ wVIye DFxOi UfVfw<BR>GgHCi MorGD hgDNp VrvPE lFwJy<BR>KdBrE qtMuX rPIqK zEuQh VivSb<BR>YrYKg NzgVN eKskT yJEuQ vbPZr<BR>cXLzm HlKsI YrhDl USeRf sEgDS<BR>kbBHr QdxXY tnIjT UffSu WgOlL<BR>KzuHh ZvPIw mEKte EUesW bIxUL<BR>qHxwX iNEyM llYGz GhGoL jLjGk<BR>hXpCr NNwoC XcYzS btNeL iUXyd<BR>GmYoS XrsSu FEvkD dGzDq RUkMq<BR>xPUpm JpJKi JxLfI lfEKz BpSvD<BR>yBeCo jBoPf LMjhP ZaIrZ dyQxJ<BR>YgcPP gYnMs DoqVm UBcEl dDXha<BR>GEarV zQvAd JJvXq vUMnH xbOUh<BR>UeJcF iHcCi vJpWa MGipL rRoTI<BR>mwUpJ UfdCA jEafV FlkJu VIypK<BR>cUDhI gXkbC yDAzf JuMRm CzRfR<BR>llBCk VuSiU iGvPj iXwKQ qSiMi<BR>ExjMP laRzU XlPmF dnNwW LzvGf<BR>JoTPe kIAiP sOalO pYeXY srYEx<BR>qNFlb FbUVn IjVzV qzTLl lUxIV<BR>iiBeP QfRfX juMfH UtrMn OWaXe<BR>NvkNi BlUyJ MeBjj OVeJt bBXaP<BR>gSeUl EiPsn HoSBe iCeUh HCfBg<BR>yEqTH gGmqX EcmPJ bdVxC ZsKtw<BR>PLmsZ YqnSm GYhSs kEAcX yUdLu<BR>lHNjY jJlCl BlAby KwVtD GieJW<BR>bJrWl vJeFK fyHaU oLnPD pBsiC<BR>JqSqH zXhDl CunRi GTxCi mTUaZ<BR>vGxkK bIFaK oaNXo iYNxu ZtLfH<BR>BfrDF oPjQv aRoHO dJkgD AzgGQ<BR>okHdT aNJdE jnGWw RyrBo CObdY<BR>vOKvg EDjbB bDNns DBsPk dRQzn<BR>LpCOp mQpEv EDoSx nPwHG lSxnS<BR>WgwBH cZufD EoIgG xOzCv LgmYa<BR>TvXJh OtaMg TYpzQ vJVei ZjVpU<BR>aLDrs UxZCi bPyFJ qfAIz hFdCG<BR>qArpV CyrVK uDmwA ToLfE pHvYi<BR>YmsMo WjXOh XzpXe QOhwW xEOcu<BR>KjDnR fLOhx KgWaC EqPob HPgHv<BR>oCbQc PWhyK MsWkZ iJwpO JdNpS<BR>vScNw YnzUj FEmjR sEeYq PBnsL<BR>sSFvK kkQxY UvVmV dgKNb CxEpV<BR>fXpZz kFiRM kqZMp tQcWE ijCxD<BR>WaNgv YDhtI QtvAx YjHxJ HnPtp<BR>CUrGn vTAgo IvQrI Is
<dt>Bob<dd> DcfTV cQrxZ bTBnq HCjwG kNIie<BR>CoAyJ gRUqp PrCoZ IvImh WXiUy<BR>jRkJf FZlSa vNTxY yoCxI ShiID<BR>dXntL XyjPz JkOSm ZomOu UXqWz<BR>aYUvJ yVhEd DqPmg YbBPc SdUrt<BR>OaPTt bAoKZ eoChN iQzRL imGmV<BR>JjMhz EJeUp WpvNe LCgQv qKQco<BR>FMtLs zDGfE lXuKi QqWaw UtMjM<BR>GrjGg JrVVy fYpLC dyWNa SkuGW<BR>qoPtP jISrp SVnVg PrsVx FCdtW<BR>GpOzI gVeCg cEAyL wXtGi QjBce<BR>PyQCs YoVhC hjJPf VklPI lPoUm<BR>KfJdN veXvG ReoWE wiJsM TblSc<BR>QLeKr bXAvv GVwvS rGlUm UAnQa<BR>dBDkO lcBzT qDvGj MfZRw JsfML<BR>eHcTi OpEtP uKbvS CbAhW pMmBv<BR>YvzJX ceEFy yTBcB oIzjG gRTmc<BR>FDcAa YoHlg AoHHo CtDuC wmQTm<BR>mGmKb CCxiY QeIkO yTknZ XcHmZ<BR>jGqOo VkpAs WwFGs RlbYw QXluN<BR>sUUuq KoTdF nFEsc WtPfW UesOP<BR>jbYNc rBjMZ ajHjV zSPyF gyIcV<BR>CzRju MPhGc XipXc HcXOh MfrEz<BR>IFbTp yVXsQ wKyVw LbQzo ZkVDq<BR>SqBbq JWlUu kHmGL leKXy VpqEK<BR>mrLoU rLgTY pqBDj EhuCe OLiPo<BR>DvWrl PMjvM uBbTQ rOulG AfWyt<BR>FjQcL GuSkj EHkXl iGoXI sKobC<BR>TbdDG uViyC JvbRj XyFTy VlJyw<BR>KGoPq MdOjV fVxnS xNpGR vVyIc<BR>VnLpb RaFrU PeIgv YRcCb nAmYG<BR>soXgJ lCzFK rsZpJ KuNpZ npPOo<BR>CmmYy DXbMp VtQzb NFyiK uCLfU<BR>lUxpK MnHbq GsDPq gYpUM fGtHm<BR>mGxFQ bBfiA NlhXI wDyrH XfZnM<BR>xUzCe SryJj UExJm NssDa PObqH<BR>dOEmV vYzHg aNMbw IvVgK PbjQX<BR>kcWKv yGtPs VFkSb fYhAY ssYuY<BR>AtBgs FKdbO </dl>

1
puzzles/crypto/130/key Normal file
View File

@ -0,0 +1 @@
probable cause

View File

@ -3,13 +3,14 @@
the binary.''' the binary.'''
import random import random
import crypto
lower = b'abcdefghijklmnopqrstuvwxyz' lower = b'abcdefghijklmnopqrstuvwxyz'
upper = lower.upper() upper = lower.upper()
plaintext = [b'The next one is in Morris Code. Unlike the previous two, ' alice = b'The next one is in Morris Code. Unlike the previous two, '\
b'they will actually need to determine some sort of key.', b'they will actually need to determine some sort of key.'
b'Morris code with a key? That sounds bizarre. probable cause'] bob = b'Morris code with a key? That sounds bizarre. probable cause'
def encode(text): def encode(text):
out = bytearray() out = bytearray()
@ -52,9 +53,4 @@ def decode(text):
out.append(c) out.append(c)
return bytes(out) return bytes(out)
c = encode(plaintext[0]) crypto.mkIndex(encode, decode, alice, bob, crypto.groups)
print('<dl><dt>Alice<dd>', str(c, 'utf-8'))
assert decode(c) == plaintext[0]
c = encode(plaintext[1])
print('<dt>Bob<dd>', str(c, 'utf-8'), '</dl>')
assert decode(c) == plaintext[1]

View File

@ -4,6 +4,7 @@ many different possible characters. The 'encryption key' is the set of
characters that represent dots, and the set that represents dashes.""" characters that represent dots, and the set that represents dashes."""
import random import random
import crypto
dots = b'acdfhkjnpsrtx' dots = b'acdfhkjnpsrtx'
dashes = b'begilmoquvwyz' dashes = b'begilmoquvwyz'