aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Terris <tkterris@gmail.com>2021-04-22 14:51:04 +0200
committerTrevor Terris <tkterris@gmail.com>2021-04-22 14:51:04 +0200
commit8e4e169a395257be63a80d732e6d127a53ea9976 (patch)
tree4d1eb92343c2104b46afaff9257caff87f6b1d64
parent00f89c47c7963c8873bee38a1d003d1cec443c5c (diff)
downloadls47-8e4e169a395257be63a80d732e6d127a53ea9976.tar.gz
ls47-8e4e169a395257be63a80d732e6d127a53ea9976.tar.bz2
Moved alternative board to a new "modifications" section
-rw-r--r--README.md114
1 files changed, 58 insertions, 56 deletions
diff --git a/README.md b/README.md
index 1d24595..1568b5f 100644
--- a/README.md
+++ b/README.md
@@ -63,62 +63,6 @@ To run (hand-run) the encryption/decryption, you will also need some kind of a
marker (e.g. a small shiny stone, bolt nut or similar kind of well-shaped
trash).
-#### Alternative playing-card-compatible board
-
-The following board can be used so that characters and offsets can be easily
-mapped to playing cards, similar to the Solitaire cipher [2]. Using playing
-cards could be more innocuous and easily explainable to the secret police than
-a set of peculiar numbered tiles.
-
-```
-0 a b c d e f
-g h i j k l m
-n o p q r s t
-u v w x y z _
-. , - + * / :
-? ! ' ( ) 1 2
-3 4 5 6 7 8 9
-```
-
-With this layout, the following mapping to playing cards is used:
-
-| **Character** | Card | Index | **Character** | Card | Index | **Character** | Card | Index | **Character** | Card | Index |
-|-----------|------|-------|-----------|------|-------|-----------|------|-------|-----------|------|--------|
-| a | A♦ | 1 | n | A♣ | 14 | _ | A♥ | 27 | 1 | A♠ | 40 |
-| b | 2♦ | 2 | o | 2♣ | 15 | . | 2♥ | 28 | 2 | 2♠ | 41 |
-| c | 3♦ | 3 | p | 3♣ | 16 | , | 3♥ | 29 | 3 | 3♠ | 42 |
-| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
-| j | 10♦ | 10 | w | 10♣ | 23 | ! | 10♥ | 39 | 7 | 7♠ | 46 |
-| k | J♦ | 11 | x | J♣ | 24 | ' | J♥ | 39 | 8 | 8♠ | 47 |
-| l | Q♦ | 12 | y | Q♣ | 25 | ( | Q♥ | 39 | 9 | 9♠ | 48 |
-| m | K♦ | 13 | z | K♣ | 26 | ) | K♥ | 39 | 0 | 10♠ | 49 (0) |
-
-The (x, y) offset can be calculated by first determining the index: take the
-number of the suit (0-3), multiply by 13, and add the card number (using 1 for
-the Ace, 11-13 for face cards). Then, determine the offset from the index
-using the usual modular arithmetic: `x = index % 7` and `y = index / 7`.
-
-Alphanumeric characters can be easily mapped to cards, with letters mapping to
-Diamonds or Clubs and numbers mapping to Spades (note that Spades face cards
-are ommitted). All of the special characters are mapped to the Hearts, though
-coming up with a mnemonic for the mapping of each special character to each
-Heart is left as an exercise for the reader.
-
-For LC4, the following board could be used:
-
-```
-# a b c d e
-f g h i j k
-l m n o p q
-r s t u v w
-x y z _ 2 3
-4 5 6 7 8 9
-```
-
-The "Hearts" suit would be ommitted from the card mapping table, and the index
-of each of the Spades would be decreased by 13 to compensate. `#` and `_`
-would map to 10♠ and A♠, respectively.
-
## How-To
You may as well see the paper [1], there are also pictures. This is somewhat more concentrated:
@@ -198,6 +142,8 @@ stays the same.
Grab a bag full of tiles and randomly draw them one by one. Key is the 49-item permutation of them.
+## Modifications
+
### Key expansion from a password
Remembering 49-position random permutation that includes weird characters is
@@ -252,6 +198,62 @@ This works because the cipher output is message-dependent: Having a wrong bit
somewhere in the middle causes avalanche effect and erases any meaning from the
text after several characters.
+### Alternative playing-card-compatible board
+
+The following board can be used so that characters and offsets can be easily
+mapped to playing cards, similar to the Solitaire cipher [2]. Using playing
+cards could be more innocuous and easily explainable to the secret police than
+a set of peculiar numbered tiles.
+
+```
+0 a b c d e f
+g h i j k l m
+n o p q r s t
+u v w x y z _
+. , - + * / :
+? ! ' ( ) 1 2
+3 4 5 6 7 8 9
+```
+
+With this layout, the following mapping to playing cards is used:
+
+| **Character** | Card | Index | **Character** | Card | Index | **Character** | Card | Index | **Character** | Card | Index |
+|-----------|------|-------|-----------|------|-------|-----------|------|-------|-----------|------|--------|
+| a | A♦ | 1 | n | A♣ | 14 | _ | A♥ | 27 | 1 | A♠ | 40 |
+| b | 2♦ | 2 | o | 2♣ | 15 | . | 2♥ | 28 | 2 | 2♠ | 41 |
+| c | 3♦ | 3 | p | 3♣ | 16 | , | 3♥ | 29 | 3 | 3♠ | 42 |
+| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
+| j | 10♦ | 10 | w | 10♣ | 23 | ! | 10♥ | 39 | 7 | 7♠ | 46 |
+| k | J♦ | 11 | x | J♣ | 24 | ' | J♥ | 39 | 8 | 8♠ | 47 |
+| l | Q♦ | 12 | y | Q♣ | 25 | ( | Q♥ | 39 | 9 | 9♠ | 48 |
+| m | K♦ | 13 | z | K♣ | 26 | ) | K♥ | 39 | 0 | 10♠ | 49 (0) |
+
+The (x, y) offset can be calculated by first determining the index: take the
+number of the suit (0-3), multiply by 13, and add the card number (using 1 for
+the Ace, 11-13 for face cards). Then, determine the offset from the index
+using the usual modular arithmetic: `x = index % 7` and `y = index / 7`.
+
+Alphanumeric characters can be easily mapped to cards, with letters mapping to
+Diamonds or Clubs and numbers mapping to Spades (note that Spades face cards
+are ommitted). All of the special characters are mapped to the Hearts, though
+coming up with a mnemonic for the mapping of each special character to each
+Heart is left as an exercise for the reader.
+
+For LC4, the following board could be used:
+
+```
+# a b c d e
+f g h i j k
+l m n o p q
+r s t u v w
+x y z _ 2 3
+4 5 6 7 8 9
+```
+
+The "Hearts" suit would be ommitted from the card mapping table, and the index
+of each of the Spades would be decreased by 13 to compensate. `#` and `_`
+would map to 10♠ and A♠, respectively.
+
## References
[1] *Kaminsky, Alan. "ElsieFour: A Low-Tech Authenticated Encryption Algorithm For Human-to-Human Communication." IACR Cryptology ePrint Archive 2017 (2017): 339.*