# Is multi-byte mapping to one byte a viable encryption technique?

The idea is to randomly map byte values eg

$$Sub(x)=\left\{ \begin{array}{@{}ll@{}} (a, b), & \text{if}\ r=1 \\ (c, d), & \text{r=0} \end{array}\right.$$

Where $r$ is the random value that determines the output, $x$ is the input byte, and $a, b$ or $c, d$ is the output bytes.

A concrete example might be:

$$Sub(97)=\left\{ \begin{array}{@{}ll@{}} (12, 57), & \text{if}\ r=1 \\ (34, 54), & \text{r=0} \end{array}\right.$$

Each byte has a unique byte reference.

To encrypt choose random map and set

encrypt[97] = 12,57
encrypt[97] = 34,54


To decrypt find matching values

decrypt[12,57] = 97
decrypt[34,54] = 97


Is this kind of multi-byte mapping to one byte a viable encryption technique?

• Sorry, it's not very clear what you are describing. Is it that a single byte of plain text is encrypted to multiple bytes of ciphertext? Feb 9, 2018 at 11:44
• So, a substitution cipher but where each block has two possible substitutions? That is probably about as broken as any other substitution cipher. Feb 9, 2018 at 11:45
• Why are you mapping to double bytes rather than just one? What are you thinking? And what are a, b, c and d if x =/= 97? Feb 9, 2018 at 23:58