From 4afa29aed3d94c52526151219649dd775bbb3330 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Thu, 29 Oct 2026 22:15:56 +0100 Subject: expansion example --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/README.md b/README.md index aad74ca..fdbe1bc 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,69 @@ mixing provided by this procedure (it **is** insufficient). Instead, run a few encryption rounds of random padding characters (i.e., a *nonce*) before starting the encryption of the actual plaintext (see below). +#### Key expansion example! + +We start with the "sorted" board: + +``` + _ 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 . + , : ? ! ' ( ) + 0 1 2 3 4 5 6 + 7 8 9 + - * / +``` + +Let's say the password is `BANANA12345`; we pick the tiles in order, and put them +down below. Repeating occurrences of `A` and `N` are ignored. + +``` + _ C D E F + G H I J K L M + O P Q R S T + U V W X Y Z . + , : ? ! ' ( ) + 0 6 + 7 8 9 + - * / + + + 5 + 4 3 2 1 N A B +``` + +We add the space (`_`) to the "end" of the password: + +``` + C D E F + G H I J K L M + O P Q R S T + U V W X Y Z . + , : ? ! ' ( ) + 0 6 + 7 8 9 + - * / + + + _ 5 + 4 3 2 1 N A B +``` + +The rest of the board becomes an imaginary snake and follows the lines to the +right and downwards, towards the password. Finally, the marker is placed to the +upper left: + +``` +[C]D E F G H I + J K L M O P Q + R S T U V W X + Y Z . , : ? ! + ' ( ) 0 6 7 8 + 9 + - * / _ 5 + 4 3 2 1 N A B +``` + +From this point, we can start the iterative encryption. + ### Indistinguishable ciphertexts To get a different ciphertext even if the same plaintext is encrypted -- cgit v1.2.3