Marvin Encryption Scheme
Story
quote:
[14:59] Marvin1: haz aisr uadu zraiar [14:59] Orfailius: glaives could be more 🗡 [14:59] Orfailius: 🗡 🗡 🗡 🗡 🗡 🗡 🗡 🗡 🗡 🗡 [15:00] Marvin: io ua aiatdf osfpsufpdu osuf iaz pdns [15:00] Anarchid: dagger is an extremely fast alpha raider [15:00] Marvin: kaz [15:00] DeinFreund: not even rot13 [15:00] Anarchid: oh look marvin is back [15:00] Orfailius: who? [15:00] Marvin: ,audtd kommst du in ein level [15:00] Marvin: gazdr [15:01] Anarchid: anyway; dagger is an ultrafast alpha raider; its strenghts are speed and alpha, its weaknesses those of the raiders: low hp, low range, aoe [15:01] DeinFreund: what is that cipher [15:01] Anarchid: among raiders it's special by being fast and alpha, so nerfing hp doesn't reduce its uniqueness [15:02] DeinFreund: i think we should nerf Marvin's cipher [15:02] Marvin: im HATDODDADZAIDTSAWSZSDGFD [15:02] Anarchid: it's not a cipher, look at the letter distribution [15:02] Anarchid: "sdgfd" [15:02] Marvin: R3 [15:03] Anarchid: repetitive letters, and repetitive letters placed closely on the keyboard [15:03] DeinFreund: not on neo [15:03] Marvin: jazsits uatdud [15:03] DeinFreund: not on dvorak [15:03] Anarchid: it's like trying to get a random number and getting 31321233123 [15:03] Marvin: hazf [15:03] Marvin1: nahdoazg [15:03] Anarchid: because your idea of getting a random number is mashing on a keyboard [15:03] Anarchid: and keyboard is not random [15:03] Marvin: ok marvin1 [15:03] Marvin1: haha [15:03] Marvin: ): [15:03] Anarchid: he's mashing numbers on a qwerty [15:03] Anarchid: *buttons [15:04] Marvin: ok haidctd komm,laudf.q [15:04] DeinFreund: it could be an interesting cipher [15:04] Marvin: ! [15:04] Marvin: oaf [15:04] DeinFreund: whose characters are distributed by qwertz mashing distribution [15:04] Marvin: Anarchid komm [15:05] DeinFreund: maybe characters are encoded by the geometric distance between the letters [15:05] Anarchid: oh qwertz [15:05] Marvin: hdzagsdiats jatdjatd [15:05] Anarchid: yes that explains why so many z [15:05] DeinFreund: with highly frequent characters having low ids [15:05] DeinFreund: i need to implement that cipher now [15:05] Marvin: jerted [15:05] DeinFreund: it'd fool Anarchid [15:05] DeinFreund: then it'd fool everyone [15:05] Marvin: i [15:05] Marvin1: ksgdiazdtdudt [15:06] Marvin: ? [15:06] Marvin: < [15:07] Anarchid: how do you compute geometric distances? [15:07] Marvin: kfzfe
|
Hint
String lines[] = new String[]{
"qwertzuiop",
"asdfghjkl",
"yxcvbnm"
};
int distanceVerticalPerLine = 4;
int distanceHorizontalPerColumn = 1;
int splitCharacterDistance = 8;
//split distances > this into multiple characters because keyboard too small
String mostFrequentLetters = "etaoinsrhldcumfpgwybvkxjqz";
//distances for letters, characters not in this list remain plaintext
quote: [15:07] Anarchid: how do you compute geometric distances? |
Example
now we can finally speak in marvin
ahlbtr krtt afhb ldjnvrtlkrvn kvaadumk ie cfstlaqtf
same meaning:
fbxwhg yqww xbmh wfroudszumut duffszsy bf ietkvrfku
FIFDHDMMVM
fitwataavnmdecvnbgsea fb assfysxalbb awrjecmjz
gfiikz qqygh jjeznngkvcnsnnszr kvcduifg jcxhjfifg otd sg yvygzscedvfituii fiotzss eecewhwtgge uh jeeeuf tuzwxhss nmbhxhhwzifiiih
gmvyn snmm duikvcew xhdd gygkrtt ru myahkrejkrkh vmdfifrr tlll baarrwe jzwiuufifs goj hppp hjfifajhhc