Talk:Chaocipher: Difference between revisions

From Rosetta Code
Content added Content deleted
(Latin Squares and Chaocipher)
(→‎Latin Square for left wheel: is there a significance of a letter in the square?)
 
Line 33: Line 33:
:new ciphertext alphabet[n]=current ciphertext alphabet[LS[p][n]]
:new ciphertext alphabet[n]=current ciphertext alphabet[LS[p][n]]
one obtains ONYQHXUCZVAMDBSLKPEFJRIGTW when p is 21.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 17:59, 20 July 2019 (UTC)
one obtains ONYQHXUCZVAMDBSLKPEFJRIGTW when p is 21.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 17:59, 20 July 2019 (UTC)

: Why is there the (Latin) lowercase letter &nbsp; '''o''' &nbsp; in the 9<sup>th</sup> row of this Latin square? &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:49, 9 August 2019 (UTC)

===Latin Square for right wheel===
===Latin Square for right wheel===
<pre>
<pre>

Latest revision as of 19:49, 9 August 2019

Latin Suares

The relationship between encryption and Latin Squares has been mentioned recently on RC. I thought it might be interesting to look at the Latin Squares associated with this task.

Latin Square for left wheel

  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25
 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24
 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23
 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22
 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21
 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20
 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19
 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18
 18 19 20 21 22 23o 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17
 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16
 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15
 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12 14
 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11 12
 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10 11
 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9 10
 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8  9
  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7  8
  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6  7
  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5  6
  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4  5
  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3  4
  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2  3
  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1  2
  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13  1
  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0 13
 13  1  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0

If p is the position of the ciphertext letter then given a current ciphertext alphabet, HXUCZVAMDSLKPEFJRIGTWOBNYQ say, then applying the bijection

new ciphertext alphabet[n]=current ciphertext alphabet[LS[p][n]]

one obtains ONYQHXUCZVAMDBSLKPEFJRIGTW when p is 21.--Nigel Galloway (talk) 17:59, 20 July 2019 (UTC)

Why is there the (Latin) lowercase letter   o   in the 9th row of this Latin square?     -- Gerard Schildberger (talk) 19:49, 9 August 2019 (UTC)

Latin Square for right wheel

 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24
 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23
 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22
 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21
 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20
 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19
 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18
 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17
 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16
 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15
 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14
 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11 12
 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10 11
 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9 10
 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8  9
  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7  8
  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6  7
  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5  6
  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4  5
  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3  4
  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2  3
  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13  2
  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1 13
 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0  1
  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25  0
  0  1 13  2  3  4  5  6  7  8  9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25

Now I just need a way to generate random Latin Squares of order 26 to program a better Chaocipher--Nigel Galloway (talk) 10:59, 21 July 2019 (UTC)