Compare commits

..

No commits in common. "main" and "v0.1.0" have entirely different histories.
main ... v0.1.0

2 changed files with 6 additions and 17 deletions

View File

@ -43,23 +43,17 @@ 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

View File

@ -69,15 +69,11 @@ 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
@ -85,7 +81,6 @@ $ 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
@ -94,10 +89,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.