Fractionated Morse
Fractionated Morse
Morse chopped into triples, each triple a letter.
- Keyspace
- 26!
- Decode
- same options back
- Works on
- A-Z and 0-9, spaces between words, x pads the last triple, the rest dropped
- Family
- 10 in fractionation
Options
Access
- Create
create("fractionated-morse") - CLI
ciphers encode fractionated-morse 'COME AT ONCE' --key ROUNDTABLE - Tryplayground with the sample above
- Kinpolybius, nihilist, morse, bacon +5
Spell the message in Morse. Chop the dots and dashes into threes. Give every three a letter. That's the whole trick, and it works better than it sounds. The triples don't care where a letter ends, so a frequency count never finds a clean E.
const fractionated = create("fractionated-morse");
fractionated.encode("Come at once", { key: "ROUNDTABLE" }).text; // "CBIILTMHVVFL"
fractionated.decode("CBIIL TMHVV FL", { key: "ROUNDTABLE" }).text; // "COME AT ONCE"
That's the example from the ACA's Fractionated Morse page. Ten letters in, twelve out. The separators aren't free.
Where do the x go?
One x between letters, two between words. COME AT becomes -.-.x---x--x.xx.-x-. Then the Morse is read three symbols at a time. When the last triple comes up short, x fills it.
Three x in a row never happens. So xxx gets no letter, and 26 triples are left for 26 letters. Neat, right?
Which letter is which triple?
The triples stand in a fixed order, dot before dash before x. ... comes first, then ..-, then ..x, down to xx-. The key is written under that row. ROUNDTABLE turns into ROUNDTABLECFGHIJKMPQSVWXYZ, repeats dropped, so R means ... and Z means xx-. A whole alphabet of 26 letters works as it stands.
What gets enciphered?
Letters and digits. Spaces split the words. Punctuation drops out, as the ACA normally does it, so Come at once. gives the same twelve letters. A constructor may encipher commas too. Then encoding here won't match, but decoding still reads back every code the Morse table knows, punctuation included.
On the way back only A to Z count. Groups of five, the way the ACA prints them, are fine. Output is uppercase, words split by single spaces.
Why does it refuse my ciphertext?
Because the key is wrong, usually. Take the plain alphabet. I is .xx, R is -xx, and S to Z all start with x. So IS or RZ spells three x in a row, which no message gives. Decoding throws CipherError on that, on Morse that starts with x, and on a code that's no character at all. AA is six dots, and Morse has nothing with six dots.
That's good news when you're testing keys by hand. A bad one tends to blow up instead of handing you quiet garbage.
guess doesn't know this cipher yet, and recover doesn't take it. A missing key is a MissingOptionError, a key without letters an InvalidOptionError.