fix: indenting

This commit is contained in:
Kristofers Solo 2025-04-10 18:01:01 +03:00
parent 2f0eb4bb21
commit e2d83a886a
2 changed files with 17 additions and 6 deletions

View File

@ -43,17 +43,23 @@ the input sequence.
## Encryption Process ## Encryption Process
Let $P$ represent the plaintext composed of a sequence of characters: Let $P$ represent the plaintext composed of a sequence of characters:
$$P = p_{1},p_{2},\ldots,p_{n}$$ $$P = p_{1},p_{2},\ldots,p_{n}$$
The ciphertext $C$ is produced by applying the reversal transformation: 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 ## Decryption Process
Given that the reversal operation is an involution (its own inverse), Given that the reversal operation is an involution (its own inverse),
the decryption process involves applying the same transformation. Let the decryption process involves applying the same transformation. Let
$C$ be the ciphertext; then the plaintext $P$ is recovered as: $C$ be the ciphertext; then the plaintext $P$ is recovered as:
$$P = \text{ reverse}(C)$$ $$P = \text{ reverse}(C)$$
# Implementation Considerations # Implementation Considerations
@ -61,10 +67,10 @@ $$P = \text{ reverse}(C)$$
A simple pseudocode implementation of the algorithm is as follows: A simple pseudocode implementation of the algorithm is as follows:
function encrypt(plaintext): function encrypt(plaintext):
return reverse(plaintext) return reverse(plaintext)
function decrypt(ciphertext): function decrypt(ciphertext):
return reverse(ciphertext) return reverse(ciphertext)
This algorithm may be implemented in any programming language. It is This algorithm may be implemented in any programming language. It is
important to note that due to its simplicity, SULA-ALUS is only important to note that due to its simplicity, SULA-ALUS is only

View File

@ -69,11 +69,15 @@ the decryption operation -- they both consist of reversing the input sequence.
== Encryption Process == Encryption Process
Let $P$ represent the plaintext composed of a sequence of characters: Let $P$ represent the plaintext composed of a sequence of characters:
$ P = p_1, p_2, ..., p_n $ $ P = p_1, p_2, ..., p_n $
The ciphertext $C$ is produced by applying the reversal transformation: The ciphertext $C$ is produced by applying the reversal transformation:
$ C = "reverse"(P) = p_n, p_(n-1), ..., p_1 $ $ C = "reverse"(P) = p_n, p_(n-1), ..., p_1 $
For example, if $P = "sula"$, then: For example, if $P = "sula"$, then:
$ C = "alus" $ $ C = "alus" $
== Decryption Process == Decryption Process
@ -81,6 +85,7 @@ $ C = "alus" $
Given that the reversal operation is an involution (its own inverse), the Given that the reversal operation is an involution (its own inverse), the
decryption process involves applying the same transformation. decryption process involves applying the same transformation.
Let $C$ be the ciphertext; then the plaintext $P$ is recovered as: Let $C$ be the ciphertext; then the plaintext $P$ is recovered as:
$ P = "reverse"(C) $ $ P = "reverse"(C) $
= Implementation Considerations = Implementation Considerations
@ -89,10 +94,10 @@ A simple pseudocode implementation of the algorithm is as follows:
``` ```
function encrypt(plaintext): function encrypt(plaintext):
return reverse(plaintext) return reverse(plaintext)
function decrypt(ciphertext): function decrypt(ciphertext):
return reverse(ciphertext) return reverse(ciphertext)
``` ```
This algorithm may be implemented in any programming language. This algorithm may be implemented in any programming language.