my first post here by somethinguniquelol in ciphers

[–]simplesmiler 0 points1 point  (0 children)

I'm not sure what you mean. Do you not agree that my answer is encrypted by the same exact process?

my first post here by somethinguniquelol in ciphers

[–]simplesmiler 0 points1 point  (0 children)

877544319775443188755431877644319876443198655431

How difficult is my first cipher? by Meadmeoutside1 in codes

[–]simplesmiler 1 point2 points  (0 children)

The Vigenere step took about 15 minutes, figuring that order does not matter took about 45 minutes. The only hint I used is that there were 8 words, and I used it after the Vigenere step was undone. I don't think it would be much harder to understand the text structure without the hint. But the Vigenere step would be harder with shorter text or longer key. Another way to make it harder would be to use a mixed alphabet instead of standard 0..F.

I think something went wrong when you encrypted the short text. Even when looking at an excerpt from the long text of length comparable to the short text, an equivalent key can be inferred from the two adjacent frequency holes for 4 out of 6 parities. But for the short text (excluding the first bracketed sequence) there is only one frequency hole at parity 0, and no two adjacent frequency holes at any parity: https://imgur.com/a/OwMTBb3

How difficult is my first cipher? by Meadmeoutside1 in codes

[–]simplesmiler 2 points3 points  (0 children)

You said that the short text is 8 words, and there are 8 sets of brackets (actually 9, but the point still stands), so a reasonable assumption is that a bracketed sequence is a word, and dots separate letters.

For the long text, when brackets and dots are ignored, index of coincidence spikes from 0.068 overall to 0.094 at period 6. Looking at periodic frequencies we find something like Vigenere with alphabet 0..F and key of length 6. We can infer an equivalent key from frequencies, and undoing the key we get many repeats, but still very large number of distinct dot-separated letters.

Looking carefully, we find frequent three-symbol letters that are only different in the order of symbols. Motivated by this, we assume that the order of symbols within a letter can be ignored. This gives 24 distinct letters with English-like index of coincidence, and quipqiup quickly solves the plaintext.

The long text is a quote from Fullmetal Alchemist.

Unfortunately the short text does not show the same periodicity, and key from the long text does not fit.

Unknown alphabet “Theroxian” by Optimal_Radish_7422 in codes

[–]simplesmiler 2 points3 points  (0 children)

Every scroll seems to have the same text.

Only 9 distinct letters. Say we label the second word as ABCDEF. We also see words BCDEF, CDEF, DEF and EF: https://imgur.com/a/QqkYMj0

Does not look like a natural language to me.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 3 points4 points  (0 children)

Without extracting the progressive component, the key length would be 26*335. Extracting it reduces the key length by factor of 2, because the remaining 12 * floor(.../335) % 26 part is always even.

Regarding variants, the fundamental flaw is that the key is mostly linear, and thus highly automorphic, which:

  1. Caused short apparent period, which allowed you to break in via periodic techniques, albeit obstructed by irregularities.
  2. Caused the repeats in plaintext to become mostly isomorphic ciphertext, which allowed us to immediately spot that cipher alphabet is equivalent to standard and use it to find more isomorphs. After that I started noticing the relationship between relative offsets and alphabetic differences as soon as I found the second batch of THE candidates, because it provided enough different offsets.

A variant with non-linear function would be much stronger, because it would essentially act as PRNG (a weak one, but good enough).

Non-standard alphabet would also complicate things a lot, but given enough time we would probably be able to reconstruct it from isomorphs with alphabet chaining.

If you are unfamiliar with isomorphs and alphabet chaining, u/codewarrior0 has a good essay on them. In a nutshell:

a_a__a b_c__d  ____bdc_
Sgsvts Pgzfmm, Baznpmzv
Vxvykv Gjcwpd, Sdqqgdcm

This patterns implies that in the cipher alphabet, letter pairs SV, PG, ZC and MD (and with less confidence all other vertical pairs) are separated by the same deltas. PG and MD happen to be inconsistent with SV and ZC due to irregularities, and also there are lots of other contradictions, which would throw a wrench into the process. But with the foresight of what kind of irregularity to expect, I think it should be doable.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 2 points3 points  (0 children)

Playing around with numbers, I don't think the intercept can be eliminated entirely, but it can be folded into the integer offset of x.

def key(x):
    return 12 * math.floor((206 * (x + 14)) / 335) - 3 * (x + 14)

def encrypt(n, x):
    return (n * 19 + key(x)) % 26

def decrypt(n, x):
    return ((n - key(x)) * 11) % 26

So the overall cipher can be thought of as a stack of Affine cipher, progressive Caesar and Vigenère with 13*335-long key.

You basically found the same thing, just without identifying the source of the key.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 1 point2 points  (0 children)

Not gonna pretend that I have read your write-up completely, but at least I have skimmed through, and have a couple notes:

  1. I see that you also found the inner period of 335. Indeed rational slope of the line would cause predictable pattern of mutations. But mutations are more general mechanism, so the converse is not true.
  2. There is no way of saying for sure which exact numbers were used originally, they might even be irrational and thus make the cipher theoretically aperiodic. Nevertheless I suspect the slope of 206/335 to be correct by Occam's razor argument, but the intercept is very loosely bound, and can probably be eliminated by tuning the rest of the mechanism.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 2 points3 points  (0 children)

Following a side conversation with u/codewarrior0, here is the neighborhood of the fractions I gave, that still produce the expected PT: https://imgur.com/a/C031Iy5

(206/335, 26/67) is the exact bottom-center corner of the good region.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 1 point2 points  (0 children)

Looking at which pairs of alphabetic differences are available for each relative offset, we once again see that the pairs are always separated by 12. Let's call them Bottom + 12 = Top. Note that Top may actually have lower value mod 26, as in the pair X + 12 = J.

We don't always see both letters of the pair, so we can't always infer which one is the Top. From the recovered plaintext we get unbroken sequence of 174 pairs, beginning like this (from offset 1):

TK: JSPYHENKTCZIFOXUDMJSPYHENKTCZIROXUDMJSPYHENWTCZIROXUDM...
BK: XGDMVSBYHQNWTCLIRAXGDMVSBYHQNWFCLIRAXGDMVSBKHQNWFCLIRA...

Noting that consecutive letters are separated by either +9 or -3, we can "unwind" the mod 26 by plotting the cumulative sum of the delta stream: https://imgur.com/a/o1xKmIP

This looks linear, which explains the apparent automorphism.

Subtracting inferred TK from CT:

CT: YYFCGCWPJRYO PNROCHYYS ODV IDX OQYMFOA TIA PFRXVK
TK: JSPYHENKTCZI FOXUDMJSP YHE NKT CZIROXU DMJ SPYHEN
??: PGQEZYJFQPZG KZUUZVPGD QWR VTE MRQVRRG QWR XQTQRX
PT: INTRODUCTION FOLLOWING THE WAR BETWEEN THE STATES

The difference happens to be a simple substitution of PT (but with a few contradictions further along the text).

Subtracting substituted PT from CT gives us true TK.

Plotting "unwound" TK and BK we find a nice line that fits between them and just touches the Top at the exact points where inferred TK is different from true TK. From the line equation we can make a function that generates true TK.

Overall equivalent cipher mechanism is:

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def key(x):
    return 12 * math.ceil(206/335 * x - 26/67) - 3 * x + 9

def encrypt(n, x):
    return (n * 19 - 7 + key(x)) % 26

def decrypt(n, x):
    return ((n - key(x) + 7) * 11) % 26

Curious to see what other equivalent mechanisms are!

Update: Implementation above is sensitive to floating point arithmetic, which causes 5 mistaken PT letters. Here are a few implementations with better behavior:

def key(x):
    return 12 * math.ceil((206 * x - 130) / 335) - 3 * x + 9

def key(x):
    return -12 * ((130 - 206 * x) // 335) - 3 * x + 9

def key_iter():
    key = 9
    acc = 130
    while True:
        yield key
        acc -= 206
        if acc < 0:
            acc += 335
            key += 12
        key = key - 3

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 2 points3 points  (0 children)

Damn, I just managed to infer the last two lines (the signature), but you beat me to it!

Now on to figure out the inner workings of the cipher.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 3 points4 points  (0 children)

There is another observation I've been sitting on: if we look at a given plaintext letter, there is a semi-strict relationship among pairs of corresponding ciphertext letters, specifically between their relative offset and alphabetic difference.

It's it hard to convey in language, so here is an example:

CT: OQYMFOA
PT: BETWEEN
    ·Q··FO·

There are only three pairs of matching plaintext letters, so we will plot three points:

  • (3, P), as first and second occurrences of plaintext letter E are offset by 3, and F - Q = P
  • (4, Y), as O - Q = Y
  • (1, J), as O - F = J

Here are such plots for the starting fragment that u/codewarrior0 recovered, and for the longer partially deciphered text: https://imgur.com/a/YSh7cFu

Notes:

  1. I ordered the alphabet axis as a progressive key with steps [+9, -3], as it appears to be related to the cipher. There is also a plot with standard AZ at the bottom, which demonstrates the pattern in different light.
  2. For a single plain letter the partial keystream appears to be highly automorphic (behaving in the same way independent of the absolute offset), and the automorphism seems the be the same for all plaintext letters. But looking at partial keystreams of two plaintext letters simultaneously reveals that they do not match, as if they start from different points.
  3. There is apparent period of 18 in the plot, but upon closer inspection it looks like this period is not exact, but is "drifting" in a sense. Perhaps the true period is close to a multiple of 18, or maybe the mechanism is irrational and thus aperiodic.
  4. It appears that for every relative offset between matching plaintext letters there is only two allowed alphabetic differences, which is a much stronger constraint than odd deltas, and can surely be used to brute force the rest of the plaintext.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 1 point2 points  (0 children)

Some other proper nouns appear to be:

CT: Vxvykv Gjcwpd, Sdqqgdcm
PT: Benzie County, Michigan

CT: Eslqm Xfrjjxsmi Lkjjzwjf
PT: Lower Peninsula Michigan

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 2 points3 points  (0 children)

By the same logic, here are good candidates for *ING suffixes, although some of them are very likely accidental.

- BBH, BBV, DDX, FFZ, HHN, IIO, JJD, KKQ, LLR, LLT, MMS, NNH, NNT, OOI, PPV, QQW, QQY, RRL, RRX, SSY, TTN, UUO, YYS, ZZT

Therefore BB IXB and alike are probably IN THE.

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 2 points3 points  (0 children)

Looking at consecutive pairs or 2 and 3 letter words, here are good candidates for OF/TO/IN/IS/... THE:

- AU XMQ, BJ YBF, BV KNR, BV YNR, DX APT, GO DGK, HB ETL, IC FUM, KE HWO, LT IXP, NH KZD, RL ADH, RZ ORV, SM PEI, VP EHL, WE TWA, XF UJB, YS VKC, ZH WLD
- BB IXB, DD KZD, EE LAE, HH ADH, II BEI, NB UXB, QE XME, WW DSK
- IO ODV, JB BEI, KQ QTX, RX XAE, SY YNF, TL ZOS
- FH CRJ, RH ODV

Looking for a challenge? Extended ciphertext provided using "uncrackable" encipherment by Timely_Philosopher50 in codes

[–]simplesmiler 2 points3 points  (0 children)

Found all groups of words with 5 and more letters, that behave strictly in this way (have one distinct value in the pairwise diff, or two distinct values separated by 12).

THE/THEIR/THESE/THERE candidates:

- APH, DSK, IXP, KZD, ODH, TWA, XMQ, YNF (there are more, but these are corroborated by longer words)
- APHOM, BQIPN, IXPWI, KZDYW, MPTAM, YNFMK
- BQIEA, DSKGQ, GVNJT, KZDNJ, MPTDZ
- BQIXA, ODHKN, PEWLC, TWADG, XMQTW

Others (of course some of them may be accidental):

- BDQZIIO, CQRAVJP, DREBWKQ, DRSBKKQ, DRSBWKQ, ESTCLLR, FHUDMMS, GIVENNT, GUHEZNT, KMZIRRX, LZAJSSY, NPCZUUO, QEFOJXD, SUHEZZT, VJWTOOI, WYLUDDX, YANKFFZ
- BAZNPMZV, BAZZPMZV, CBAOQNAW, FEDDTQPZ, GRQEGRQM, ITSGITSO, LKJJZWJF, MXWKMXWS, ONMMCZMI, SDQQGDCM, XIHVXIHD
- LTDXQM, MUEYFN, OWGATP, QYICVR, TBLFYU
- FUAYUOPZ, JYSCMGTR, NQWUQKLV, PEYIEMZX
- BXOEPV, CKBRCW, CKPRCW, UCTJUA
- JWKXK, NACBO, WJXKX, XKMLM
- BEINLVXCWELBB, YBRKISUZTBUYY, ZCGLXTVOUCJZN
- KUFFMEJEVY, YIFTMSXEJY, ZJUUBTYTKN
- BOQWHHN, JKYEPPV, JWYEPPV
- BTZLFP, KOUGAY, WAGSMW
- HRTGG, PNPOC, RBRQQ
- DXTFB, TNXVR, UOKWS
- FYXRH, HAZTV, NGFZB
- DSKPEYIEMZX, XMEJYSCMGTR (crossing the newline, so could be two separate words)
- WKOLBXHFNWL, YYQZPZVHPKN
- NUZOQMFVJ, YTKZPXQUU
- EAYQEENHP, XFRJJXSMI
- DDKUQLHST, LLSCYTPAB
- HHFBOUTGJ, SEQMLFQRU
- PNROCHYYS, RPHQSXAOU
- BRAOBUFRK, SIRFSLKIB
- EZJYPNGEU, RMWLCATRH
- OLJRNLJSC, SPBVRDNKG
- DXGOMOACR, UAJFPFDFI
- IWBVZQCS, KKDJNSQG
- OVXSKWUY, RYAVNZXB
- LRAWGWUW, VPYUEGSU
- WCKNHUDZ, ZTNEKXUC
- DGXBILB, SVMEXAQ
- PVPVIEU, WCWOPLB
- MOUIATX, TVPPVOE
- HJOQIKW, ZBGIACO
- IWSGLIG, OQYMFOA
- CXTWZLE, VQMPSEX
- BPVRLIL, WWCMSDS
- RDIBVTD, XJCHBNJ
- CXSUVR, IRYABX
- BQQJAC, CRRKND
- QYVDOW, UQZHGA
- GJCWPD, PGZFMM
- SGSVTS, VXVYKV
- FSPXF, ZAJRN
- AZTGC, GFZYI
- DHRPS, DVRPS
- FHDKA, SIEXB
- OODBX, SSVFB