Wonderful news – a long-standing cipher mystery (to be precise, a pair of them) has been broken!

Today I received a message from David Vierra announcing that he had broken Feynman Ciphers #2 and #3, and including a link to his blog post including all the technical details. He noted:

They both use the same method, which uses two monoalphabetic substitutions and alternates between them after each word. Each word which has an even number of letters is written in reverse. Cipher #2 is from A.E. Housman’s poem “Terence, This is Stupid Stuff”, and #3 is the starting words of Feynman’s own paper on “Atomic Theory of the lambda Transition in Helium”.

So, let’s have a closer look:

Feynman Cipher #2

Here’s the ciphertext:

XUKEXWSLZJUAXUNKIGWFSOZRAWURORKXAOSLHROB
XBTKCMUWDVPTFBLMKEFVWMUXTVTWUIDDJVZKBRMC
WOIWYDXMLUFPVSHAGSVWUFWORCWUIDUJCNVTTBER
TUNOJUZHVTWKORSVRZSVVFSQXOCMUWPYTRLGBMCY
POJCLRIYTVFCCMUWUFPOXCNMCIWMSKPXEDLYIQKD
JWIWCJUMVRCJUMVRKXWURKPSEEIWZVXULEIOETOO
FWKBIUXPXUGOWLFPWUSCH

To decipher this, use one of the two following cipher alphabets:

Plain:       ABCDEFGHIJKLMNOPQRSTUVWXYZ
Alphabet 1:  MANYREQUS.HVBCID.OLWGZX.K. 
Alphabet 2:  JHAZTENYXMLOCUFBQVKPSGW.D.

According to David’s blog post:

The first word of each sentence (or line of poetry) is always enciphered using Alphabet 1, which leads to occasional cases of Alphabet 1 being used for two words in a row. Words having an even number of letters are written in reverse.

OK, so let’s try the first line as a worked example:

XUK — EX — WSL — ZJUAXUN — KIG — WFSOZ — RA

[1] WHY — [2] FI — [1] TIS — [2] DANCING — [1] YOU — [2] WOULD — [1] EB

Note that the two even-length words here are FI (if) and EB (be), which is why they’re reversed. Continue with this process for the rest of Feynman Cipher #2 and you get a section from A. E. Housman’s “Terence, This is Stupid Stuff” (1896):

Why, if ‘tis dancing you would be,
There is [sic] brisker pipes than poetry.
Say, for what were hop-yards meant,
Or why was Burton built on Trent?
Oh many a peer of England brews
Livelier liquor than the Muse,
And malt does more than Milton can
To justify God’s ways to man.
Ale, man, ale’s the stuff to drink
For fellows whom it hurts to think

Feynman Cipher #3

The ciphertext here looks like this:

WURVFXGJYTHEIZXSQXOBGSVRUDOOJXATBKTARVIX
PYTMYABMVUFXPXKUJVPLSDVTGNGOSIGLWURPKFCV
GELLRNNGLPYTFVTPXAJOSCWRODORWNWSICLFKEMO
TGJYCRRAOJVNTODVMNSQIVICRBICRUDCSKXYPDMD
ROJUZICRVFWXIFPXIVVIEPYTDOIAVRBOOXWRAKPS
ZXTZKVROSWCRCFVEESOLWKTOBXAUXVB

As David Vierra discovered, this was enciphered using exactly the same method and alphabets as #2, yielding cleartext from near the top of Richard Feynman’s 1953 paper on liquid helium:

The behavior of liquid helium, especially below the lambda transition, is very curious. The most successful theoretical interpretations so far have been largely phenomenological. In this paper and one or two to follow, the problem will be studied entirely from first principles.

So… Who Was The Encipherer, Then?

The cipher system itself is a pretty sadistic combination of substitution (multiple cipher alphabets) and transposition (reversing even-length words), so you can bet that the person who devised it was chortling really hard into their hand when they passed it to Richard Feynman.

Also, Feynman only started working with liquid helium once he moved to Caltech (and started to get his physics mojo back somewhat, after a very difficult period in his life): and I further think it would be unlikely that the encipherer would have enciphered this prior to 1953.

The person who originally posted the set of three ciphers to Reddit (Chris Cole) had noted:

When I was a graduate student at Caltech, Professor Feynman showed me three samples of code that he had been challenged with by a fellow scientist at Los Alamos and which he had not been able to crack.

People had generally parsed this as “had been challenged with by a fellow scientist [while both were] at Los Alamos” in the 1940s, but now we know that the third challenge cipher of this set could not have been made before 1953, I think we should probably instead parse it as “had [recently] been challenged with by a fellow scientist [who, like Feynman, had been] at Los Alamos“.

The two Olum ciphers (that were cracked by Paul Relkin, who also invested a lot of time trying to find the exact edition of Chaucer used as the plaintext for Feynman Cipher #1, which in fact Relkin found out in 2017 had been from one transcribed in the 1930s by F. N. Robinson) were from Paul Olum to Richard Feynman: Feynman’s notes on these ciphers are in his Caltech papers.

With part of Feynman’s 1953 paper as the plaintext to cipher #3 and its wrapper story handed down by Chris Cole, there seems little doubt that this is indeed a set of challenge ciphers targeted specifically at Feynman, just as Feynman had said to Cole. By way of contrast, it seems likely that the original Olum ciphers (from the August 1943 date of the plaintext) were made between August 1943 and 1945.

But was it Paul Olum, as I speculated back in 2021, who was also behind this other set of three ciphers? The problem is that the Chaucer link in Feynman Cipher #1 seems not to point directly at Olum (because his son said he had a different edition of Chaucer); the Housman poem in #2 doesn’t obviously point anywhere; while the 1953 Feynman quotation in #3 points only at the recipient, not at the sender.

My belief is that the Housman poem was probably discussed by Feynman and the encipherer while at Los Alamos, making the reference to it more of a private joke than anything public we can use as a reference.

Ultimately, I think it’s safe to say that Paul Olum remains our strongest candidate, even though we lack evidence. Though… if one day someone happens to look at Olum’s Cornell papers from (say) 1953-1954 and notices a mention of liquid helium and some cipher-like writing, perhaps we will find our smoking gun. Fingers crossed!

Finally, my hearty congratulations once again to David Vierra for his excellent work cracking #2 and #3, well done!

A fascinating email from long-time Cipher Mysteries commenter Paul Relkin has alerted me to a pair of ciphers by mathematician Paul Olum (1918-2001), who knew Feynman at Princeton, and then worked with him at Los Alamos. Sure, you can read Olum’s Wikipedia page, but perhaps the best person to describe him is Richard Feynman himself (in “Surely You’re Joking, Mr Feynman”):

They were all giving me problems and I was feeling great, when Paul Olum walked by in the hall. Paul had worked with me for a while at Princeton before coming out to Los Alamos, and he was always cleverer than I was. For instance, one day I was absent­mindedly playing with one of those measuring tapes that snap back into your hand when you push a button. The tape would always slap over and hit my hand, and it hurt a little bit. “Geez!” I exclaimed. “What a dope I am. I keep playing with this thing, and it hurts me every time.”

He said, “You don’t hold it right,” and took the damn thing, pulled out the tape, pushed the button, and it came right back. No hurt.

“Wow! How do you do that?” I exclaimed.

“Figure it out!”

For the next two weeks I’m walking all around Princeton, snapping this tape back until my hand is absolutely raw. Finally I can’t take it any longer. “Paul! I give up! How the hell do you hold it so it doesn’t hurt?”

“Who says it doesn’t hurt? It hurts me too!”

I felt so stupid. He had gotten me to go around and hurt my hand for two weeks!

So Paul is walking past the lunch place and these guys are all excited. “Hey, Paul!” they call out. “Feynman’s terrific! We give him a problem that can be stated in ten seconds, and in a minute he gets the answer to 10 percent. Why don’t you give him one?”

Without hardly stopping, he says, “The tangent of 10 to the 100th.” I was sunk: you have to divide by pi to 100 decimal places! It was hopeless.

One time I boasted, “I can do by other methods any integral anybody else needs contour integration to do.”

So Paul puts up this tremendous damn integral he had obtained by starting out with a complex function that he knew the answer to, taking out the real part of it and leaving only the complex part. He had unwrapped it so it was only possible by contour integration! He was always deflating me like that. He was a very smart fellow.

Olum I

But back to the recently unearthed pair of Paul Olum’s ciphertexts. The first one surfaced in 2018 at a Caltech exhibition to celebrate what would have been Feynman’s 100th birthday, and then bubbled through into a Reddit post in 2019. This (marked as “Olum I”) included Feynman’s notes on it (character frequency counts etc):

Feynman’s conclusion was that it was probably a “simple substitution [cipher] with some rearranging. The rearranging is not very complete“, and suggested some possible substitutions: “N -> T, G -> K, X -> N, F -> C, D ->G, (U -> W)?“. Though, as seems to have been the case fairly often, he didn’t quite get the better of Olum here.

If you want to have a tilt at Olum’s first windmill, the Reddit poster (“V sbyybjrq gur ehyrf”) transcribed its 744 characters as follows:

VEWLJ NBBEL QFWSX HBUSW AIBYQ AEQSI GHOVN BSNBV LNWXA BIQIU BGBIC YQFXC EVBWX WBSNG WVEVL HWDHB ILMHB LNSGB HSNXS XBHLQ CBOCS OBVWM XFNCW PAGGN EUWGA IBVWI FYWFG GQFEW MPQIX XWSEW VIHAB EBWJX OHAFQ LBBNI BHAIV JNSHC WXPCY UGGOB DWAXB HBWIN XWSNJ GWVAF OXBLM WAEBP BBWXC RBWBV LHIJA JINOW XDBIB QCGYW FXHCQ AIBCW NGCSC SHBNA VIEWD HIBLH EBVVY YSLRQ PQVCQ IWXQE DQBIW XWEAP BHVWS BSBWX VAVHB WFPUH BYWVN BYIOQ WAIFY QDXDB ICLBW YCNEA IBWIN BBWAA CIQIC VWIXQ VCBLH XIBVL AHMFO BXSIX OQBUE PCOVA WMOFV NCWAP GGNEE UWAIW XAWAE EWOLE WESHW FXHEG HCIVB HSWJO ILAWF NDDFQ WDHIL VHBBW AIQBI OUXWS BNIGW VXVQD BVAWI FGWXN VWEPU HYWDB HIMLH BLPNM WVHYP BYWBH AMFXX OSCVN BHCWV NYBIO QWAVI YBQXD LBNDV WCCGN AABXQ VWDBH EILHJ BLNVW VBHAF XOBCB MYWIN SBVOQ WLOHC GGWFB BNSYM DQUBX WSNGB WVWAI VGXHB OJWDB HIBVL HMWBI HIWJG NBFBH DQBIW IBOBJ OHUHV YLQMY WSNSI DFWDD VWEWV HYDLW VWGPW SSHAB ILBWY WJLHD XXSH

Olum II

Olum II (the second ciphertext Olum passed to Feynman) looks to be a pure transposition cipher, though anyone looking at its length (227, a prime number) and hoping for a simple modulo-227 transposition is going to be somewhat disappointed (I tried this to give my suffixity metric a bit of a workout). Note that the 25th character seems to be lower-case ‘f’, though whether or not that is relevant or useful is another matter entirely. Note also that, mathematically, there’s no point doing multiple consecutive modulo transpositions (e.g. modulo 6 followed by modulo 7), because an N-mod-A transposition followed by an N-mod-B transposition is the same as an N-mod-((A x B)mod N)) transposition:

The same Reddit poster (“V sbyybjrq gur ehyrf”) transcribed Olum II’s 227 characters as follows:

EEIOL CNTPA TIILM NIHGU TIGLf OOOHR BYSCD EYGSE EIEEL MERSB ITCBA ANEIT GDSDD OURDM SIOMH ESELE DNSRR NHNIN ATONW AEDSY ROWHE DRTRA SVAWH EODES ETVIF NIEHE TOIGI ELNII TONAR THTHL EULII TAISL SUNFC EAINI ELSLT LBPSN TMTIH SDSIH TREIE NDUET HHIOM EIIAS TVHPF YGSOR NEEII ET

To be honest, I would expect Paul Olum to have rolled out some kind of funky modulo maths trickery here, so my strong suspicion is that this is likely to be a test more of mathematical cunning than of cryptological brains.

Thoughts on this, Nick?

As Paul Relkin reminded me, I once crypto-profiled the author of the Feynman challenge ciphers as being most likelyinterested in snickering into his beard about having pulled the wool over Richard Feynman’s sainted eyes“. And I think you’d have to admit that Paul Olum does seem to match that description well (errrm… apart from the fact he was clean-shaven). Yet proof is wondrously hard to achieve, so for now this remains no more than an interesting possibility.

As for Olum II: nowadays, I wonder whether the right place to start on this kind of complicated challenge transposition would be by searching for it in Project Gutenberg. By which I mean:

  • Get the A-Z frequency counts for the 227-letter challenge cipher
  • Go through all the Project Gutenberg files, converting them to A-Z (and no spaces)
  • For every 227-letter stretch in each file, compare the A-Z frequency counts against the cipher’s frequency counts
  • Display all the exact (and very close) matches you find (though right now I have no feel for how many that would be)

That is, I’m wondering whether you might be able to use Project Gutenberg to brute force an answer to a challenge transposition cipher without actually knowing how the transposition works.

This shouldn’t actually take long to calculate, and would parallelise very well. Anybody want to give this a go?

I’ve just had a particularly interesting email exchange with Paul Relkin concerning the Feynman Challenge Ciphers, which he has generously allowed me to share here. The context is that the first Feynman Challenge cipher’s plaintext was from the very start of Geoffrey Chaucer’s Canterbury Tales, i.e. the first twelve lines of the General Prologue:

WHAN THAT APRILLE WITH HIS SHOURES SOOTE
THE DROGHTE OF MARCH HATH PERCED TO THE ROOTE
AND BATHED EVERY VEYNE IN SWICH LICOUR
OF WHICH VERTU ENGENDRED IS THE FLOUR
WHAN ZEPHIRUS EEK WITH HIS SWEETE BREFTH
INSPIRED HATH IN EVERY HOLT AND HEETH
THE TENDRE CROPPES AND THE YONGE SONNE
HATH IN THE RAM HIS HALVE COURS Y-RONNE
AND SMALE FOWELES MAKEN MELODYE
THAT SLEPEN AL THE NYGHT WITH OPEN YE
SO PRIKETH HEM NATURE IN HIR CORAGES
THANNE LONGEN FOLK TO GO ON ON PILGRIM[AGES]

Paul writes:


The Prologue

I’d like to share with you a possible clue I’ve discovered to the sources of the 2nd and 3rd Feynman Ciphers. My findings relate to the identification of a specific published transcription of the Canterbury Tales that is the probable source of the 1st Feynman Cipher.

As you are probably aware, the Canterbury Tales have been transcribed and reprinted innumerable times. Among the many different published editions of the Canterbury Tales, there are several idiosyncratic spellings associated with particular transcriptions. Although individual lines are spelled the same way in many different editions, I found that the 12 lines of the Feynman Cipher taken together are unique enough to match only one published transcription, like a “word fingerprint”.

To find the edition that the Feynman Cipher is based on, I extensively searched for editions of the General Prologue that were published before or during World War II and compared the word spellings to the Feynman Cipher.

First, I discovered what may be a typo in the 1st Feynman Cipher. The word “brefth” does not appear in any published edition of the General Prologue I have been able to identify. The most likely correct spelling is “breeth”.

Second, I found that the only version of the General Prologue that matches the Feynman Cipher is Fred Norris Robinson’s 1st edition of Chaucer’s Complete Works. In the introduction to his book, Robinson actually discusses several of the uniquely spelled words that later found their way into the 1st Feynman Cipher and explains why he rejected the popular spellings and chose less common ones.

Possible Sources

Having identified Robinson’s transcription as the probable source of the 1st Feynman Cipher, I discovered that there are only a few different editions of this transcription that were published between 1933 and 1938 that could have been used by the author of the Feynman Ciphers:

In 1933, Houghton Mifflin published this book in at least three editions:

The Complete Works of Geoffrey Chaucer (black):

The Complete Works of Geoffrey Chaucer, Student’s Cambridge Edition (red):

The Poetical Works of Chaucer, Cambridge Edition (white):

In 1936, Houghton Mifflin published small books containing parts of Robinson’s Canterbury Tales with an introduction written by Max John Herzberg. The title of the book that contains the quote used in the cipher is “The Prologue, the Knight’s Tale, and the Nun’s Priest’s Tale”:

In 1938, Houghton Mifflin included Robinson’s Canterbury Tales in a two volume collection of British poetry by Paul Robert Lieder called “British Poetry and Prose” (Volume 1):

Interestingly, Robinson’s 2nd edition of Chaucer’s Complete Works in 1957 no longer matches the spellings in the cipher!

It’s specifically here where I think we may find clues to the 2nd and 3rd ciphers. It seems plausible to me that “British Poetry and Prose” contains other literary works that were the basis for the 2nd and 3rd Feynman Ciphers. For example, several of its poems have 6 letter words that repeat twice, consistent with “CJUMVRCJUMVR” in the 2nd Feynman Cipher.

Robinson’s 1933 book of Chaucer’s Complete Works could also be the source of the 2nd and 3rd ciphers. The 1933 book is part of a series of books called “The Cambridge Poets” and the 1936 book is part of a series called “The Riverside Literature Series”. The other books in the series are also potentially worth looking at.

Los Alamos?

My research suggests that several copies of these books have the original owner’s name and other notes written in them. If we were able to locate the copy that was used at Los Alamos, it might reveal the name of the scientist who created the ciphers. There may be other writings within it that would give further clues about the ciphers.

I discovered that the Mesa Public Library in Los Alamos has a copy of Robinson’s 1933 book. The Mesa Public Library originated during World War II in the Big House where Feynman lived, so I wondered whether the library book could be the copy that was used to create the cipher.

So, I recently arranged to borrow that book through interlibrary loan. Since I live on the East Coast, I had to try 5 different libraries before I found one that would let me request that particular book. It then took two tries because they accidentally requested the book from the Mesa Public Library in Arizona instead of the one in New Mexico. I finally received the book I requested. Unfortunately, the book plate indicates that it was donated to the library in the 1970s. This makes it unlikely (albeit not impossible) that this was the specific copy used in the period around World War II to create the 1st Feynman Cipher.

I hope you find this information interesting and that it brings us a step closer to solving the 2nd and 3rd Feynman Ciphers.

Chaucer and Cryptography?

(((NickP: I responded here, pointing out:)))

Incidentally, there are two interesting links between Geoffrey Chaucer and cryptography. The first (which you may well have heard of) is that he included six blocks of ciphertext in his Treatise on the “Equatorie” (basically a kind of astrolabe). But the second is that a very major work on Chaucer (finally published in 1940) was written by John Matthews Manly and Edith Rickert, both well-known code-breakers. (I’ve covered them a few times on CM, mainly because of Manly’s links to the Voynich Manuscript.)

However, Rickert died in 1938, Manly died in 1940 and Los Alamos only really started in 1943, so we can rule out a direct transmission from either of them to Feynman. All the same, I do consider it entirely possible that one/both of them was/were the ultimate source of the three cryptograms. Just so you know!

(((To which Paul replied:)))

Concerning your excellent point about Rickert and Manly, there was another colorful link between a Chaucer scholar and Los Alamos that I found while I was researching editions of the Canterbury Tales. John Strong Perry Tatlock was a famous Chaucer expert who transcribed Chaucer’s Complete Works. His daughter, Jean Frances Tatlock, had a romantic relationship with J. Robert Oppenheimer between 1936 and 1939. They continued to have an affair during Oppenheimer’s marriage. Their relationship was used as evidence against Oppenheimer during his security clearance hearings because Tatlock was a member of the Communist Party. As you know, Oppenheimer and Feynman had more than a passing acquaintance – as for Tatlock and Feynman, who knows?

Jim Lyons has returned to battle against the unsolved Feynman Ciphers: but this time round he’s wondering whether one or more might employ some variant of the Hill cipher.

It’s possible but… given the fact that #1 was a straightforward transposition of Chaucerian English, I don’t honestly buy into the idea that the others will prove to be cryptographically exotic.

To my mind, whoever set the first cipher seems (if the much-repeated back story itself is not itself a jest) to have been far more interested in snickering into his beard about having pulled the wool over Richard Feynman’s sainted eyes than proving his depth of cryptographic reading. I’d agree he could conceivably have wheeled out a Hill + substitution cipher crypto mechanism, but surely the meta-point of the whole exercise was that it was supposed to be a Los Alamos in-joke at Feynman’s expense?

Los Alamos

The Feynman Ciphers surfaced on Usenet in 1987 while Feynman was still alive (though he died in 1988), so it seems fairly unlikely to me that these were composed then. Hence it seems likely to me, on the balance of probability, that they did come from his time at Los Alamos: perhaps someone who was there with Feynman might remember?

There’s a nice page full of Feynman’s reminiscences of his time there 1943-1945, but that didn’t immediately answer the question.

All the same, this quickly led mw to the very watchable Memoir of Los Alamos in World War II with Murray Peshkin on YouTube. Given that Peshkin worked with Feynman and is still very much alive, I thought it worth a shot asking if he remembered the appearance of any ciphers. So I emailed him. 🙂 His response:

This is the first I hear of the Feynman ciphers. Of course I looked the question up, but nothing I saw related to anything of which I know.

Sorry not to be helpful

Oh well… if you don’t ask, you don’t find out.

The British Mission

However, given that the plaintext to the first Feynman Cipher was from Chaucer’s Canterbury Tales, it also struck me that the encipherer might well have been British. There was a sizeable British Mission at Los Alamos: the British had been working on an atomic research programme codenamed ‘Tube Alloys’ for some time, so had a bit of a head-start in the whole blowing-up-the-world race thing.

I couldn’t find a reasonable list of the British Mission personnel online, so decided to put one together: and here it is. If you have better biographies or links for any of the unlinked scientists, please let me know and I’ll update them here.

The British Mission to Los Alamos:
* James Chadwick (head of the mission)
* Egon Bretscher
* Boris Davison
* Anthony P. French
* Otto Robert Frisch
* Klaus Fuchs
* James Hughes
* Derrik J. Littler
* William G. Marley
* Donald G. Marshall
* Philip Burton Moon
* Rudolf Ernst Peierls
* William George “Bill” Penney
* George Placzek
* Michael J. Poole
* Joseph Rotblat
* Harold Sheard
* Tony Hilton Royle Skyrme (after whom skyrmions are named)
* Geoffrey Ingram Taylor
* Ernest W. Titterton
* James Leslie Tuck

And The #1 British Mission Scientist Linked To Feynman Was…

Klaus Fuchs: when Feynman’s wife was dying of tuberculosis, he borrowed Fuchs’ car to drive to her side at speed. Yes, Fuchs was a Communist who later admitted giving nuclear secrets to the Russians (and so went to jail). And despite being German, he spent a lot of time working in Edinburgh etc, so almost certainly was ‘Britainized’ to a large degree.

But did he make up the Feynman Challenge Ciphers? I don’t know. There were many other bachelors living in the Big House at Los Alamos: Fuchs and Feynman were just two.

Perhaps hints towards the answer will lie in one of the many autobiographies from the people involved, such as “Bird of Passage: Recollections of a Physicist” (Rudolf Peierls), or “What Little I Remember” (Otto Frisch): or indeed in Ferenc Morton Szasz’s British Scientists and the Manhattan Project: The Los Alamos Years.

If there’s a reasonable chance Feynman Cipher #2 (“F2”) is an exotic transposition cipher, it struck me that it might be a good idea to apply a whole load of exotic transpositions, and then use a really simple test to try to order them according to some minimized metric.

The metric I chose was the number of unique letter pairs appearing in the transposed cipher, simply because even a Vigenere should respond to that (for a reasonable-sized cipher). So… here is the bit of C code I wrote:-


#include <stdlib.h>
#include <stdio.h>
#include <memory.h>

const char F2[] = /* Note: 261 = 9 * 29 */
"XUKEXWSLZJUAXUNKIGWFSOZRAWURO"
"RKXAOSLHROBXBTKCMUWDVPTFBLMKE"
"FVWMUXTVTWUIDDJVZKBRMCWOIWYDX"
"MLUFPVSHAGSVWUFWORCWUIDUJCNVT"
"TBERTUNOJUZHVTWKORSVRZSVVFSQX"
"OCMUWPYTRLGBMCYPOJCLRIYTVFCCM"
"UWUFPOXCNMCIWMSKPXEDLYIQKDJWI"
"WCJUMVRCJUMVRKXWURKPSEEIWZVXU"
"LEIOETOOFWKBIUXPXUGOWLFPWUSCH";

#define WIDTH 29
#define HEIGHT 9

int count_unique_pairs(const char *cipher, const int * order)
{
int i, j, n;
int curr, last;
int count[26][26];

memset(count, 0, sizeof(count));

n = 0;
curr = -1;
for (i = 0; i < WIDTH; i++)
{
for (j = 0; j < HEIGHT; j++)
{
last = curr;
curr = cipher[order[j]*WIDTH+i] - 'A';
if ((last >= 0) && (count[last][curr]++ == 0))
n++;
}
}
return n;
}

int best_pair_count = 10000000;

void find_order_with_least_unique_pairs(const int * old_order, int index)
{
if (index < HEIGHT) { int new_order[HEIGHT]; int i; for (i = index; i < HEIGHT; i++) { memcpy(new_order, old_order, sizeof(new_order)); new_order[index] = old_order[i]; new_order[i] = old_order[index]; find_order_with_least_unique_pairs(new_order, index + 1); } } else { int count = count_unique_pairs(F2, old_order); #if 0 if (count > 188) return; #else if (count > best_pair_count) return; #endif best_pair_count = count; printf("pairs = %d, order = { %d %d %d %d %d %d %d %d %d }\n", count, old_order[0], old_order[1], old_order[2], old_order[3], old_order[4], old_order[5], old_order[6], old_order[7], old_order[8]); } } const int default_order[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; int main(int argc, char argv[]) { find_order_with_least_unique_pairs(default_order, 0); return 0; }

It didn't reveal a great deal (and pasting it into WordPress lost all the formatting, *sigh*), but I thought I'd post it here anyway. 🙂

For those of you who have had their fill of the last week’s posts on the Somerton Man, here’s a different cipher mystery that doesn’t get aired even 1% as much: the Feynman Ciphers.

The first Feynman Cipher (F1, 380 characters long) turned out to be based on a 5 x 76 transposition path cipher (the plaintext was “WHANTHATAPRILLEWITHHISSHOURESSOOTE”, i.e the start of Chaucer’s Canterbury Tales), but what is a little odd is that nobody seems to have yet made any inroads at all into the other two, though it is often remarked that transposition may well be involved. In that sense, they’re a bit like the d’Agapeyeff challenge cipher, which is also believed to be a multi-stage cipher including one or more transposition stages.

At 261 characters long, the second Feynman Cipher (F2) is a little shorter than F1: this length factorizes to 3 x 3 x 29, or 9 x 29, or 3 x 87. It also includes all 26 letters, which rules out a lot of tricky ciphers such as Playfair and Phillips.

XUKEXWSLZJUAXUNKIGWFSOZRAWURORKXAOS
LHROBXBTKCMUWDVPTFBLMKEFVWMUXTVTWUI
DDJVZKBRMCWOIWYDXMLUFPVSHAGSVWUFWOR
CWUIDUJCNVTTBERTUNOJUZHVTWKORSVRZSV
VFSQXOCMUWPYTRLGBMCYPOJCLRIYTVFCCMU
WUFPOXCNMCIWMSKPXEDLYIQKDJWIWCJUMVR
CJUMVRKXWURKPSEEIWZVXULEIOETOOFWKBI
UXPXUGOWLFPWUSCH

Though normally very good at identifying cipher types, Cryptocrack doesn’t do particularly well in this: it suggests Phillips, FracMorse, Playfair and Beaufort as its top four tips, none of which seem hugely likely to me. What is interesting, though, is that if you transpose the ciphertext (say, using some of the seven transposed routes listed by James Lyons), Cryptocrack produces a quite different set of recommendations, suggesting instead Trifid (which it almost certainly isn’t), but more reasonably Running Key and occasionally Vigenere.

Personally, I don’t think it’s a Vig: so right now, my prediction is that it’ll turn out to be a funky path transposition combined with Running Key (combining this with Vigenere would surely be just a bit too sadistic). Perhaps this will be what James Lyons will say too, when he gets round to posting part 3 (his part 2 is here.

Finally: the third Feynman Cipher (F3) is short too: 231 characters, which factorizes to 3 x 7 x 11. Much as James Lyons notes, I currently expect more or less everything said about F2 to hold true for F3: so I epxect it’s probably a Running Key (or perhaps Vigenere, but I doubt it) combined with a funky path transposition.

WURVFXGJYTHEIZXSQXOBGSVRUDOOJXATBKT
ARVIXPYTMYABMVUFXPXKUJVPLSDVTGNGOSI
GLWURPKFCVGELLRNNGLPYTFVTPXAJOSCWRO
DORWNWSICLFKEMOTGJYCRRAOJVNTODVMNSQ
IVICRBICRUDCSKXYPDMDROJUZICRVFWXIFP
XIVVIEPYTDOIAVRBOOXWRAKPSZXTZKVROSW
CRCFVEESOLWKTOBXAUXVB

What do you think?

After I recently mentioned Bellaso’s set of seven challenge ciphers from 1564 on this blog, Augusto Buonafalce very kindly emailed me with scans of Bellaso’s three challenge ciphers from 1555. I’ve now transcribed these (as best I can) and have added them to the existing Bellaso cipher transcriptions page.

I do acknowledge that the font that my theme currently uses for “preformatted” text is too small (thanks Dennis!), but the ciphertexts are only really there to be cut-and-pasted into whatever hacky cryptanalysis package you choose. Incidentally, one neat little online crypto cipher package is John’s Javascript Secret-Code Systems webpage, which has a number of unsolved ciphertexts, such as the three “Richard Feynman” challenge ciphertexts (copied onto a Cipher Mysteries page).