Near misses
Door number two: how we looked for the book the manuscript was copied from, and found a match with a margin of 0.14 percent
A cipher destroys letters, but not length. If a ready-made medieval text stands behind a section of the manuscript, the sequence of its entry lengths will survive any encoding. We tested 182 texts against six targets. One fired - and failed confirmation.

Door number one is the search for the key as a document. Door number two opened out of a simple observation about what a cipher does to a text and what it does not.
What survives the cipher
A verbose cipher replaces a syllable with a group of signs. Letters vanish, frequencies are distorted, words grow longer. But they grow longer uniformly: by 1.24-1.53 times, by our measurements on the model. An entry of thirty words becomes an entry of forty, an entry of ten becomes one of thirteen. The order of lengths is preserved.
Hence the idea. The stars section of the manuscript - quire Q20 - is 292 paragraphs, each marked with a star in the margin, on average 7-8 words of plaintext each. It looks like a collection of short entries: a receptary, a herbal, a dream book, a collection of sayings. If a ready-made book stands behind it, the sequence of its entry lengths should correlate with the sequence of paragraph lengths in Q20. The same for the herbal (179 entries in language A, 66 in language B), for the "bathing" quire Q13 (78 paragraphs), for the pharmaceutical section (26).
The corpus
Collecting candidates took three weeks. The Spanish medical texts of the fifteenth century from the HSMS corpus - 63 texts, 12 660 entries, exhausted in full. The whole Latin Patrology and the Corpus Medicorum Latinorum. Pliny by books, Marcellus, the Medicina Plinii, Gargilius, Serenus, Cassius Felix, Theodorus Priscianus. Women's medicine: Caelius Aurelianus, Muscio, Hildegard, Trotula. Three Germanic languages: Middle English herbals from EEBO, the Middle Dutch Yperman and Scellinck, German culinary manuscripts. Two French lapidaries, Aldebrandin, Rusio. In all, 182 texts, with the rule for splitting into entries recorded in the header of each file.
Four sieves and two nulls
Sieve a/c/d - rank correlation of lengths at the best offset, entry boundaries one to one. Sieve e2 - count of entries per page with page length controlled. Sieve f - alignment with splitting: an entry of the source may fall on two or three paragraphs of the manuscript and vice versa, with a penalty. Sieve g - a candidate shorter than the target, embedded as a chunk. The power of each was checked on synthetic text: sieve a/c/d catches a real correspondence with a probability of 0.998, sieve f holds a boundary mismatch of up to 10 %.
There are two nulls, and this matters. Permutation of entries is a necessary condition, but it is anti-conservative: it wrecks the local autocorrelation of lengths, and its false-positive rate was 6 % at a declared 0.1 %. So the decisive one is the second null - permutation of blocks of twenty entries. Plus a specificity requirement: a candidate that passes on more than two targets out of six is an artefact.
The "candidate × target" pairs came to 1 104. Those that passed both nulls - one.
Ketham, Zaragoza, 1494
Compendio de la humana salud is a Spanish edition of the medical compendium known in Latin as the Fasciculus medicinae of Johannes de Ketham. Zaragoza, 1494. Against Q20 it gave a distance of 0.2119 at a block-null minimum of 0.2147. The margin - 0.14 %.
This is the moment when a researcher wants to write a paper. Instead we wrote a confirmatory procedure - before looking any further. The logic is this: if the source is real, then not only the lengths but the block order of Q20 should differ from a permutation more strongly than chance. On synthetic text with a real correspondence the difference is 0.080 at a null of 0.025. For Q20 against Ketham - 0.015 at a null of 0.033. No difference.
The second witness is the Latin edition of 1495, the Fasciculus medicine, with the same order of sections. If the match rests on the order of the content, the Latin text should pass on at least one target. It passed on none. The single hit was closed by the numbers the same evening.

A dream book with exactly 292 entries
The second near miss of the same day looked even more tempting. The Dream Book of Daniel is a medieval interpreter of dreams that spread across all of Europe in short entries. In the English edition of 1866 - 292 entries. In Q20 - 292 paragraphs. Nine words per entry.
Sieve f did not take it: +0.011 at a power of +0.62 on synthetic text from its own lengths. A match of count, not of order. We also checked the Latin alphabetical recension from Vienna manuscript 271 - 157 entries, transcribed from the scans: three sieves, zero everywhere, with power verified in both scenarios. The lesson we wrote into the rules: a match in count does not mean a match in order.
Two more at the threshold
The Keukenboek from Ghent came close to herbal B, and Pliny, book 21, to Q13: both exactly at the block-null threshold with gains of 0.087 and 0.101. They do not pass. The Hippocratic Aphorisms against Q13 and Hildegard against herbal A - removed by the block null. This is the normal picture of an honest sieve: several candidates at the boundary, none beyond it.
What the sieve cannot see
It is important to say what the method cannot find by its design. A source from which the manuscript selected entries or rearranged them. A text written from two or three sources at once. A boundary mismatch of more than 10 %. A book that has not survived or has not been digitised - which, for the herbals of the fifteenth century, is the majority. The unobtained we recorded separately: the Florentine Ricettario, the Herbolario volgare, the German Gart der Gesundheit and Ortus sanitatis, whose chapter headings stand above woodcuts and cannot be read by OCR.
We also tested the argument that the paragraphs of Q20 have been shuffled by the binding and that searching for order is pointless: conjugate leaves are closer than the rest only weakly and equally in all sections (Q20 +0.0185 at p 0.015, threshold 0.01). The target remains in binding order.
What remains
The tool is ready: a new text is checked within minutes, by one command, on all six targets and four sieves with both nulls. What is missing is the corpus - precisely those books that have not been digitised. If behind Q20 stands a text that survives in a single copy in a monastery library, door number two is waiting for its scans.
For understanding: the sieve looks for the order of lengths, not for content; success would be a "candidate × target" pair that passed both nulls, the confirmatory procedure by blocks, and a witness of the same order in another language. Ketham passed the first of the three.
FAQ
Why entry lengths, of all things?
A verbose cipher inflates every word by 1.24-1.53 times, but it does so uniformly - the order of lengths is not shuffled. If a section of the manuscript was copied from a ready-made book, the sequence of its paragraph lengths should correlate with the sequence of entry lengths in the source. This is the only quantity guaranteed to survive the cipher.
What is Ketham's book and why did it fit?
Compendio de la humana salud is a Spanish edition of a medical compendium, Zaragoza, 1494. Its entries matched the order of the 292 paragraphs of the stars section Q20 at a level reached by none of the 182 candidates, with a margin of 0.14 percent to the chance threshold.
Why was the match not confirmed?
We described in advance a confirmatory procedure with a different null - the order of blocks. If the source is real, the block order of Q20 should differ from a permutation more strongly than chance. It did not - 0.015 at a null of 0.033, whereas on synthetic text with a real correspondence it is 0.080. The Latin edition of the same compendium, with the same order of sections, cleared the threshold on no target at all.
What can the sieve not find, by its design?
A source from which the manuscript selected entries or rearranged them; a text written from several sources; a boundary mismatch of more than 10 percent; a book that has not survived or has not been digitised.