mirror of
https://github.com/kristoferssolo/rfc-sula-alus.git
synced 2025-10-21 19:50:36 +00:00
fix: indenting
This commit is contained in:
parent
2f0eb4bb21
commit
e2d83a886a
14
README.md
14
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
|
||||
|
||||
9
main.typ
9
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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user