Advertisement
Python253

Bigrams

Mar 29th, 2023 (edited)
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.15 KB | None | 0 0
  1. K4: Bigrams & Visual Observations
  2.  
  3. Ciphertext In Groups Of 14:
  4. ?OBKRUOXOGHULB
  5. SOLIFBBWFLRVQQ
  6. PRNGKSSOTWTQSJ
  7. QSSEKZZWATJKLU
  8. DIAWINFBNYPVTT
  9. MZFPKWGDKZXTJC
  10. DIGKUHUAUEKCAR
  11.  
  12. FULL CIPHERTEXT IN 14×7 Split Matrix:
  13. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  14. | 1| 2| 3| 4| 5| 6| 7| | 8| 9 | 10 | 11 | 12 | 13 | 14 |
  15. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  16. | ? | O | B | K | R | U | O | | X | O | G | H | U | L | B |
  17. | S | O | L | I | F | B | B | | W | F | L | R | V | Q | Q |
  18. | P | R | N | G | K | S | S | | O | T | W | T | Q | S | J |
  19. | Q | S | S | E | K | Z | Z | | W | A | T | J | K | L | U |
  20. | D | I | A | W | I | N | F | | B | N | Y | P | V | T | T |
  21. | M | Z | F | P | K | W | G | | D | K | Z | X | T | J | C |
  22. | D | I | G | K | U | H | U | | A | U | E | K | C | A | R |
  23. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  24.  
  25.  
  26. I Moved The "?" To The End Because It Isn't Part Of The K4 Ciphertext & Only There To Line Up Evenly In The Grid To Show The Bigram Doublets.
  27.  
  28. Since I Can't Upload Images, This Will Be More Difficult To Present These Findings, But I Will Fo My Best.
  29.  
  30. In This Matrix Grid, We Can Find Matching Bigram Doublet Pairs Of Identical Letters (Eg; BB, SS, QQ, TT...) Looking In All Directions (Horizontal, Vertical & Diagonal) That Are Directly Touching Within 1 Cell.
  31.  
  32. We Can Further See Bigrams Doublets That Are Not Identical, Such As "SO" & "DI" Which Appears As Repeating Bigrams.
  33.  
  34. I Have Identified All Bigrams In K4, Matched The Values Of Each Line To The Distance Of The Nearest Identical Letters & Have Found Some Patterns Which May Reveal How The Ciphertext Was Transposed.
  35.  
  36. The 97 Characters Of K4 Do Not Move, They Are Shifted With A Transposition/Substitution Method Using A Specific Route.
  37.  
  38. More Observations:
  39. •There Are 2 Letters "Y" & "M" And The "?" Padding, That Are Only Seen Once Inside The Ciphertext.
  40.  
  41. •If We Leave The "?" At The Beginning, The Letters "O" (First Letter In Each Group) & "D" (Last Letter Of Each Group)Line Up In Right Angles Opposite To Each Other (Essentially Creating A Box).
  42.  
  43. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  44. | 1| 2| 3| 4| 5| 6| 7| | 8| 9 | 10 | 11 | 12 | 13 | 14 |
  45. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  46. |[O]| B | K | R | U | O | X | |[O]| G | H | U | L | B | S |
  47. |[O]| L | I | F | B | B | W | | F | L | R | V | Q | Q | P |
  48. | R | N | G | K | S | S | O | | T | W | T | Q | S | J | Q |
  49. | S | S | E | K | Z | Z | W | | A | T | J | K | L | U |[D] |
  50. | I | A | W | I | N | F | B | | N | Y | P | V | T | T | M |
  51. | Z | F | P | K | W | G |[D]| | K | Z | X | T | J | C |[D] |
  52. | I | G | K | U | H | U | A | | U | E | K | C | A | R | ? |
  53. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  54. Note:
  55. This Is With Padding "?" At The End, Not The Beginning Of The Grid.
  56.  
  57. Now I Will Try To Give The Data Of My Grids & Handwritten Matrixes In A Human Readable Way.
  58.  
  59. • Assume The Grid Is 14 Columns Wide, By 7 Rows Deep.
  60.  
  61. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  62. | 1| 2| 3| 4| 5| 6| 7| | 8| 9 | 10 | 11 | 12 | 13 | 14 |
  63. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  64. | ? | O | B | K | R | U | O | | X | O | G | H | U | L | B |
  65. | S | O | L | I | F | B | B | | W | F | L | R | V | Q | Q |
  66. | P | R | N | G | K | S | S | | O | T | W | T | Q | S | J |
  67. | Q | S | S | E | K | Z | Z | | W | A | T | J | K | L | U |
  68. | D | I | A | W | I | N | F | | B | N | Y | P | V | T | T |
  69. | M | Z | F | P | K | W | G | | D | K | Z | X | T | J | C |
  70. | D | I | G | K | U | H | U | | A | U | E | K | C | A | R |
  71. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  72.  
  73. Note:
  74. We Will Read The Bigram Locations As Follows:
  75. Bigram (Row:Column)
  76.  
  77.  
  78. Vertical:
  79. OO (1:2, 2:2)
  80. KK (3:5, 4:5)
  81.  
  82. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  83. | 1| 2| 3| 4| 5| 6| 7| | 8| 9 | 10 | 11 | 12 | 13 | 14 |
  84. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  85. | ? |[O]| B | K | R | U | O | | X | O | G | H | U | L | B |
  86. | S |[O]| L | I | F | B | B | | W | F | L | R | V | Q | Q |
  87. | P | R | N | G |[K]| S | S | | O | T | W | T | Q | S | J |
  88. | Q | S | S | E |[K]| Z | Z | | W | A | T | J | K | L | U |
  89. | D | I | A | W | I | N | F | | B | N | Y | P | V | T | T |
  90. | M | Z | F | P | K | W | G | | D | K | Z | X | T | J | C |
  91. | D | I | G | K | U | H | U | | A | U | E | K | C | A | R |
  92. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  93.  
  94. Horizontal:
  95. BB (2:6, 2:7)
  96. QQ (2:13, 2:14)
  97. SS (3:6, 3:7)
  98. SS (4:2, 4:3)
  99. ZZ (4:6, 4:7)
  100. TT (5:13, 5:14)
  101.  
  102. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  103. | 1| 2| 3| 4| 5| 6| 7| | 8| 9 | 10 | 11 | 12 | 13 | 14 |
  104. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  105. | ? | O | B | K | R | U | O | | X | O | G | H | U | L | B |
  106. | S | O | L | I | F |[B]|[B]| | W | F | L | R | V |[Q] |[Q] |
  107. | P | R | N | G | K |[S]|[S]| | O | T | W | T | Q | S | J |
  108. | Q |[S]|[S]| E | K |[Z]|[Z]| | W | A | T | J | K | L | U |
  109. | D | I | A | W | I | N | F | | B | N | Y | P | V |[T] |[T] |
  110. | M | Z | F | P | K | W | G | | D | K | Z | X | T | J | C |
  111. | D | I | G | K | U | H | U | | A | U | E | K | C | A | R |
  112. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  113.  
  114. Diagonal:
  115. QQ (2:13, 3:12)
  116. TT (3:9, 4:10)
  117. TT (3:11, 4:10)
  118. TT (5:13, 6:12)
  119. KK (6:5, 7:4)
  120.  
  121. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  122. | 1| 2| 3| 4| 5| 6| 7| | 8| 9 | 10 | 11 | 12 | 13 | 14 |
  123. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  124. | ? | O | B | K | R | U | O | | X | O | G | H | U | L | B |
  125. | S | O | L | I | F | B | B | | W | F | L | R | V |[Q] | Q |
  126. | P | R | N | G | K | S | S | | O |[T] | W |[T] |[Q] | S | J |
  127. | Q | S | S | E | K | Z | Z | | W | A |[T] | J | K | L | U |
  128. | D | I | A | W | I | N | F | | B | N | Y | P | V |[T] | T |
  129. | M | Z | F | P |[K]| W | G | | D | K | Z | X |[T] | J | C |
  130. | D | I | G |[K]| U | H | U | | A | U | E | K | C | A | R |
  131. +---+---+---+---+---+---+---+----+---+----+----+----+----+----+----+
  132.  
  133. Non-Identical Repeating Bigram Pairs: (Need To Order List)
  134.  
  135. AT (4:9, 3:9)
  136. AT (4:9, 4:10)
  137. AT (7:13, 6:12)
  138.  
  139. BS (2:6, 3:6)
  140. BS (2:7, 3:7)
  141.  
  142. CA (6:14, 7:13)
  143. CA (7:12, 7:13)
  144.  
  145. DI (5:1, 5:2)
  146. DI (7:1, 7:2)
  147. DZ (5:1, 6:2)
  148. DZ (7:1, 6:2)
  149. DM (5:1, 6:1)
  150. DM (7:1, 6:1)
  151.  
  152. EK (4:4, 4:5)
  153. EK (4:4, 3:5)
  154. EK (7:10, 6:9)
  155. EK (7:10, 7:11)
  156.  
  157. FB (2:5, 2:6)
  158. FB (5:7, 5:8)
  159. FK (2:5, 3:5)
  160. FK (6:3, 7:4)
  161. FW (2:9, 2:8)
  162. FW (2:9, 3:10)
  163. FW (6:3, 5:4)
  164. FW (5:7, 4:8)
  165. FW (5:7, 6:6)
  166. FZ (5:7, 4:6)
  167. FZ (5:7, 4:7)
  168. FZ (6:3, 6:2)
  169.  
  170. HU (1:11, 1:12)
  171. HU (7:6, 7:5)
  172. HU (7:6, 7:7)
  173.  
  174. IK (2:4, 1:4)
  175. IK (2:4, 3:5)
  176. IK (5:5, 4:5)
  177. IK (5:5, 6:5)
  178. IM (5:2, 6:1)
  179. IM (7:2, 6:1)
  180. IW (5:5, 5:4)
  181. IW (5:5, 6:6)
  182. IF (2:4, 2:5)
  183. IF (5:2, 6:3)
  184. IF (7:2, 6:3)
  185. IN (2:4, 3:3)
  186. IN (5:5, 5:6)
  187. IZ (7:2, 6:2)
  188. IZ (5:5, 4:6)
  189. IZ (5:2, 6:2)
  190.  
  191. JT (4:11, 4:10)
  192. JT (4:11, 3:11)
  193. JT (6:13, 6:12)
  194. JT (6:13, 5:13)
  195. JT (6:13, 5:14)
  196. JQ (3:14, 2:13)
  197. JQ (3:14, 2:14)
  198. JQ (4:11, 3:12)
  199.  
  200. KB (3:5, 2:6)
  201. KB (6:9, 5:8)
  202. KL (1:4, 2:3)
  203. KL (4:12, 4:13)
  204. KS (3:5, 3:6)
  205. KS (4:5, 3:6)
  206. KS (4:12, 3:13)
  207. KZ (3:5, 4:6)
  208. KZ (4:5, 4:6)
  209. KZ (6:9, 6:10)
  210. KZ (7:11, 6:10)
  211.  
  212. NG (3:3, 3:4)
  213. NG (5:6, 6:7)
  214. NW (5:9, 4:8)
  215. NW (5:6, 6:6)
  216.  
  217. OB (1:2, 1:3)
  218. OB (2:2, 1:3)
  219. OB (1:7, 2:6)
  220. OB (1:7, 2:7)
  221. OB (3:8, 2:7)
  222. OF (1:9, 2:9)
  223. OF (3:8, 2:9)
  224. OL (1:2, 2:3)
  225. OL (2:2, 2:3)
  226. OL (1:9, 2:10)
  227. OW (1:7, 2:8)
  228. OW (1:9, 2:8)
  229. OW (3:9, 2:8)
  230. OW (3:8, 4:8)
  231. OX (1:7, 1:8)
  232. OX (1:9, 1:8)
  233.  
  234. PK (6:4, 6:5)
  235. PK (6:4, 7:4)
  236. PK (5:11, 4:12)
  237.  
  238. SK (3:6, 3:5)
  239. SK (3:6, 4:5)
  240. SK (3:13, 4:12)
  241. SO (2:1, 1:2)
  242. SO (2:1, 2:2)
  243. SO (3:6, 3:7)
  244. SP (2:1, 3:1)
  245. SP (4:2, 3:1)
  246. SW (3:7, 2:8)
  247. SW (3:7, 4:8)
  248. SW (4:3, 5:4)
  249. SZ (3:6, 4:6)
  250. SZ (3:7, 4:7)
  251.  
  252. UD (7:7, 6:8)
  253. UD 7:9, 6:8)
  254.  
  255. WA (4:8, 4:9)
  256. WA (5:4, 5:3)
  257. WA (3:10, 4:9)
  258. WT (2:8, 3:9)
  259. WT (4:8, 3:9)
  260. WT (3:10, 3:9)
  261. WT (3:10, 3:11)
  262. WT (3:10, 4:10)
  263.  
  264. ZN (4:6, 5:6)
  265. ZN (4:7, 5:6)
  266. ZN (6:10, 5:9)
  267.  
  268.  
  269. Distance To Nearest Matching Letter:
  270.  
  271. Rules:
  272. • Count By Spaces Between The Matching Letters.
  273. • No Word Wrapping. It Must Be Counted Inside The 14×7 Matrix Grid.
  274. (Otherwise We Also See Bigrams Such As QQ (2:13, 3:14) + Change Q In 4:1 To "1" Instead Of "11" Which Is Not Used)
  275. • You Can Move In Any Direction, Vertical, Horizontal & Diagonal.
  276. • You Can Move Multiple Directions To Reach The Matching Letters.
  277. • You Must Find The Shortest Path.
  278.  
  279. Here Is The Full Distance List Along With A Vertical And Horizontal Count For Every Row & Column:
  280.  
  281. Note:
  282. The Higher The Value, The More Mixed Up It Is.
  283.  
  284. By Rows:
  285.  
  286. Row 1: 0,1,3,2,3,6,2,5,2,5,6,3,3,6
  287. Sum: 47
  288.  
  289. Row 2: 2,1,7,3,4,1,1,2,4,3,5,3,1,1
  290. Sum: 38
  291.  
  292. Row 3: 3,3,3,3,1,1,1,2,1,2,1,1,6,3
  293. Sum: 31
  294.  
  295. Row 4: 11,1,1,6,1,1,1,2,3,1,3,3,3,3
  296. Sum: 40
  297.  
  298. Row 5: 2,2,5,2,3,3,3,3,3,0,7,3,1,1
  299. Sum: 38
  300.  
  301. Row 6: 0,4,4,3,1,2,4,7,2,3,5,1,2,2
  302. Sum: 40
  303.  
  304. Row 7: 2,2,4,1,2,6,2,3,2,6,2,2,5,5
  305. Sum: 44
  306.  
  307. By Columns:
  308.  
  309. Column 1: 0,2,3,11,2,0,2
  310. Sum: 20
  311.  
  312. Column 2: 1,1,3,1,2,4,2
  313. Sum: 14
  314.  
  315. Column 3: 3,7,3,1,5,4,4
  316. Sum: 27
  317.  
  318. Column 4: 2,3,3,6,2,3,1
  319. Sum: 20
  320.  
  321. Column 5: 3,4,1,1,3,1,2
  322. Sum: 15
  323.  
  324. Column 6: 6,1,1,1,3,1,2
  325. Sum: 20
  326.  
  327. Column 7: 2,1,1,1,3,4,2
  328. Sum: 14
  329.  
  330. Column 8: 5,2,2,2,3,7,3
  331. Sum: 24
  332.  
  333. Column 9: 2,4,1,3,3,2,2
  334. Sum: 17
  335.  
  336. Column 10: 5,3,2,1,0,3,6
  337. Sum: 20
  338.  
  339. Column 11: 6,5,1,3,7,5,2
  340. Sum: 29
  341.  
  342. Column 12: 3,3,1,3,3,1,2
  343. Sum: 16
  344.  
  345. Column 13: 3,1,6,3,1,2,5
  346. Sum: 21
  347.  
  348. Column 14: 6,1,3,3,1,2,5
  349. Sum: 21
  350.  
  351. Row Average: 40 (39.714285714285)
  352. Column Average: 20 (19.857142857142)
  353.  
  354. Note:
  355. If The Values Of The Row Or Column Average Is Greater Than The Row Or Column Sum,
  356. It Is More Mixed Up & Has A Higher Probability For Additional Steps In The Transposition Route.
  357. Lower Sum Values Mean It Is Closer To Plaintext & May Require Only 1 Step, Or It Remains The Same Value.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement