<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Vue_de_la_ville_de_Bordeaux_et_de_ses_promenades_du_c%C3%B4t%C3%A9_du_ch%C3%A2teau_Trompette%2C_1755_%28d%C3%A9tail_Chapeau-Rouge%29.jpg/269px-Vue_de_la_ville_de_Bordeaux_et_de_ses_promenades_du_c%C3%B4t%C3%A9_du_ch%C3%A2teau_Trompette%2C_1755_%28d%C3%A9tail_Chapeau-Rouge%29.jpg" class="right">
You spend only a little time in Bayonne before travelling to the nearby city of Bordeaux. This port city is bigger with grander buildings than Bayonne, but you also see beggars in the town square.
[[next]]
(set: $code to (random: 50, 350) * 23 + 7)<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Portrait_du_duc_de_Sully_de_la_galerie_Saint-Germain-Beaupr%C3%A9.jpg/229px-Portrait_du_duc_de_Sully_de_la_galerie_Saint-Germain-Beaupr%C3%A9.jpg" class="right">
You meet with an important nobleman, Baron de Rosny.
"His royal majesty, King Henry welcomes you to France. To best serve as a representative and diplomat of our esteemed ally, the great sagamore Messamouet, we shall instruct you in certain techniques."
You notice the flowery speech of this aristocrat is rather different than the Basque and French sailors with whom you spent several months at sea.
[[next|one]]<img src="https://upload.wikimedia.org/wikipedia/commons/9/9f/Micmac-confirmation.jpg">
You understand that the baron means secret writing. You are somewhat familiar with writing as your people have been writing on rock and birchbark for a long time. This is sometimes called //gomgwejui'gas'gl//, after the tracks sucker-fish, //gomgwej//, leave on the muddy river bottom. You know that the Ojibwe call this //wiigwaasabak//. You have also studied how to write in French, English and so on.
The Europeans have complicated ideas about their secrets and so will have complicated ways to write and understand them.
[[next|two]]"Diplomacy is essentially the art of communication and persuasion. This involves careful listening and careful speaking. But there's an additional science involved, the skill of communicating secretly and privately."
"This technique you must learn and we will show you how what seems secret can be understood by someone who isn't the intended receiver."
[[next|continue]]<img src="https://qph.cf2.quoracdn.net/main-qimg-a221519e4f5da3c69914c93e25795649.webp">
"Let's begin with a simple //transposition cipher//. This means the letters of the message have been rearranged. By writing the letters in columns and then sending the message in rows, the message has been //encrypted//."
[[next|three]]"This message is about one of Spain's agents. They tend to give them a two-digit codenumber. See if you can figure out what is the codenumber."
<div class="code">ATRI SHVG TTNO EEEH YENM XNIN ITOR</div>
[[try]]"Of course, there are other, more challenging codes to consider. Now we will look at a substitution cipher. This means that each letter has been replaced by a different letter. A simple version of this is the Caesar cipher, where a letter is replaced with another letter a fixed number of places along."
"For instance, with a Caesar shift of 3, A is replaced with D, B with E, and so on."
[[next|five]]
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Caesar3.svg/320px-Caesar3.svg.png">(set: $combo to (prompt: "Enter the 2-digit code:", ""))
(if: $combo is "39")[Well done! You cracked the code. [[next|four]]]
(else:)[Sorry, wrong number. [[try again|three]]]This seems simple enough. But you suspect you will be given a more difficult challenge.
"A simple substitution cipher won't keep a meesage secure from prying eyes. Let's try a more sophisticated substitution cipher. Consider this message:"
{(set: $cipher to (a: 'DVC PPF WDB QCL KBQ VWT CIL VDK', 'QTS CPQ JYI CDM PIT DNP CBJ DFH', 'PQM QTC NDQ DQM VDF JTQ WBC DJX', 'JDQ JPK TII TND QIC PDI BPF ZHS', 'DBM FWD BQD VDB QFI YTK KDQ MRV', 'TLI KDR SCP QJY WCT IPF IDQ FEY'), $pick to (random: 1,6))}
<div class="code">(print: $cipher's ($pick))</div>
"While this may appear like the substitution here is random, I'm told that this is a linear transform of the form ''C = 3P + 1'', whatever that means."
[[next|six]]"We intercepted this message sent by Spain to representatives of the Catholic League, here in France. The League has plotted with Spain to overthrow the king and install someone from the House of Guise. In return for Spanish troops and money, Spain has a series of demands. By treating with the enemy, the League forces more bloody wars as the king can't tolerate the surrender of French interests."
You have heard of the massacres and savagery of the European wars of religion, though why they torture and kill each other seems obscure.
[[next|seven]]
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Flag_of_the_Catholic_League_%28French_Wars_of_Religion%29.svg/320px-Flag_of_the_Catholic_League_%28French_Wars_of_Religion%29.svg.png" class="right">
//banner of the Catholic League//"To help you decipher this message, it helps to have some context. For this reason, and to give you more experience with diplomacy, we have arranged an opportunity to speak with one of our diplomats."
Choose
[[Guillaume Bérard]], French consul to the Sultan of Morocco
[[Michel de Castelnau]], ambassador to Queen Elizabeth of England
[[Jean Nicot]], ambassador to Portugal
<br>
The ciphertext
<div class="code">(print: $cipher's ($pick))</div><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Oleszczynski_Antoni_-_Fran%C3%A7ois_%C3%A0_Mesgnien_-_Franciszek_Meninski.jpg/178px-Oleszczynski_Antoni_-_Fran%C3%A7ois_%C3%A0_Mesgnien_-_Franciszek_Meninski.jpg" class="right">
Guillaume Bérard has the air of an experienced traveler. "France has long made strategic alliances with the Ottoman Empire and their allies in North Africa. Spain violently opposes this and surely wants any treaties cancelled."
"Spain also jealously guards the gold and silver they take from Mexico and Peru. The kings of France have authorized privateers from Gascony and Normandy to capture what they can, which Spain regards as piracy."
[[next|eight]]
<hr>
or talk to [[another|seven]] diplomat<img src="https://upload.wikimedia.org/wikipedia/commons/b/b7/Steven_van_Herwijck_medal_of_Michel_de_Castelnau.jpg" class="right">
Michel de Castelnau presents an imposing figure. You notice his various scars.
"Spain has taken advantage of religious divisions across Europe to push their interests. They call for the persecution of the Protestants and restoration of Catholic purity."
"In particular, the King Phillip II has waged a long war to return all of the Netherlands to Spanish rule. The rebels in Holland have received some support from their fellow Protestants in England."
[[next|eight]]
<hr>
or talk to [[another|seven]] diplomat<img src="https://upload.wikimedia.org/wikipedia/commons/8/81/Jean_Nicot.jpg" class="right">
Jean Nicot starts by offering you some //asemaa//, tobacco. You accept and tuck it away. He seems puzzled but then takes and sniffs a small amount up his nose. How peculiar.
"Surely a key Spanish demand must be French recognition of Spanish rule over Portugal. Phillip the Second, King of Spain, added the Portuguese crown to his own and has been trying to stamp out any attempt of Portuguese to reclaim it." You remember some talk of this as your ship approached the Azores.
"The Spanish also want to end any French attempts to trade or set up outpost anywhere in the Americas. They claim the Pope in Rome divided the world outside Europe between Portugal and Spain."
You know that trading beaver pelts with the French has become very important to the Wabenaki and Anishinaabe.
[[next|eight]]
<hr>
or talk to [[another|seven]] diplomatBaron de Rosny then suggests talking with a lawyer. "Lawyers turn out to have some of the analytical skills needed for code making and breaking."
Choose:
[[Jean Papire Masson]], geographer, historian, jurist
[[Michel de Montaigne]], philosopher, mayor of Bourdeaux
[[François Viète]], mathematician, councillor to King Henry
<br>
The ciphertext
<div class="code">(print: $cipher's ($pick))</div><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Jean_Papire_Masson.jpg/176px-Jean_Papire_Masson.jpg" class="right">
"Perhaps you wonder why there's so much violent dispute about who should be the king of France." You do wonder about the stories of wars and massacres but weren't sure to ask.
"France has followed the Salic Law, which limits who can claim to be king solely through the father's line. It might be different in your society. But this means the only true heir to Henry III is Henry of Navarre, a Protestant. And so the Catholic League schemes with Spain secretly to block this."
[[next|nine]]
<hr>
or talk to [[another|eight]] lawyer<img src="https://upload.wikimedia.org/wikipedia/commons/2/25/Michel-eyquem-de-montaigne_1.jpg" class="right">
The philosopher and mayor seems pleased to speak with you. "Let me first tell you about the importance of codes for diplomacy. When people tell lies to deceive, they struggle to keep their stories straight. But an encrypted message deceives without a lie. The true story is there, just hidden by technical means."
You nod in understanding.
"I have previously met visitors to France from Brazil and Canada. I did not find them barbarous or backward. I hope that you won't be corrupted by our supposed civilized ways." Montaigne seems to hold different views on your people than most Europeans you have met.
[[next|nine]]
<hr>
or talk to [[another|eight]] lawyer<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Francois_Viete.jpg/306px-Francois_Viete.jpg" class="right" width="250">
"Often in a legal document, lawyers use letters to stand in for a theoretical entity. For example, person X. So we can speak algebraically in mathematics by using letters for an unknown quantity. For your decryption, ''C'' represents the unknown place in the alphabet found by putting a place in the alphabet in for ''P'', then multiplying by 3 and adding 1."
You ask for an example. "F is the 6th letter so to encrypt F you would multiply by 3 and add 1, giving 19. So the plaintext F becomes the encrypted S, the 19th letter."
[[next|nine]]
<hr>
or talk to [[another|eight]] lawyer"Translators develop a certain sense about languages. Their insight could help you with this encrypted message."
Choose:
[[Mathieu da Costa]], interpreter for the Portuguese and now the French
[[Madeleine de L'Aubépine]], poet and literary patron
[[Blaise de Vigenère]], diplomat, cryptographer, and translator
<br>
The ciphertext
<div class="code">(print: $cipher's ($pick))</div><img src="https://d3d0lqu00lnqvz.cloudfront.net/media/media/8d18a839-9d51-4270-a21d-89800afa3215.jpg" class="right">
"In Timbuktu, I studied //On Extracting Obscured Correspondence// by Al-Kindi, from the 9th century. He explained how each letter in a written language has a typical frequency. If an encrypted message is long enough, that frequency will reveal itself in a substitution cipher. In most European languages, the letter //e// is often the most common letter in a piece of writing."
[[next|ten]]
<hr>
or talk to [[another|nine]] translator<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Portrait_of_a_woman%2C_said_to_be_Madeleine_de_L%27Aubespine%2C_Dame_de_Villeroy.jpg/177px-Portrait_of_a_woman%2C_said_to_be_Madeleine_de_L%27Aubespine%2C_Dame_de_Villeroy.jpg" class="right">
"Written language has certain peculiarities that give certain starting places for breaking a code. Look for what are called //digraphs//, that is repeated letters. These are usually only a small number of possibilities. You should also look for vowels because it's unusual for a text to have three or more consonants in a row. That is, in three consecutive cipher letters, most of the time, one is a vowel."
[[next|ten]]
<hr>
or talk to [[another|nine]] translator<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Blaise_de_Vigenere..._%28BM_1869%2C0612.200%29.jpg/164px-Blaise_de_Vigenere..._%28BM_1869%2C0612.200%29.jpg" class="right">
"Let me give you a useful tool for decryption. This is the Latin alphabet with the corresponding numbers. A with 1, B with 2, and so on. Any kind of basic substituion cipher uses this ordering. Remember to wrap around back to the beginning if you shift past the end."
<img src="https://blogs.glowscotland.org.uk/nl/public/woodlandsprimaryroom8/uploads/sites/26272/2020/05/20124405/letters-numbers-alphabet-chart-order-26-az-english.jpg" width="500">
[[next|ten]]
<hr>
or talk to [[another|nine]] translator"Finally, mathematicians have proved to be most adept at setting and breaking codes. Pay close attention, as I shall be testing you on your skill in decrypting this message."
Choose:
[[Jost Bürgi]], Swiss clockmaker and mathematician
[[Catherine de Parthenay]], mathematician and student of Viète
[[François Viète|viete]], mathematician and lawyer
<br>
The ciphertext
<div class="code">(print: $cipher's ($pick))</div><img src="https://upload.wikimedia.org/wikipedia/commons/7/7f/Jost_B%C3%BCrgi_Portr%C3%A4t.jpg" class="right" width="300">
"When working with modular arithmetic, clock numbers, it turns out you have to decide what zero means. Our clocks come from before the adoption of zero in Europe so they start at one o'clock. But what time is it during the hour before that? 12 o'clock. So, if you get 0 from a calculation for modulus 26, treat that as 26."
[[next|eleven]]
<hr>
or talk to [[another|ten]] mathematician<img src="https://upload.wikimedia.org/wikipedia/commons/4/46/Catherine_de_Parthenay-2.jpg" class="right" width="320">
"When using an algebraic formula like ''C = 3P + 1'', keep in mind that this is modulus 26. So to turn the letter T into ciphertext, you multiply its place, 20, by 3 and add 1. That gets you 61 and of course, there's no 61st letter. So divide by 26 and take the remainder. That's a remainder of 9, so the letter I."
[[next|eleven]]
<hr>
or talk to [[another|ten]] mathematician<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Signature_Fran%C3%A7ois_Vi%C3%A8te.svg/320px-Signature_Fran%C3%A7ois_Vi%C3%A8te.svg.png" class="right">
"Working from the ciphertext back to the plaintext requires the algebraic art of solving the equation ''C = 3P + 1'' for ''P''. Subtract 1 from both sides of the equation and then divide by 3. This gives ''P = (C - 1)/3''.
"So if we see the letter J in the ciphertext, subtract 1 from 10 to get 9 and then divide by 3 to get the 3rd letter, C."
This makes sense until you try the letter L and get a fraction. "Yes, we have to use modular arithmetic. Which means we can keep adding 26 until we get a multiple of 3. 12 minus 1 is 11. Add 26 to get 37, not a multiple of 3, so add another 26 to get 63. Now we can divide by 3 to get 21, or the letter U."
[[next|eleven]]
<hr>
or talk to [[another|ten]] mathematician<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Maximilien_de_B%C3%A9thune%2C_1er._Duc_de_Sully.png/283px-Maximilien_de_B%C3%A9thune%2C_1er._Duc_de_Sully.png" class="right">
"So, have you discerned the meaning of the message?"<br>
The message is about one of the following:
<table id="t1">
<tr><td>[[Portugal]]</td><td>[[trade]]</td><td>[[piracy]]</td></tr>
<tr><td>[[treaties]]</td><td>[[Holland]]</td><td>[[Protestants]]</td></tr>
</table>
<br>
The ciphertext
<div class="code" width="600">(print: $cipher's ($pick))</div>(if: $pick is 3)[Well done! <hr>completion code: $code]
(else: )[Sorry, that is not correct. <br>[[try again|five]] or [[quit]] ](if: $pick is 4)[Well done! <hr>completion code: $code]
(else: )[Sorry, that is not correct. <br>[[try again|five]] or [[quit]] ](if: $pick is 5)[Well done! <hr>completion code: $code]
(else: )[Sorry, that is not correct. <br>[[try again|five]] or [[quit]] ](if: $pick is 6)[Well done! <hr>completion code: $code]
(else: )[Sorry, that is not correct. <br>[[try again|five]] or [[quit]] ](if: $pick is 1)[Well done! <hr>completion code: $code]
(else: )[Sorry, that is not correct. <br>[[try again|five]] or [[quit]] ](if: $pick is 2)[Well done! <hr>completion code: $code]
(else: )[Sorry, that is not correct. <br>[[try again|five]] or [[quit]] ]Gigawaabamin.