# Solving a Bazeries Xenocrypt cipher

In the July-August 2021 issue of The Cryptogram, the magazine of the American Cryptogram Association (ACA), the Xenocrypt section contained a Spanish language Bazeries cipher to be solved. A crib was provided as a possible entry. I was able to solve it relatively easily with some computer programs I have. I’ll explain how. If you’re strictly a paper-and-pencil solver, this post will probably not be of much use to you, which is why I’m putting it on my blog instead of submitting it to the magazine as an article.

If you are not familiar with the Bazeries cipher, as implemented by the ACA, I suggest reading the description here. Etienne Bazeries invented or improved on other ciphers as well, but this article refers only to the ACA version. The term Xenocrypt simply means a cipher in a foreign language. A crib is just a section of the original plaintext known to appear somewhere in the text.

First, consider how to solve a Bazeries cipher using a computer if you know the language of the plaintext, English, for example. It is a relatively simple matter for a programmer to write a program that takes every number from 1 to 999,999, the key, convert it to text form using a conversion table or module, use that as a simple substitution key, and use the numerical key to transpose the resulting text back to its original form. The transposition can take place before or after the substitution step. The results will be the same. The decryptions can be tested to see if they resemble English, or, if you have a crib, test to see if the crib appears in a trial decryption.  I have a program that does that. I also have Spanish language tetragram frequency data in a file I can substitute for my English data. However, that won’t break this cipher. Why not? Because I don’t have the Spanish conversion table for the numbers. I don’t know how to write large numbers in Spanish, so the program won’t convert to proper plaintext.

It’s possible for me to look up how to convert those numbers in Spanish and to write a conversion table, of course, but that’s a lot of work and likely to be error-filled. Instead, here’s the method I used.

Step 1: I reversed the ciphertext. Every computer language has a simple command for that. Reversal is critical to the next step because a hillclimber relies on on tetragrams (or other n-grams) to be in order. As long as one or more digits larger than 3 appear in the key, there will be many tetragrams in the right order.

Step 2: I input the reversed ciphertext to my simple substitution hillclimber with the test language set to Spanish. The output was jumbled due to the transposition operation of the Bazeries, but parts of the crib appeared in the best decryptions.

Here’s the crib: no se conforma a
Here’s a section of the best-scoring trial decrypt: …asdelpenormsn formaala con sedelque noualctiaint…

It’s easy to see that is the section containing the crib. The program found what appeared to be the best substitution and I could see where in the decryption the crib appeared. However, several different transposition keys could produce segments like this, even if the substitution was not 100% correct.

Step 3: I then reversed the new text, and saved it, what was now plaintext Spanish with short reversals of varying length. The ciphertext was then back in its original order, except it had been translated letter-for letter, although I couldn’t be certain it was 100% correct.

Step 4. I ran my regular Bazeries program with one small subroutine added. After each transposition step I commanded it to search for a 13-letter stretch of text that has the same pattern of repeats as the crib. I used pattern search instead of searching for the exact crib because I couldn’t be certain the substitution was correct. The pattern should still appear even if one or two letters were substituted incorrectly. If the pattern was found, it printed on the screen the complete decryption (without any conversion/substitution step since it had already been substituted). However, it turned out that too many incorrect keys produced stretches with that pattern, but did not contain the crib or a valid plaintext. So I looked back at the best decryption in Step 2 to see approximately where in the text the crib appeared. I was able to narrow down the possible starting point to a very small range. I then re-ran the Bazeries program limiting it to that part of the decryption. But then it found no solutions!

Step 5. I realized that I had counted the crib position from the top in step 4, but the text I was looking at from step 2 had been reversed. Therefore I should have counted from the bottom. I did that and adjusted the range to search the new ciphertext. When I ran it again, the program found the pattern in the right spot and printed out exactly one decryption:  – the complete, correct decryption!

# While Justice Sleeps by Stacey Abrams

While Justice Sleeps by Stacey Abrams
My rating: 2 of 5 stars

Abrams has presented us with another example of a killer of a plot concept ruined by horrible writing. In addition, her poor choice of a reader sunk the book even farther. The reader’s normal narrator voice was fine, but when she was reading dialog she failed miserably. The lead character, a twenty-something Supreme Court law clerk, sounded like a frightened ten-year-old. All the male characters sounded identical, making it hard to distinguish who was talking, and all sounded like B-film thugs.

The great concept is that a U.S. Supreme Court Justice falls into a coma just before a major split-decision vote is to be cast and his clerk, Avery, is given his legal guardianship, i.e. the power over whether he is to live or die. Evil entities want him to die to block the upcoming vote. Avery is faced with difficult decisions and is bullied and threatened by dark and mysterious forces. She is also left with puzzles to solve by the justice who clearly anticipated such a scenario and expected her to succeed. Great plot idea.

But then there’s the horrible writing. Abrams apparently has never met an adverb she doesn’t love to overuse. She turns nouns into verbs or adjectives. “The porch was sturdied by …”, “over the clayed ground.” She must have scoured her thesaurus for every obscure 10- or 12-letter synonym to replace common words in her first draft. Here’s one of her more appalling and hilarious attempts at erudition:

As it was, a permanent case of nausea jitterbugged with nerve-searing apprehension which metastasized into unadulterated panic. Pundits raptured at President Stokes’s capacity to infuse the recitation of a name with an intimacy that’s left the listener with a certainty of her unique place in the world. … That ability translated itself into throngs of voters who failed to heed the clarion calls from a bewildered press dutifully chronicling misdeeds.

I didn’t know whether to laugh or gag. How could an editor let that go by?

Yet another mystifying question is why she chose to portray the federal government as almost completely corrupt and evil. It is books like this that feed the deep state conspiracy theories of the far right groups she so famously opposes in her real life as a political activist. Which side is she on?

View all my reviews

# Fourth of July humor

Here are a few jokes, er, profound observations, for this fine holiday:

Eagles may soar but weasels are not sucked into jet engines.

I find it ironic that colors red white and blue stand for freedom until they are flashing behind you

You should fly the flag on the Fourth. I once asked a friend “What’s the best thing about living in Switzerland?” He didn’t know but he said that the flag is a big plus.

# The politicization of disease

It seems that diseases are now either Democrat or Republican. At least whether or not Americans care about getting one is a Democrat or Republican thing. It is truly bizarre that our society has come to this point.

The graph below shows the relative interest in the Delta variant of the Covid-19 virus over the second week of June compared to how each state or district voted in the 2020 presidential election. Click on the image to pop it out and enlarge it for better viewing.

Delta variant vs. Biden Vote

The blue line represents the percent of searches on the term “Delta variant” during the second week of June, 2021 when medical and news sources were talking about how another Covid-19 surge could be hitting the United States led by the Delta variant that originated in India. The data is taken from Google Trends. On the left end, the District of Columbia had the highest percent of searches on that term, so that number was set as a benchmark of 100%. On the far right, the state with the lowest percent of searches on that term, Mississippi, searched on it only 30% or less than one-third as often as those in D.C. The red line is self explanatory: it shows the percent of the popular vote Joe Biden won in the 2020 presidential election in each state. The correlation is unmistakable. Although it’s a gross generalization, it appears that the stronger one supported Donald Trump, the less concern one has about getting Covid. Why? Trump caught the virus and nearly died from it. His oxygenation level was in the 80s, definite ICU territory. He suffered a life-threatening illness. During the campaign he bragged about bringing the vaccines to fruition and he got vaccinated himself. One would expect his followers to, well, follow his example. Somehow, though, ignoring Covid or scoffing at it is the only acceptable attitude for many. Trump could save the lives of many of his followers by coming out publicly encouraging them to get these vaccines he is so proud of.

An acquaintance of mine recently became very sick with symptoms that look very much like Covid-19. He’s one who has bought into the far right conspiracy theories about the deep state and has repeatedly asked me how deep the corruption goes in the FBI, since I’m a retired FBI agent. He has refused to get vaccinated or tested for Covid. He has so far refused to go to a hospital. I don’t wish him ill, but I find it hard to have any sympathy for him, either. I do feel sorry for his wife. If you check my past posts, you’ll see I have called this pandemic an exercise in natural selection. I stand by that characterization.

# California heat wave

If you live in the western half of the United States or follow U.S. news, you know that the west is experiencing a severe heat wave right now. It’s 95ºF right now at 2PM. People tend to judge climate issues by the standards of their own locale, and that’s not always applicable to other areas. So I thought it could be useful to clarify what’s going on here.

The real problem isn’t the heat. It’s the fire danger and the drought. Because of the Pacific Ocean, the air near the coast where I live (about 30 miles inland, on the other side of the Santa Cruz Mountains from the ocean) cools off pretty well at night, even during a heat wave. I went for a run this morning at 8AM and it was a comfortable dry 69ºF degrees when I started. This is very different from last summer when I went through a similar heat wave in Austin, Texas while visiting family. It doesn’t cool off overnight and it’s much more humid there. So it was more uncomfortable. I don’t even have air conditioning in my house. I can keep it tolerable just by opening up the windows and skylights overnight or early morning, then closing up tight during the day. So I don’t deserve your sympathy right now.

Climate change is real and I’m sorry that it has somehow been made political. Thermometers are instruments, not liberals or conservatives. The change is measurable and the connection to carbon emissions and other greenhouse gases is undeniable and inescapable, although some will deny it. That whole range of issues is political because so much of our economy is tied up in autos and fossil fuels, which means money and livelihoods to so many.

At the moment there are no huge forest fires burning, but I expect the next several months to produce many. The air will be a major problem for millions and even worse will be the loss of homes, maybe lives, for those who live in the danger areas. I don’t foresee any of this changing until something redresses the overarching environmental, economic, and political problem of humankind: overpopulation. What we really need is for most of us to die.

# My music playlists

Musical taste is personal, of course, and beyond dispute, although it can be fun to argue about it. I like to tell people that rock ‘n’ roll ended in 1968 and nothing after that was rock and none of what was called rock was worth listening to. That usually gets a strong response. It’s not true, of course. I like a few things in the rock genre after that date and you’ll find some in my playlist below, although not much. You see, I left for my year abroad in the fall of 1968 for Japan and returned the following summer. There was no American rock music there and when I returned, it seemed everything had changed. I didn’t like the rock stuff that was playing except for the oldies, so I listened exclusively to the oldies stations.

I also learned some great ragtime guitar while in Japan from a fellow American guitarist. I spent law school learning to love ragtime, boogie woogie and blues. Over the next few years the so-called rock on the radio was no longer rock n roll but Acid Rock or Heavy Metal or Disco or rap or Emo. I began to appreciate earlier eras’ music and close vocal harmony: barbershop quartets and the Andrews sisters, bluegrass, and big band (swing era). Of course, I still like the original rock and roll I grew up on. There are things I sometimes like that aren’t on my playlists, such as ambient music or string quartets because I have to be in the right mood for those. There are also things from early decades I never developed a taste for, like modern jazz or pop “standards.”  I like bluegrass and delta blues and a few country songs, but in general I don’t like mainstream country. Anyway, below is what I listen to now. I have these on my computer and play them through my stereo in my office and on my phone where I can play them through bluetooth in the car. You aren’t going to find much below recorded after 1968, and what was, is largely stuff written and first performed decades earlier.

The performers I listen to most often are Carl “Sonny” Leyland, Eubie Blake, Doc Watson, Trebor Tichenor, Chuck Berry, Pat Donohoe, Mary Flower, Stefan Grossman. There are a few songs for which I don’t have the name of the performer. Those may have been recorded from YouTube or a radio show, although I always try to find a commercial recording and buy it. I believe performers should be paid. It’s broken into three playlists, so you’ll see some of my favorites repeated. That’s also why they start over alphabetically twice.

One last note: my playlists change regularly. If you’d seen them three years ago, they’d have been quite different. In three years, they will also have changed. I’m not claiming that this list represents a final realization of the unquestioned best in music.

# Bluebird, Bluebird by Attica Locke

Bluebird, Bluebird by Attica Locke
My rating: 3 of 5 stars

Darren Mathews is a black Texas Ranger involved in an investigation of multiple homicides in an East Texas town overrun with Aryan Brotherhood types. I thought this was going to be a hackneyed storyline filled with clear baddies – white racists – and clear good guys – Darren and the poor black folks of Lark. The plot and characterizations turned out to be more nuanced than that and I found myself drawn into the story by halfway through.

At times the author could write beautifully, but there were a number of grating faux pas (plural?) that an editor should have corrected. In several scenes there were three, four, or even five men involved or talked about and the text was full of he, him, his when it was unclear which man they referred to. This was especially bad when Darren’s familial relationships were first discussed and then at the end when everything was explained about the homicides. You really have to work to understand how everyone is related to each other and to past events.

The ending was disappointing to me but I’ll avoid spoilers by leaving it at that. The final chapter was an obvious, and very clumsy, setup for a sequel. Another major shortcoming I can’t let pass is the horrible description of police procedure. Apparently neither the Texas Rangers nor county sheriffs in Texas have ever heard of Miranda warnings. If this were real life, every crime solved would have been unprosecutable. Darren would have been fired or demoted.

View all my reviews

When I bought my Google phone a few years ago, I was intrigued by the timeline feature that showed where I had been over the last month. Eventually I stopped paying much attention to it, especially once the Covid lockdowns hit. Lately I began to pay more attention to it again, and realized another reason why I had stopped paying attention to it: it’s wildly inaccurate.

If I get in my car and drive somewhere, such as to a restaurant, the park, or a friend’s house, it accurately shows the location, although recently it thought I had been to the restaurant next door to the one I’d actually visited. However, the data that is completely off-the-mark and hard to explain are the figures given for walking, biking, and driving. The numbers it gave me for May were: 5 mi. on foot for 1 hour (based on the icon), 5 mi. on bicycle, and 117 mi. in the car. This makes no sense. I don’t even own a bicycle and haven’t ridden one in years. If I go the site and click on specific days, e.g. the days I run (with my phone), there are usually entries showing I ran several miles, although the same run, which I know is 6 miles, is shown anywhere from 5.6 to 7.6 miles in Timeline. Sometimes the distance driving in the car to the park is included in the run distance. Other times, the entire run and drive is categorized as a drive. Other days I do hike with a friend. How does that all add up to 1 hour in the summary page? I like to think that I run so fast it thinks I’m actually driving, but I know that’s not the case. Those days are long gone. Someone at Google needs to seriously upgrade their software for this feature.

# Brake, not break

Since I bought a new car recently, I’ve been on a couple of car forums a lot. I see a very common mistake there and in many other places: people writing break when they mean brake. The things that stop a vehicle or machine are brakes. The term break and its forms broke and broken refers to something ruined or that has come apart. It also refers to a spell of rest or cessation of activity, like take a break.

Even mainstream companies and advertisers make this mistake, which seems odd and unforgivable to me. Here’s an example I saw recently:

At least she got pedal right. I’ve seen posts about a car’s break petal. I’ve seen posts from people telling me the proper way to break my car. I don’t want to break my car.

# Uncertain antecedent

One particular language mistake that I see occasionally and hear quite often on news shows is the uncertain antecedent. It’s a stylistic error, not a grammar one. Here’s an example:

Bob told Tom that his brother had called him and was drunk. He was very upset.

Whose brother is he referring to, Bob’s or Tom’s, and who is the “he” who was upset? It could be any of the three men referred to, although if it was the drunken brother, the “was” should have been “had been” to stay grammatical. This confuses the reader or listener. It can be clumsy or awkward to keep repeating names in order to avoid this problem, but a skillful writer can find ways to do it. One way is to use “he himself” or “his own.”

# Agent Sonya by Ben Macintyre

Sonya was the code name given by the GRU (Russian military intelligence) to Ursula Kuczynski, a German Jewess from a leftist/communist family. She was raised in Germany by well-educated and respected intellectuals in a rather privileged society. She thoroughly adopted Communist ideology and moved to China before WWII to help the Communists there resist the Nationalist (Kuomintang) government. There she was recruited by Richard Sorge, one of Russia’s most celebrated spies. She later served in Manchuria, Switzerland, and England, and underwent training in Russia as well. She turned out to have been one of Russia’s best spies throughout the Cold War. I don’t want to spoil it by giving more detail.

I’m no fan of history, especially political history, and I expected this to be a burdensome read for my book club, but I was very pleasantly surprised. It’s not weighed down with excessive biographic detail or wartime battle history. It’s a cracking good read and full of action throughout. People who enjoy spy tradecraft will love it. It’s astounding how she could have been (and was) overlooked and dismissed as a spy by Nazis and Swiss and English counterintelligence time and again. She also had quite a sexual history. She must have had quite a body from the various descriptions made of her. The author knows how to write, not just research, a story.

View all my reviews

# Difficult cryptarithm

I recently sent a cryptarithm to The Cryptogram, the magazine for the American Cryptogram Association (ACA), but it was rejected as too hard. It is difficult to solve, especially for paper-and-pencil solvers, but it is solvable through anagramming and persistence. It makes an interesting exercise for computer programmers to write a solver. If you want to try it here it is:

Multiplication (3 words, 1-0) THE RAT
BERRY * I = ELANDS

In case you’re not familiar with the format for such problems, the * means multiply and the phrase in parentheses means that when correctly solved, the letters (i.e. their numerical equivalents) put in the order 1234567890 spell out three words. Each letter represents one digit and initial zeros are not allowed, so you know that the B, I, and E are not 0, and you know that also for the Y because the final digit of the product (S in this case) would also be Y.

I’m not going to post the solution, but you can put the puzzle into this website to get the solution.

# Garage striping

My garage was wired for a Blink EVSE back in 2011 for my new Nissan Leaf. The Blink was on the right side which was fine for the Leaf and much easier to install because of the workbench and washer/dryer on the left. Now with the 240V socket on the wrong side for Volvo, I have to back in to charge. Technically I can do it when facing forward if I pull in way on the right side, but only at risk of scratching up the paint on the roof of the car dragging the heavy cable over the top. The problem is that it’s a tight fit – the car in the garage, that is. If I pull in too far, I cut off access from the house to the wash/dryer workbench area where I get out of the car and if not far enough the garage door will come down on the car. Also, there’s lots of stuff on both sides that causes the warning system to sound alarms at me as I back in, and visibility isn’t good coming from the bright sun to the dark garage, especially with sunglasses on. My solution was to paint stripes on the floor of the garage so that the camera system recognizes the stripes and stops screaming at me as I back in. I’ve tested it pulling in forward and the bird’s-eye view camera system sees it perfectly and I can place the car perfectly. I haven’t tried it backing in yet, but if nothing else, it will make it easier for me to judge my positioning. I don’t expect others will need to do it, but I’m rather proud I thought of it. My butt is still sore from all the squatting. I used masking tape, spray paint, and a sort of stencil made from a cardboard box.

# Poweramp – thumbs up

I don’t normally do product reviews in this blog, but I thought I’d give a shout out to Poweramp. In my earlier posts I complained about my new Volvo not having an easy way to play my mp3 music. I have hundreds of songs I’ve either recorded myself, ripped from my CDs or LPs, or downloaded as mp3s. In my previous car, a Nissan Leaf, I had these in three folders on a USB thumb drive. I just plugged them in to the USB port and the car’s player would play them in order (or I could have them randomized). I discovered that I can’t do that with the Volvo.

My son came up with the solution: Poweramp, an inexpensive app available from the Google Play Store. I don’t know whether it plays wma files, the default format for Windows and the format I had used for most of my music. That’s because I first converted all my wma files to mp3 before loading them onto my Android phone. Before I downloaded Poweramp, I could go to the Files app and tap a music file from the list of files, and it would play, but I could not organize them into playlists, and every time I turned off the phone or quit the Files app, it would open up back at the beginning again.

With Poweramp I was able to create three playlists, equivalent to the folders I have on my thumb drive, and when I stop the app from playing, it remembers where it was and continues from there the next time. It has quite a few other nifty features that I haven’t explored, but I have to say it’s well worth the price just for the convenience. The phone plays through Bluetooth, which has its own drawbacks, but the sound quality is good enough for my ears.

# The Falling Woman by Richard Farrell

The Falling Woman by Richard Farrell
My rating: 3 of 5 stars

Erin, recently diagnosed with incurable cancer, is en route across the country when her plane comes apart midair. Incredibly, she survives the fall, landing still strapped in her plane seat, the fall broken by tree branches, a rotting barn roof, hay bales and soft mud. She is taken disoriented to the hospital as a Jane Doe, but her injuries are minor. The NTSB investigators arrive at the debris field, but by the time they get to check out the stories of a survivor, she has disappeared. This is a great premise for a mystery. Where did she go? And why? Who was she?

Unfortunately, the author drops the ball well short of the goal line. He writes well enough for a thriller of this type. The problem is with plausibility, and I don’t mean the idea of a survivor. The book cites several real life cases of airplane fall survivors. The greatest implausibility is the notion that she could disappear and not be identified. She may have been a Jane Doe missing her clothing and too stunned to give her name, but she was ambulatory and communicative. There would have been X-rays and blood tests that would provide DNA and reveal both the cancer and chemo thus pinning down who she could be. Security cameras abound in Wichita’s major hospitals, I’m sure. She was so unique not only because she was a passenger from the exploded airplane having fallen though the barn roof, but she was a very good-looking woman (her lover was described as “Hollywood handsome” and in her thrall, so she had to be a stunner) and dying of cancer. Everyone at the hospital would have remembered her, yet only a day later they could give only a vague description and couldn’t pick her out from a lineup of photos of only a handful of women yet to be identified. This is preposterous. Her photos would have been plastered all over the Internet and TV news. Her family and friends would have identified her immediately. Despite having no clothes or identification she “settles up” at a bar. With what? She still had a credit card? Someone gave her cash? I could go on, but you get the point.

Even more incredible were the actions of the lead investigator, Charlie Radford. I won’t bother with all the details because they’re spoilers and it doesn’t matter all that much. Despite the silliness and mandatory eye-rolling, the book was still a fun read. The plot premise was just compelling enough that I was forced to keep reading to see whether, when, and how she would be identified. There were other families, those whose loved one’s remains had not been found or positively identified, who held out hopes from the rumor of a surviving woman that she might be their relative. Would they finally be spared the agony of not knowing and be allowed closure? It’s a quick easy read with a killer premise and that’s enough for some good hours of entertainment for me, but I wouldn’t feel comfortable recommending it.

View all my reviews

# Volvo Recharge – geographic interest

If you read this blog, you’ve seen a couple of posts about my new electric SUV, the Volvo XC40 Recharge. I got curious about where the car would be most popular. Of course I was pretty sure California would be a hotspot since it has very “green” policies and mild weather ideal for EV batteries. So I checked Google Trends for a 7-day stretch. The map below shows where there were searches on that specific model. The darker blue areas mean more searches.

After two weeks I still love the car.

# Ready Player Two by Ernest Cline

Ready Player Two by Ernest Cline
My rating: 3 of 5 stars

Unfortunately RP2 suffers from sequelitis. The author has tried to recreate the charm of his hit RP1 by loading it up with mementos and trivia from the video games, movies, songs, and TV shows a person who grew up in the 80’s and 90’s might have experienced. RP1 had that, too, but in smaller doses. Its selling point is nostalgia and for some, it will be a wonderful read for that reason, but for me it was “been there, done that.” I loved RP1 but it was more because of the poor boy makes good theme of the real life Wade. I didn’t grow up in that era and never played any of the games mentioned in the book.

Slight spoiler here if you haven’t read the first book: Wade, the protagonist, raises himself from poverty through his skill at playing video games. Here, he is more of a dilettante and much less sympathetic. He, or his avatar, still must fight through the levels of a horrific video game of sorts, since an AI bot gone wild has taken control of Wade’s physical body and those of millions of others. But the charm is lacking. Rather than conveying the thrill of a good video game, it’s hundreds of pages of trivia, mostly of movies, TV, and pop songs and celebrities, especially those of Prince, that must be mastered. I found myself clicking ahead on the audiobook while playing solitaire. The reader was very good and kept me awake with his enthusiastic reading, and there always the fun of watching the good guys defeat the bad guys, so the book wasn’t a waste. It was just too formulaic.

View all my reviews

# Volvo XC40 P8 Recharge – further impressions

A week ago I posted about my new car, a Volvo XC40 all-electric small SUV. Now that I’ve driven it a bit, I’ll add a few things. I really like the adjustability in the car. The front seats are five-way adjustable electrically and even have a pull-out seat extender for greater thigh support, both for the driver and the front passenger. The steering can be adjusted to be soft or firm. I chose the firmer feel. The steering wheel can be adjusted in height and extension. I’ve had trouble with other cars where the steering wheel covers the speedometer or other important gauges. I had the same trouble with the Volvo at first until I realized the steering wheel covered the battery level at the bottom of the screen. A simple adjustment took car of that. Fine-tuning the air conditioning and heat have been a breeze.