From e2d83a886a650d4ee5bb46ace183ea0199ef586c Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Thu, 10 Apr 2025 18:01:01 +0300 Subject: [PATCH] fix: indenting --- README.md | 14 ++++++++++---- main.typ | 9 +++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 26fe68b..f882978 100644 --- a/README.md +++ b/README.md @@ -43,17 +43,23 @@ the input sequence. ## Encryption Process Let $P$ represent the plaintext composed of a sequence of characters: + $$P = p_{1},p_{2},\ldots,p_{n}$$ The ciphertext $C$ is produced by applying the reversal transformation: -$$C = \text{ reverse}(P) = p_{n},p_{n - 1},\ldots,p_{1}$$ For example, -if $P = \text{ sula}$, then: $$C = \text{ alus }$$ + +$$C = \text{ reverse}(P) = p_{n},p_{n - 1},\ldots,p_{1}$$ + +For example, if $P = \text{ sula}$, then: + +$$C = \text{ alus }$$ ## Decryption Process Given that the reversal operation is an involution (its own inverse), the decryption process involves applying the same transformation. Let $C$ be the ciphertext; then the plaintext $P$ is recovered as: + $$P = \text{ reverse}(C)$$ # Implementation Considerations @@ -61,10 +67,10 @@ $$P = \text{ reverse}(C)$$ A simple pseudocode implementation of the algorithm is as follows: function encrypt(plaintext): - return reverse(plaintext) + return reverse(plaintext) function decrypt(ciphertext): - return reverse(ciphertext) + return reverse(ciphertext) This algorithm may be implemented in any programming language. It is important to note that due to its simplicity, SULA-ALUS is only diff --git a/main.typ b/main.typ index 22a38c5..48c4519 100644 --- a/main.typ +++ b/main.typ @@ -69,11 +69,15 @@ the decryption operation -- they both consist of reversing the input sequence. == Encryption Process Let $P$ represent the plaintext composed of a sequence of characters: + $ P = p_1, p_2, ..., p_n $ The ciphertext $C$ is produced by applying the reversal transformation: + $ C = "reverse"(P) = p_n, p_(n-1), ..., p_1 $ + For example, if $P = "sula"$, then: + $ C = "alus" $ == Decryption Process @@ -81,6 +85,7 @@ $ C = "alus" $ Given that the reversal operation is an involution (its own inverse), the decryption process involves applying the same transformation. Let $C$ be the ciphertext; then the plaintext $P$ is recovered as: + $ P = "reverse"(C) $ = Implementation Considerations @@ -89,10 +94,10 @@ A simple pseudocode implementation of the algorithm is as follows: ``` function encrypt(plaintext): -return reverse(plaintext) + return reverse(plaintext) function decrypt(ciphertext): -return reverse(ciphertext) + return reverse(ciphertext) ``` This algorithm may be implemented in any programming language.