Wiggles, part 70


Just a little ongoing story to give you something to play with until the next blog post.

Z WQXA GF KLEEGCQTV YEGC LUZXZJLA FSGU Z EZSYQTV BGH, FGS ZEE JVL CGSEA EGGWQXY EQWL Z MZUOFQSL. CVQMV CZT ZOOSGOSQZJL BLMZDTL QJ CZT TDSSGDXALA BK TELLOQXY BZYT, Z MZUO TJGPL ZXA Z MGDOEL MGGELST. Q YEZXMLA ZSGDXA – CL CLSL QX SGGU, UZKBL 4.5 BK 6 ULJLST (15 BK 20 FLLJ). QJ MGDEA VZPL BLLX Z TUZEE GFFQML, GS UZKBL Z EZSYL LFFQMQLXMK ZOZSJULXJ, CQJV Z FLC MEGTLA AGGST QX JVL GJVLS CZEET. JVLSL CZT GXEK JVL GXL EZSYL CQXAGC BLVQXA UL, FZMQXY JVL ZEELK. XGJ UDMV GF Z PQLC JVLSL. ELXYJVT GF CGGA, ZXA GJVLS ALJSQJDT EQXLA JVL CZEE CQJV MDSQGDT TLMJQGXT CVLSL QJ TLLULA EQWL JVL OEZXWT GS BGHLT VZA BLLX UGPLA JG JVL TQAL FGS TGUL SLZTGX.

Cm History, 1966-1970


1966

Jan.-Feb.
– Triskelion (This is a pseudonym for Helcrypt, Sellwyn White and Zembie, and is used for reworked reprints of past articles) – Simple Substitution ciphers intro.
– The editor calls for copies of the original Beale cipher to correct errors in the copy supplied by Bozo for the 1954 Cm article.
– A catalog of known cipher types based on Morse code. Some weren’t adopted by the ACA.
– Mention of the Electronics Illustrated May 1966 issue article “How to Eavesdrop on Real Spies.” Includes a little info on codes and one-time pads.

Mar.-Apr.
– A Cryptologist’s Introduction to Japanese. Printed to support a Japanese xenocrypt. 5 years since the last one.
– Triskelion – Simple Sub Ciphers, part B.
– Teepee – Solving a normal Railfence cipher.

May-June
– Triskelion – Simple and newspaper crypts, reprinted.
– Book review – “Fun with Fractionated Morse Ciphers” by Mabel DuBois (Dubio) and husband Robert (Dubious), published by the ACA. 101 mostly easy crypts aimed at intermediate level solvers. $1/copy.

July-Aug.
– There’s a big jump, from this issue to the next. Apparently, this was another period where the ACA missed printing the Cm for various reasons which weren’t fully explained.
– Zembie reviews David Kahn (Ishcabibel)’s “The Code Breakers.” It’s a glowing review.
– Mi Tai Tai – The FracFair Cipher. This is a fractionated version of Playfair. Not adopted?

1968

Jan.-Feb.
– Don Scotus – The Pollux Cipher, an introduction.
– The editor mentions David Kahn doing the TV talkshow circuit to promote his new book.
– Rogue – Starting the Analyst’s Corner. This is a feature for longer crypts, with explanations for solving them.
– Mi Tai Tai – Introducing the Reminder Corner, a section for reminding people how to solve less common cipher types. Starts with Trifid.
– Zembie – A review of “Secret Service” by Sir George Aston (1930).
– Triode – How to create cipher alphabets.

Mar.-Apr.
– Death of Mi Tai Tai announced.
– Machiavelli – Use and recovery of K1, K2 and mixed K1M keys.
– Obit for S. Tuck (Mrs. Francis A. Harris, Pasadena, CA., Jan. 25, 1968, age 95).
– Zembie – Solution to a puzzle cipher from Sir George Ashton’s book, shown in the last issue. Includes a good step-by-step process description for the solution.
– Mi Tai Tai – Reminder Corner – Fractionated Morse.
– The Analyst’s Corner – Marshen – Analysis of the Phillips cipher.

May-June
– Obit for Mi Tai Tai (Nom taken from Chinese characters, age 59, Feb. 22, 1968, from cancer). Buried in Arlington, next to her husband, a Marine killed in New Caledonia during WW II. Worked in the U.S. Civil Service Commission as a psychologist and specialist in test construction. Responsible for the closing of fraudulent test schools. Had been current editor of the Cm.
– Machiavelli – Recovering K3 keywords.
– Reminder Corner – Patristocrats.
– Analyst’s Corner – Galupoly – Bifid.

July-Aug.
– Ab Struse – Points out an error in The Codebreakers. Kahn quotes an article on the “Wheatstone Devices” (Playfair?), saying that the author GPB is Charles Babbage. This turns out to be wrong. It’s actually George Parker Bidder, “writer on cryptography.” No other works known by him, but his father, GPB, Sr., was a more prolific writer and engineer.
– Machiavelli – K3 recovery, part 2.
– Reminder Corner – Complete and Incomplete Columnar Transposition.
– Analyst’s Corner – Aloha – Quagmire III, CM Bifid.
– According to reports, among the stuff found in Col. Rudolph Abel’s apartment, the FBI came upon a copy of Elcy (the ACA publication Elementary Cryptanalysis).

Sept.-Oct.
– Machiavelli – Use and recovery of K4 keywords.
– Zembie – The Casanova cipher. Mentioned by William Friedman in a journal called Casanova’s Gleanings (1961). No solution printed in English to date.
– Crotalus – Entering the Morbit with plaintext “H”. Crotalus mentions that Morbit was first introduced by Eureka in JF64, and quickly became popular.

Sept.-Oct.
– Analyst’s Corner – Solving Fractionated Morse without tips.
– Reminder Corner – AMSCO. Look for all 1 and 2-letter groupings of the crib within the crypt. Use this generally to eliminate shiftings. (“cr i b?” compared to “?c r ib” and “c ri b”)

Nov.-Dec.
– Reminder Corner – Nihilist Transposition.
– ACA convention notes – The ACA confirmed to be an NPO, so no longer accepting paid advertising.
– Analyst’s Corner – Dorje – Playfair. Machiavelli – Nicodemus.
– Zembie – Sherlock Holmes, Cryptanalyst. Quotes Holmes on his own prowess, w/ciphers, and gives example from The Adventure of the Gloria Scott.

1969

Jan.-Feb.
– Fat Dragon – A Russian Revolutionary cipher. Introduction of the cipher message saying that the Czar and his family had been assassinated, printed in a German magazine. The crypt was reproduced, but not the type or the Russian plaintext. Dragon attempts to solve it, with the answer in the next issue.
– Triode – Thoughts on the Keyphrase cipher.
– Reminder Corner – Xenocrypts.
– Analyst’s Corner – Je Sauris – Quagmire IV.
– Logone Baseten – Use of Fibonacci Numbers in Cryptography. Suggestion for using Fibs for random number generation for Nihilists and Caesars.

Mar.-Apr.
– Dumbo – Introduction of GROMARK.
– Reminder Corner – How many ways to mix an alphabet.
– Machiavelli – K-4 use and recovery for Quagmire IV.
– Ab Struse – Proposes a “Half-Vigenere” cipher. First half of the text uses Vigenere, second uses simple substitution. Not adopted.
– Analyst’s Corner – CM Bifid, Quagmire I, Bifid.

May-June
– Machiavelli – Alphabet recovery in Quag. IV mixed.
– Reminder Corner – Playfair.
– Fat Dragon – Russian Revolutionary Cipher, part 2. Nihilist substitution, period 12, key = Ekaterinberg.
– Obit – General Ralph J. Canine. Past NSA director. March 1969. Wrote letter of commendation to the ACA members for their contributions to cryptography.

July-Aug.
– B. Natural – Introduces the Tri-Bac cipher. It’s a triplet version of Baconian.
– Dumbo – GROMARK part 2.
– Why keyphrase makes for a poor useful cipher type. (It can be unreadable even for the recipient.) The editor admits its uselessness, but says the ACA will keep using it in the Cm because it’s good for bringing in new members.
– Reminder Corner – Foursquare.
– Analyst’s Corner – Marshen – Grandpre.

Sept.-Oct.
– Marshen – Analysis of the Casanova Cipher.
– Editor says GROMARK is popular.
– Reminder Corner – Keyphrase.
– Fiddle – Extended Baconian. Proposes a Morse code-like 5 character alphabet which can encode the full alphabet and 2-9.
– Ledge – Additional note of Tri-Bac.
– Obit – Knute (Adolph Deonier, June, 1969). Invented Digrafid.
– Analyst’s Corner – B. Natural – Fractionated Morse, Quagmire IV.
– Sancho Panchez – Edgar Allen Poe alias William LeGrand in the Gold Bug. Speculates that Poe had created a joke name for (Will)I am (Le)Grand.
– Oedipus – Proposed name for solving all secret writing, riddles and anagrams = “Reconstruct.”

Nov.-Dec.
– Ipsoot – The solution of short-word Aristos, focusing on “C”.
Vallejo Mass Murder Threat fails. Mention of 3 crypts sent to 3 newspapers. Messages solved by a history teacher and his wife. No culprit found. Full plaintext in Caesar shift in the next issue of the Cm.

1970

Jan.-Feb.
– Barge – 5×5 Quagmires introduced. Not adopted?
– Ishcabibel married Oct. 22, 1969, to Susanne of Vienna. Both living in Germany now.
– Second set of letters received from “Vallejo” (Zodiac) author.
– Obit – William Friedman (Nov. 2, 1969). Never active in the ACA, but was an honorary lifetime member, and did give part of his library to the ACA to auction off in 1960.
– Logone Baseten – Two Svekus ciphers review. Oliver Svekus wrote a small book on ciphers in Hungarian in 1964 (“Secret Writings“). One suggested new cipher type is based on Braille. Second on multiplying the pre-agreed number values of the letters against the previous letter value. Example: Say the letters are a=16, b=22, c=12, d=24, e=18, f=17, and the primer is 28. The word “fade” = 28*17, 17*16, 16*24, 28*18 = 376 272 384 432.
– Analyst’s Corner – Ledge – Ragbaby.
– Marshen – Checking the numeric key of a GROMARK cipher.

Mar.-Apr.
– Cover Ornamental? – The Casanova Pyramids, by Zembie. This is a pyramid method for applying Vigenere-family tables.
– The editor suggests that Keynotes for Aristocrats may be discontinued.
– Zembie – Continued analysis of Casanova as a cryptographer, and use of the Casanova Pyramid approach.

May-June
– Cover Ornamental? – Fire-O – Multiplicative structures.
– Obit – Oedipus – (Charles Jacobsen, Jamaica NY, Mar. 18, 1970, age 89).
– Fire-O – A Tool for Cryptarithms – Multiplicative structures (basically, tables showing dependencies between digits being multiplied together).
– Machiavelli – Solving the Redefence Cipher.
– Analyst’s Corner – Je Saurais – Foursquare.
– Bassett – Letter frequencies in Vigenere Auto-encipherment.

July.-Aug.
– Rogue – General probabilities of part naturals in Bifids and Trifids, with tables.
– Ledge – Starting the Novice Notes department. Beginning with Complete Columnar Transposition.

Sept.-Oct.
– Ab Struse – What happened to Paul Friedmann? This is an analysis of errors in The Codebreakers regarding Friedmann, a cryptologist and biographer (Queen Mary and Anne Boleyn) in the mid to late 1800’s. He tried colonizing Jews in Palestine, then controlled by the Turks, but was thwarted. Nothing more is known of him after this. Date of death unknown.
– Novice Notes replaces the Reminder Corner. Subject is the Nihilist Transposition.
– Rogue – Specific Probabilities of Part Naturals in the Bifid and Trifid.
– Fiddle – An Armenian Cipher. Used by a 16th century scribe in Armenia, mentioned in The Codebreakers. The cipher uses the Greek alphabet such that the sums of the position numbers of two letters equals the plaintext letter (a=1, b=2, g=3, d=4, e=5, z=6; AE = BD = GG = Z.)

Nov.-Dec.
– Current Cm editors – Rogue and Koshka. President – Bassett.
– Novice Notes – Incomplete Columnar Transposition.
– Sancho Panza – An Unnoticed Anagram in Poe’s “Some Words With a Mummy.” Sancho comments on authors inserting themselves in their stories by anagramming a character name. Cervantes apparently did this in Don Quijote. The main character in Mummy is Dr. Ponnonner. If the n’s are nulls, we get “Pooer,” anagram of “Or Poe.” The mummy is named Allamistakeo.
– Ishcabibel – A German Diplomatic Cipher. Description of a weak German cipher used in 1898. It’s a Beaufort Variant with a repeating keyword, and normal alphabets. Very easy to break.

Thinking About Encryption, Part 76


More Thoughts About Non-decimal Cryptarithms

I’ve been using my auto solvers for cryptarithms for a year now. They’ve been doing a pretty good job so far, although I’ve been noticing certain mistakes I make in preparing the CONs for parsing, such as adding “one word” or “two words” for the key hints. My parser doesn’t know what that means, and that throws off the keys that are printed out when the CON is solved (I need these parts, though, for confirming I’ve recovered the keys correctly at the end). The big issue is that sometimes the parser has problems with turning cube root equations into the form used by the solver, which either crashes the solver, or results in “solution not found” messages. Unfortunately, the problems occur rarely enough to not justify spending the time required to fix them, and it’s just easier to hand massage the output from the parser before sending it to the solver. Overall, the parse is “good enough.”

The more pressing issue is the prevalence of base 12 and higher CONs in the Cm newsletters. The permuting incrementer I use in the cryptarithm solvers (base-10, and non-base-10 scripts) run comparatively slowly because they are written in VBScript. Cscript is an interpreter, so, yeah, I understand it’s going to be slower than something written directly in C++ or Pascal. I can live with this, mostly, right now, since I’m not a full-time programmer, and I’m not retired. Most base-10 CONs get solved in under 15 minutes, and most base-11 CONs (the few there are) get solved in an hour or 2. So far, I’ve been lucky with base-15 CONs, because the keys used are often two words from the dictionary, and my anagrammer script can pick out all the legal anagram pairs from the dictionary to be fed to a modified version of the solver pretty fast.

It’s the base-12 CONs that are messing me up. They can either be 3 words, no words (random letters) or two non-dictionary words (at least, things not in MY dictionary). In these cases, it can take upwards of 32 hours to solve one CON, and the July-Aug. 2019 Cm had two of them. So far, I’ve written about how to solve cryptarithms through brute force (the incrementer), and through anagramming the letters from the CON. I’ve even walked through the process of hand-solving a twin base-5 CON using pencil and paper. I’ve recently started thinking about one more approach to reducing the solution times for base-12 CONs that don’t fall to the other methods.

My general approach for using brute-force is to start at 0, and then run to the biggest number for the base. That is, for base-5, I’d set the incrementer to 01234 and quit at 43210 if the solution hasn’t been found before that. This is fine for anything up to base-11, because I’m willing to spend the time waiting doing dishes, processing photos in Gimp, or getting ready for work. But, I can use the first part of pencil and paper solving as an assumption when starting the solver.

With the manual approach, the goal is to first identify either 0, 1 or 5. If we have:

ABC + DEF = GHIJ

the largest digits two different letters can be (base-10) are 8 and 9. Even with carry-over, 8 + 9 can’t be bigger than 18 (8 + 9 = 17, 8 + 9 + 1 = 18). This means that in the example, G = 1.

With multiplication, AB * D = D implies that D = 0. This can be found in root calculations, and various normal multiplications when broken down into steps. As with:

ABC * DE = + E; + GHI = GHIE

Here, ABC * D gives us the GHI component, and ABC * E = E is the same as ABC * 0 = 0.
(For ABC * D = ABC, D is obviously 1.)

Or, in the case of roots using the long-hand method, we can have A*A = BA. That is, 5 * 5 = 25. This tells us A = 5.

In the best-case scenario, all three values can be found just by glancing at the construction of the CON. Worst case, none of the values are obvious and will require some serious concentration to identify just one of them. If I’m feeling too lazy, or the CON is outside my abilities, there’s still one more thing left. That is, the rule that no number can start with 0. So, if we have something like:

ABCD * DEF = +GH; +JI; +AK; = DEHIDKA

Then, of the 11 letters, anything at the left of a given group (i.e. – D from DEF) can’t be a 0. We can rule out A, D, G, and J. If, when we compile all the letters in the CON to get the full alphabet, we get, from left to right:

ABCDEFGHJIK

if we’re going to start the incrementer with 0123456789AB, then there may be an advantage to moving A, D, G and J to the right of the string (BCEFHJIKADGJ) in the hopes that B is our 0.

BUT, if we know that A = 5, C = 1, and G = 0, then starting our incrementer at 0152346789AB (for a base-11 CON), and massaging the alphabet string into:

GCABDEFHIJK

should help the solver find a solution in a fraction of the time it would otherwise take. Especially for base-12 and -13 CONs. Anything larger than that will still be prohibitively time consuming. If those CONs don’t fall to anagramming, I’m most likely to just skip them and focus more on tackling regular cipher types I haven’t tried solving yet.

Note: Conversely, if the letters for the above CON come out in the order ACGBDEFHIJK, I could manually start the incrementer at 5102346789AB, and still find the answer in the same amount of time.

Wiggles, part 69


Just a little ongoing story to give you something to play with until the next blog post.

U ZWGR S NSUT CZ XSFJQ XWGN MBUJW LW SYSP ZTCL RXW YUFJCY, SFJ SQ U GCCEWJ VSOE, U QSY RXW VCP BQW S VTCCL XSFJGW CT QCLWRXUFM RC ABUOEGP NBQX RXW RCN CZ RXW GSJJWT CHWT QC UR YSQ FCY GWSFUFM SMSUFQR RXW VBUGJUFM CNNCQURW RXW SGGWP. XW OGCQWJ RXW YUFJCY SFJ RXW TCCL JSTEWFWJ ZBTRXWT. QCCF SZRWT, RXWTW YSQ S OGUOE SFJ S QLSGG VWSL CZ GUMXR QRTWSLWJ ZTCL VWRYWWF RXW ZUFMWTQ CZ RXW MUTG SQ QXW XWGJ XWT XSFJ CHWT SFCRXWT ZGSQXGUMXR. U GCCEWJ VSOE; RXW YUFJCY XSJ VWWF NSUFRWJ CHWT CT QCLWRXUFM. U OCBGJF’R QWW GUMXR OCLUFM RXTCBMX ZTCL CBRQUJW. “LSLS” YSQ XCGJUFM XWT XSFJ BN UF S EUFJ CZ “YSUR ZCT UR” QUMFSG, RUGRUFM XWT XWSJ RCYSTJQ RXW MGSQQ NSFW. SZRWT S ZWY QWOCFJQ, QXW HUQUVGP TWGSIWJ, GCYWTWJ XWT XSFJ SFJ FCJJWJ RC RXW MUTG, YXC GWSFWJ JCYF SFJ ZGUNNWJ S QYUROX CF QCLWRXUFM CF RXW ZGCCT.

“Russian” Cable


In one of the ACA Cryptogram newsletters, from the 1970’s archives (Jan.-Feb., 1975), there’s a reprint of what was purported to be an old cable from the Russian government to its citizens containing instructions for how to celebrate its 250th anniversary. You are to cut on the vertical lines, and rearrange the strips to form the message. Initially, this was thought to be a cipher, or at least a brain twister.

 

 

 

 

 

 

 

 

 

 

 

But, probably not.

Thinking About Encryption, Part 75


Twin 5×5 Bifid

After finishing the 6×6 Bifid in the May-June, 2019, issue of the ACA’s Cryptogram (Cm) newsletter, I was pretty satisfied with my solve rate, at 72 out of 104 CON, given that I’ve only been doing this since Aug. 2018, when I’d started out with exactly 50 CONs solved. In the MJ2019 Cm, what I’d not solved were the 12 xenocrypts (CONs in other languages), 5 CONs from the expert corner, a handful of various specials, and 8 Cipher Exchange CONs for types I haven’t tackled yet. At the beginning of July, I was thinking that this was good enough, and that I’d send in my solutions then proceed to the JA2019 issue. I compiled a list of MJ2018 Cipher Exchange types that I don’t know yet, showing Quagmire I, Quagmire II, Twin Bifid, Quagmire III, Digrafid, Beaufort Slidefair, Grandpre and Phillips. The Expert’s Corner included Quagmire II and CM Bifid. And one of the authors, Funereally, submitted a specials triplet consisting of a Twin Bifid, a Twin Trifid, and a Twin Digrafid.

Looking these over, and having just finished the 6×6 Bifid, I was thinking that maybe I could make some progress on the Twins. Unfortunately, that would mean writing solvers for regular Trifids and Digrafids first, but Trifid is not that much different from Bifid, which made it look a bit more attractive. Then I got to an article in the Cm archives describing Twin Bifid, and I figured I’d at least try writing an analyzer for that first. I got the analyzer script up close to where I could prepare the results for the 5×5 Bifid solver scripts I’d already finished, and then I went out and bought a used copy of Dragon Quest Monsters, Joker 3 for the Nintendo 3DS. 6 weeks passed while I played that.

It wasn’t until August 12th that I reached a point where DQM:J3 got boring, and I turned back to Twin Bifid. By then, there was so little time until the August 31st deadline for sending in the MJ2019 CON solutions (I don’t want to send them in right at the last moment, because that’s a jerk move) that I decided I’d give up on the Trifid and Digrafid types, and if I couldn’t solve the one regular Twin Bifid (E. 17) within 24 hours, I’d stop and settle for my 72 solves for the issue.

Twin Bifid is not so much a cipher type as it is an alternative to providing a crib to assist in cracking the crypt. Recall that Bifid uses a 5×5 or 6×6 key square, with the keyed alphabet written in using any route transposition route you want (rows, columns, diagonals, spirals). The rows and columns of the square are numbered, and you write the row and column numbers vertically in pairs under the plain text in period lengths. You take the cipher text off in row pairs, wrapping at the end of the period block, look up the numbers in the square and write down the corresponding square letters in period length groups. Using period 5:

. 1 2 3 4 5
. ---------
1|C H A R M
2|B D E F G
3|I K L N O
4|P Q S T U
5|V W X Y Z


thisi sates t
41343 41424 4
42131 33433 4


41 = P, 34 = N, 34 = N, 21 = B, 31 = I

Gives:
PNNBI PQSNL T

Solving Bifid with a crib requires that you first place it correctly within the cipher message. This can either be given to you by the author, or you can hope for a natural (where the cipher components encrypt the plaintext letter to itself, such as what we get with the last “T” of the crypt) that aligns with the crib. That is, if the tip is “??tes t”, we’d first check whether

PQSNL T
..tes t

gives us a reasonable reconstructed 5×5 alphabet square. Then, we set up a series of equivalence equations.

P1 P2 Q1 Q2 S1 . T1
S2 N1 N2 L1 L2 . T2


.. .. t1 e1 s1 . t1
.. .. t2 e2 s2 . t2


q1 = t1
n2 = t2
q2 = e1
l1 = e2
l2 = s2

Obviously, we need a relatively long crib for this kind of cipher.

Now, with Twin Bifid, instead of a crib, we’re given two sentences that are encrypted using the same 5×5 (or 6×6) square and the same key, but with different period lengths (the ACA guidelines say they can’t both be even lengths). We’re also told that a certain number of letters in the plaintext messages are the same (100-150 characters long, a minimum of 18 letter repeats).

Say we have the following two sentences, the first with period 5 and the second with period 8:

LHOUI EDBMD YOETC IQSMU ECKOI OMYUQ XGMVM EGCNA GC
LHOIYERM PYOEDMVM DDZTMUEG IPLMMZYH BOXGUWTC ISOSQPRX XWRDIEPN AMEWUF

We’re told that the first 18 letters are in common. While this isn’t the same as having a real crib, it’s enough to give us a start on recreating the alphabet square,

The first step I used is to write down the “1/2” values for the letters for the full groups containing the common letters for both sentences.

L1 L2 H1 H2 O1 . E1 E2 D1 D2 B1 . Y1 Y2 O1 O2 E1 . I1 I2 Q1 Q2 S1
O2 U1 U2 I1 I2 . B2 M1 M2 D1 D2 . E2 T1 T2 C1 C2 . S2 M1 M2 U1 U2


L1 L2 H1 H2 O1 O2 I1 I2 . P1 P2 Y1 Y2 O1 O2 E1 E2 . D1 D2 D1 D2 Z1 Z2 T1 T2
Y1 Y2 E1 E2 R1 R2 M1 M2 . D1 D2 M1 M2 V1 V2 M1 M2 . M1 M2 U1 U2 E1 E2 G1 G2

If we take out the group separators (“.”), we can see that the top line of sentence one corresponds to the top line of sentence two,

L1 L2 H1 H2 O1 E1 E2 D1 D2 B1 Y1 Y2 O1 O2 E1 I1 I2 Q1 Q2 S1
L1 L2 H1 H2 O1 O2 I1 I2 P1 P2 Y1 Y2 O1 O2 E1 E2 D1 D2 D1 D2 Z1 Z2 T1 T2

and the same thing for the bottom line.

O2 U1 U2 I1 I2 B2 M1 M2 D1 D2 E2 T1 T2 C1 C2 S2 M1 M2 U1 U2
Y1 Y2 E1 E2 R1 R2 M1 M2 D1 D2 M1 M2 V1 V2 M1 M2 M1 M2 U1 U2 E1 E2 G1 G2

So, I’m going to trim them all down to our hint size of 18 characters.
(top paired)
L1 L2 H1 H2 O1 E1 E2 D1 D2 B1 Y1 Y2 O1 O2 E1 I1 I2 Q1
L1 L2 H1 H2 O1 O2 I1 I2 P1 P2 Y1 Y2 O1 O2 E1 E2 D1 D2

(bottom paired)
O2 U1 U2 I1 I2 B2 M1 M2 D1 D2 E2 T1 T2 C1 C2 S2 M1 M2
Y1 Y2 E1 E2 R1 R2 M1 M2 D1 D2 M1 M2 V1 V2 M1 M2 M1 M2

Now, this gives us the correct format for creating the equivalency equations. We can ignore anything where a letter-digit pair equals itself.

E1 = O2 = Y1 = U2
E2 = I1 = M1 = C2
D1 = I2 = R1
D2 = P1 = Q1
T1 = M2 = S2
B1 = P2
U1 = Y2
B2 = R2
T2 = V1
C1 = V2

From here, everything is exactly the same as for solving 5×5 Bifid. The only difference, script-wise, is that I needed to modify the code to print out the partial plaintext of two messages at the same time, instead of just the one. That was a trivial thing to write up, but it did justify having two separate dedicated scripts, rather than trying to shoehorn the Twin Bifid code into the Bifid script.

It took me a few hours to remember what I was thinking when I dropped my script and started playing Dragon Quest Monsters, and I had a couple bugs that gave me headaches until I squashed them. After that, I needed less than half an hour to solve E-17 and recover the keyword. What I found extremely funny was that I’d just finished writing up the book review for The Chinese Black Chamber, with its reference to Pearl Buck’s The Good Earth as a key text for a Chinese book cipher, and E-17 contained a quote from Pearl in the second sentence (with attribution). That was an interesting coincidence. And now I get credit for solving 73 of 104 CONs for MJ2019.

Overall, Twin Bifid is no harder to crack than a regular Bifid is, and the methods are almost the same.

If you want to know what the plaintext is for the example above:
inawo rldof extre mesno rmali tyise xtrem elyra re
inaworld ofextrem esyouwou ldthinkt hatextre mesports wouldbet henorm


Summary:

1) Twin Bifid is just the regular Bifid applied to two plaintext messages using two different period lengths.
2) The ACA guidelines state that the periods shouldn’t both be even.
3) Some section of the two plaintext messages should contain the same text (either at the beginning of both sentences, at the end, or in the middle). The guidelines state the text should be 100-150 characters, with a minimum of 18 repeated characters.
4) One approach to solving a Twin Bifid is to write out the letter-digit pairs for the groups containing the crib, pairing the upper and lower groups of the two sentences, and trimming the strings to the length of the hint.
5) Use the trimmed groups for sentences one and two to create the equivalency equations, and solve for the keysquare as you would with regular Bifid.
6) Twin Bifid isn’t really intended for secure cipher use, so there’s little point in discussing hardening methods. See 5×5 Bifid for suggestions.

Wiggles, part 68


Just a little ongoing story to give you something to play with until the next blog post.

MYT LGMNJJTNWTL IJ PYT DNLLTW NBL GBPR N ZGBLRZ RB PYT MTCRBL EDRRW. RPYTW PYNB N DGPPDT CWTNOGBQ, YTW CDGFS ZNM NDFRMP MRIBLDTMM. G CWNLDTL FK SIF NWF N SGP ZGPY PYT IJJTW JNWP RE FK PYGQY NM G ZTBP IJ, FNOGBQ YRROGBQ, QWNSSGBQ FRHTM ZGPY FK QRRL YNBL RB PYT ZNK. PYT DNLLTW ZNM JWRJJTL NQNGBMP PYT ZNDD BTAP PR PYT RJTB ZGBLRZ, NBL TGPYTW SK DICO RW QRRL JDNBBGBQ, ZNM RB PYT MGLT CDRMTMP PR FK SNL NWF. G MPICO FK DTQ GB PYWRIQY PYT RJTBGBQ EGWMP, OTTJGBQ FK LTNPY-QWGJ RB PYT DNLLTW, MPNSGDGXTL FKMTDE NQNGBMP PYT EWNFT, NBL NZOZNWLDK MVITTXTL PYT WTMP RE FKMTDE GBPR PYT GBOK SDNCOBTMM. G ZNMB’P NBKZYTWT BTNW NM TDTQNBP RB FK TBPWK NM MYT ZNM, SIP G JWGLTL FKMTDE RB BRP ENDDGBQ MCWTNFGBQ PR PYT QWRIBL STDRZ.

Kumiko Coaster


Back a few months ago, I was reading the latest C.M.B. manga, and in it was a reference to Hida Kumiko.

Kumiko is the Japanese woodworking craft of precision cutting so that nails and glue aren’t needed. Hida is a city in Gifu Prefecture, where the craftsmen perfected Kumiko.

I located the Hida Kumiko website, and decided recently to buy one of the smaller items they have there – a snowflake-style coaster for 1,050 yen (plus 200 yen for the money transfer fee). About $10 USD.

There are 4 designs, as shown on the box, and they’re all the same price. The instructions are pictorial only, so you don’t need to read Japanese to put this together.

Took me about 10 minutes because I wasn’t sure what I was doing. Now, I can probably finish this in under 3 minutes. But, taking it apart and putting it together too much will loosen the pieces so they won’t fit as tightly anymore.

The pieces are lightweight unfinished cedar. Smells great and was fun to assemble.

(The more elaborate tables and lamp frames are between $300 and $500, and are custom orders.) Pretty cool.

Makes a great coaster, or hotplate holder. Now, I really want the interlaced weaving one, but I have no place to keep it… ;-(

Thinking About Encryption, Part 73


Periodic GROMARK

After having finished the last write-up for GROMARK, I did decide to continue on to Periodic GROMARK. In part, this was because the same issue of the Cm, May-June 2019, also had a Periodic GROMARK CON in it, and I figured I might as well try getting credit for it when I submitted my solutions before the Aug. 31st deadline (I’m writing this in July).

There are a couple differences from regular GROMARK. First, instead of using a separate 5-digit primer for generating the running key, PG takes the letter order from the key used for creating the K2M alphabet, which also means that the length of the primer is variable. That is, if the K2M keyword is “KEYWORD”, then the letter order is “3276451” and the period will be 7.

The official ACA guidelines don’t give recommendations for period width, but one Cm article said it shouldn’t be greater than 9, which is reasonable given the next step.

Write the rest of the alphabet under the keyword, in rows. Note that if the period gets too long, the columns shorten out too much, and there’s not as much point to using the offsets that are coming up.

3276451
-------
KEYWORD
abcfghi
jlmnpqs
tuvxz

Write out the unkeyed plaintext alphabet, and under that write the K2M alphabet (the columns in ascending order of the keyword letters) and the plaintext alphabet locations for the K2M column letter starts.

ABCDEFGHIJKLMNOPQRSTUVWXYZ
diseblukajtogzprhqwfnxycmv
0..3...7...1...1..1...2...
...........1...5..8...2...

Notice that each number is under the associated letter of the K2M keyword (k = 7, e = 3, y = 22, etc.) These are the offsets we will apply to each word in the plaintext, and to each letter for that word. Now, write out the plaintext in period-length groups under the running key. Then repeat the keyword above the plaintext period groups.

(k +7). (e +3). (y +22) (w +18) (o +11)
3276451 5930966 4239520 6524726 1761987
thehist oryofth eworldr eportsm anystra


(r +15) (d +0). (k +7). (e +3). (y +22)
8370755 1077206 1749267 8131835 9449184
ngethin gsbutno sostran geasthe legendo


(w +18) (o +11) (r +15)
3830927 1139198 2420
twinkle toesthe bear

Starting with “T” in the plain alphabet, count 3 + 7 letters to the right, wrapping as necessary, to get to “E” in the K2M alphabet. For “H”, count 2 + 7 to the right, to “H”. And repeat for the rest of the message, changing offsets for each period group as you go. Add the primer to the left, and the last digit of the running key to the right to get the final crypt.

3276451 EHWNFBI YEBQQSH BNPYGIP SGAPWGT
GLRBPTW TMDAESK KWAIXPN DSEJDPI QAUYBPG
HBUJTKZ ZYELOLE LDWGLIC WCQU 0

And we’re done. Deciphering works in reverse.

Bruteforce solving of Periodic GROMARK can be even easier and faster than with plain vanilla GROMARK. In plain G, the groups are fixed at 5-wide, and there’s no hint to the length of the keyword. This means that a dictionary search on the keyword needs to check every entry in the file (my default dictionary file is at 220,000+ entries). Since I’m writing in VBScript, which is inherently slow, it can take a couple minutes to go through the entire file before failing to find a match. But with PG, the keyword sets the primer width, as well as acting as the primer value itself. So, if the primer is 7 digits long, the K2M keyword (after removing the repeated letters) must also be 7 letters long. The advantage here is that I only have to test the CON on 7-letter words (which could be preloaded into a dedicated file just for solving Periodic GROMARKs.

Further, the primer is handed to us as part of the CON, so it’s a simple matter to take a word from the dictionary, remove the repeated letters, and get the letter order from the result to generate a test primer. If the test primer and the primer from the CON don’t match, skip that word and go to the next one. By weeding out all the dictionary words I don’t have to use for testing on the CON, I can cut the testing time down to 1 or 2 seconds.

The Periodic GROMARK CON in the May-June Cm was marked as one of the harder crypts in the issue, at #24 of 25 total, mainly because there was no crib for it. So, I just set my script to print out the results of testing every single probable keyword (7-letter dictionary words that generated a test primer matching the primer in the CON), preparing myself to wade through hundreds of lines of garbled text. In fact, there were only 3 words with the correct test primers, and of them the first one generated enough plaintext to give me a usable crib. The second result was the correct keyword itself, and the third result was just garbage. So, in less than a second, I had my solution. Compare that to the regular GROMARK cipher, where the answer would have taken closer to 1 minute to find.

Of course, the dictionary word search only succeeds if the K2M keyword is in the dictionary. If it’s a phrase, proper name or foreign word then one of the other approaches needs to be used. Right now, I’m not prepared to go the pencil and paper route, which is in fact harder than for GROMARK, because I don’t know all the steps yet. The alternative is to use a permutating incrementer. This is easy enough, since we know the expected keyword width, and we just have to run from “ABCDEFG” to “ZYXWVUT”. We can skip repeated letters, and apply only those keys that generate the matching primer value. Right now though, my script solved the May-June CON, and there’s no Periodic GROMARK in the July-Aug. issue of the Cm. I’ll wait until I encounter a PG crypt my present script can’t solve, and add the incrementer function then.

Summary:
1) Periodic GROMARK is a polyalphabetic substitution type based on the vanilla GROMARK.
2) The plaintext is divided up into groups the width of the K2M keyword.
3) The primer is the letter order of the keyword (TEACHER = TEACHR = “631245”).
4) The positions of the keyword letters in the K2M alphabet are used for the group offsets.

ABCDEFGHIJKLMNOPQRSTUVWXYZ
diseblukajtogzprhqwfnxycmv (KEYWORD)
0..3...7...1...1..1...2...
...........1...5..8...2...

5) The ciphertext values are generated the same as for GROMARK, but with the addition of the group offsets.

(k +7). (e +3). (y +22) (w +18) (o +11)
3276451 5930966 4239520 6524726 1761987
thehist oryofth eworldr eportsm anystra
EHWNFBI YEBQQSH BNPYGIP SGAPWGT GLRBPTW

6) The final cipher message starts with the primer. It is followed by the cipher text grouped in keyword length units. And the last digit of the running key is appended as a check digit.
7) Deciphering is just the reverse process.
8) Solving Periodic GROMARK can be as simple as doing a dictionary look-up on the K2M keyword, skipping testing any words that are the wrong length, or generate the wrong primer.
9) An alternative bruteforce method includes using a permutating incrementer for the K2M keyword. I don’t know about a pencil and paper method yet.
10) Again, the Periodic GROMARK is very insecure as-is. Strengthening it could include hiding or not publishing the primer, and adding a transposition step.

Wiggles, part 67


Just a little ongoing story to give you something to play with until the next blog post.

UZY VADRZABMZU RSQEM DOGQEN UG HGBEU UGSDONR SZDU QRQDAAK SGQAN TY UZY YWHAGKYY’R RHDFY, GO BELYEUGOK TDFIOGGW. B UQOEYN GE WK GSE ABMZU DEN VGAAGSYN ZYO. RZY NBNE’U FGWWYEU GE UZY YPUOD TYDW, DEN B MQYRRYN UZDU RZY ZDN ABUUAY VYDO GV DEKGEY HDRRBEM TK GQURBNY JQYRUBGEBEM SZDU WBMZU TY MGBEM GE BERBNY D RQHHGRYNAK-YWHUK RUGOY. SY ZYDNYN NGSE D RZGOU ZDAASDK, HDRU D NGGO WDOIYN “UGBAYU,” DEN D UBEK IBUFZYEYUUY, UG D ZYDLK VBOY NGGO DU UZY TDFI SDAA. UZBR GHYEYN QH GE DE YPUOYWYAK EDOOGS DAAYK TYUSYYE UZY TQBANBEMR. D RZDOYN NQWHRUYO FAGRY UG UZY RBNYSDAI SDR GE XQRU UZBR RBNY GV D SGGNYE-HADEI MDUY BEUYENYN UG IYYH RUODEMYOR VOGW UGRRBEM UZYBO UODRZ BEUG UZY NQWHRUYO VGO D VOYY HBFIQH. WDWD RBAYEUAK FAGRYN UZY NGGO, SBUZ UZY NYDNTGAU DEN WDBE ADUFZ QEAGFIYN. UZY DAAYK AYDNBEM NYYHYO BEUG UZY DOFDNY SDR HDOUBDAAK TAGFIYN TK DE DAQWBEQW ADNNYO AYDEBEM DMDBERU UZY OBMZU-ZDEN TQBANBEM. RZY UQOEYN TDFI UG WY DEN SZBRHYOYN, “B ZGHY KGQ’OY QH UG UZBR. HAYDRY UOK UG EGU SDIY UZY EYBMZTGOR.”