aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTrevor Terris <tterris@redhat.com>2021-04-23 00:58:23 +0200
committerTrevor Terris <tterris@redhat.com>2021-04-23 01:04:38 +0200
commit2076f1b57b95b00807c8b00020227527bd6fd063 (patch)
tree07b094f5d83ee22bf4b78ff4119ef631c801f853 /README.md
parent8e4e169a395257be63a80d732e6d127a53ea9976 (diff)
downloadls47-2076f1b57b95b00807c8b00020227527bd6fd063.tar.gz
ls47-2076f1b57b95b00807c8b00020227527bd6fd063.tar.bz2
Change indexing to make card ordering more intuitive
Update the indexing so that the table starts at "1". This way the ordered card layout (used for key generation) starts with the Ace of Diamonds and proceeds through the cards and suits as normal. This seems cleaner than awkwardly prepending the 10 of Spades. However, it involves a slight tweak to the key key_derive function to support the change in card order.
Diffstat (limited to 'README.md')
-rw-r--r--README.md29
1 files changed, 15 insertions, 14 deletions
diff --git a/README.md b/README.md
index 1568b5f..9487cfb 100644
--- a/README.md
+++ b/README.md
@@ -206,16 +206,17 @@ 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
+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 0
```
-With this layout, the following mapping to playing cards is used:
+**This board uses a 1-based index**, so `a=1`, `b=2`, and so on. With this layout,
+the following mapping to playing cards is used:
| **Character** | Card | Index | **Character** | Card | Index | **Character** | Card | Index | **Character** | Card | Index |
|-----------|------|-------|-----------|------|-------|-----------|------|-------|-----------|------|--------|
@@ -242,12 +243,12 @@ 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
+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