🕵️

Veni, Vidi, Decrypti

Week 43

You and your team are excavating a newly discovered Roman megacomplex, buried for 1000s of years. Unfortunately, some of the large amounts of text seem to be enciphered

Assuming it to be a simple Caesar cipher, you create a program and loop through all shift amounts 1-26, but none produce meaningful text. Excitingly, it must be some new, previously undiscovered Roman cipher that your team has discovered and you can try to crack

Miraculously, a few days later at another part of the site, someone digs up what seems to be a training/reference tablet for anyone that would have to encipher or decipher messages

You can see many examples on the pairs of lines below, with first the original plaintext ("p") and then the ciphertext ("c") written underneath it:

Your team notices two things about these examples, so your answer should also abide by these two rules:

  1. Plaintext is lowercase
  2. Spaces & punctuation are maintained - in other words, they should be output as is and not have any bearing on the calculation/state of your decoding algorithm

To prove your decoding algorithm works, you should create a program to try and decode the following message - if successful, the team will then hopefully be able to decode all other messages at the site

Paste your decoded answer below:

Hints

Hints will be released at the start of each of the following days - e.g. the start of day 3 is 48 hours after the challenge starts

Release Day Hint
2 You may have noticed, the first character in the ciphertext is always the same as the first character in the plaintext - this is the 'starting point'. Someone also points out that the ciphertext will always be the same length as the input plaintext, which, along with the similarly simple hand-calculated Roman ciphers, suggests this cipher might also operate on a character by character basis
3 Writing/outputting the alphabetic position (e.g. a = 1, b = 2 etc) of each character above the plaintext/ciphertext might help you see what is going on - what do you notice about the jump between letters? When does the ciphertext have a lowercase vs uppercase letter etc?
4 Each ciphertext character represents the 'jump' from the previous character (a = 0, b = 1...z = 25). Uppercase characters simply mean jump back - i.e. Z means jump back 25 characters in the alphabet. For example, if we have a starting character of 'n' and ciphertext of "nJnD", then this means start at 'n', then jump back 9 (J) places to get an 'e', then jump forward 13 (n) places to get an 'r', then finally jump back 3 (D) places to get an 'o' - giving a plaintext answer of "nero"
5 To code this, just loop over each character, storing the previous character's ASCII code, as well as the character index (a = 0, z = 25, Z = -25 etc) of the current ciphertext character - then just add this index to the previous character's ASCII code, to get the ASCII code of the current character - this character should then be appended to your answer
43 2026