PreprintPDF Available
Preprints and early-stage research may not have been peer reviewed yet.

Abstract and Figures

This paper proposes a whole new concept in the field of Cryptography , i.e., EsoCiphers. Short for Esoteric Cipher, EsoCipher is an algorithm, which can be understood by a few, who have the knowledge about its backend architecture. The idea behind this concept is derived from esoteric programming languages, but EsoCiphers will be having a practical use in the future, as more research is done on the topic. Although the algorithm is quite simple to understand, the complexity of the output will indeed prove to be difficult to bruteforce if a secret is embedded to it. It uses a hybrid cryptography based technique, which combines ASCII, Binary, Octal and ROT 13 ciphers. The implementation and similarity index has been provided to show that it can be implemented practically.
Content may be subject to copyright.
EsoCipher: An Instance of Hybrid Cryptography
Neel Adwani
University of Petroleum and Energy Studies
Dehradun, Uttarakhand
contact@neeltron.com
ABSTRACT
This paper proposes a whole new concept in the eld of Cryptog-
raphy, i.e., EsoCiphers. Short for Esoteric Cipher, EsoCipher is an
algorithm, which can be understood by a few, who have the knowl-
edge about its backend architecture. The idea behind this concept
is derived from esoteric programming languages, but EsoCiphers
will be having a practical use in the future, as more research is done
on the topic. Although the algorithm is quite simple to understand,
the complexity of the output will indeed prove to be dicult to
bruteforce if a secret is embedded to it. It uses a hybrid cryptog-
raphy based technique, which combines ASCII, Binary, Octal and
ROT 13 ciphers. The implementation and similarity index has been
provided to show that it can be implemented practically.
1 INTRODUCTION
According to the international standards, the term "esoteric" is
dened as something that can be understood by a small group of
people, having knowledge of the same. A common term, similar to
it is "esolang", short for esoteric programming language [
10
] which
can be further stated as a language that can be decoded by some
specic compilers or interpreters. One such example of an esoteric
programming language is Malbolge [
7
]. As for Esoteric Cipher, it
is not entirely an esoteric language, nor an ordinary cipher, but a
mixture of both of them, making it entirely a hybrid cryptographic
technique [1].
In Layman terms, cryptography is a study of dierent techniques,
in order to protect data or any sort of communications happening
through any medium. A Cipher would be dened as an algorithm
that can encrypt or decrypt the data.
In our case, the algorithm is totally dependent upon communica-
tion of text based messages, and the key to it will be as per the user’s
preference. Initially, the user will have to type the message, and
then the secret. The secret will be embedded to the message, which
is similar to salting but not exactly the same. Upon execution of the
algorithm, it’ll translate the message into an entirely tangled string,
which would be almost impossible to decipher without having the
secret.
* The terms key and secret can be used interchangeably, within
the scope of this paper.
2 RELATED WORK
This section demonstrates a glimpse of related algorithms that have
been implemented and are currently in use.
Malbolge [
7
] is an esoteric programming language, which uses
characters based on the ASCII table and has a specied range of
printable and non-printable characters, depending upon that range.
Instead of Deciphering algorithms, esoteric languages have inter-
preters and they’re mostly proposed as jokes. Another popular
esoteric language is Brainfuck [
5
], which became notable for its
minimalistic expressions. The whole language constitutes 8 simple
commands and an instruction pointer. LOLCODE [
8
] is yet another
esoteric language, which is based on the lolcat meme. So, its les
are generated of the extensions .lol and .lols. Since its inspiration
comes from memes over the internet, the syntax contains keywords
like HAI, BTW, GTFO, KTHXBYE.
While there’s no intended practical use of esoteric languages, Es-
oCipher may be considered obfuscated but it can be proven useful in
some elds. Since a lot of exploration hasn’t been done around this
topic, it is hard to determine the usability of the given algorithms in
this paper, but intentionally EsoCiphers can be useful in preventing
the attacker from reading the data during data breaches. It can
even be used in Machine Learning/Deep Learning Models where
sensitive data is required to train the model. No human will be able
to make sense out of that data, without knowing the key and the
exact functions used in their algorithm. On another note, the given
algorithms can be modied, depending upon the requirements of
the developer.
3 ALGORITHMIC AND PROCEDURAL
BACKGROUND
This section presents the back-end of this algorithm, which provides
a good idea about its working approach and the ways it can be
implemented in dierent languages.
3.1 Encipher
During the process of enciphering, the algorithm initially replaces
special characters like ’.’, ’,’, ’@’, ’!’, etc., with their alphabetical
counterparts like "period", "comma", "at", "exclamation", which are
absolutely exible, making the cipher exible and secure, as per
the special characters are dened. Moving forward, the ASCII [
3
]
value of each alphabet is converted into binary and then embedded
into a new variable as a string. The character ’b’ has to be removed
as it may cause conversion errors. After that, the octal [
6
] value
of that string is taken into account for an integer of the whole
string and nally, the ROT13 [
4
] Algorithm is executed and the
enciphered string executed by the EsoCipher Algorithm is obtained.
A summarized visualization for the same is shown in Fig. 1.
3.2 Decipher
In order to decipher the EsoCipher, the program needs an "EsoCi-
phered" string to begin with. After the successful input of the string,
it is looped through and a ROT -13 is executed on it, i.e., the ASCII
value of each character is decreased by 13 and stored collectively in
a variable. For each group of 8 characters, a 0 is added initially and
then an octal value is received. The octal value is then taken into
account and converted to binary. For each series of 8, the binary
Neel Adwani
Algorithm 1: Generating an EsoCipher
Result: The EsoCipher is returned as a string.
input_string = "", modied_string = "", iter = 0, x = 0,
temp_string = "";
𝑖𝑛𝑝𝑢𝑡 _𝑠𝑡𝑟 𝑖𝑛𝑔 𝑆𝑎𝑚𝑝𝑙𝑒𝑆 𝑡𝑟𝑖𝑛𝑔;
while iter < len(input_string) do
𝑥𝑏𝑖𝑛𝑎𝑟𝑦(𝑎𝑠𝑐𝑖 𝑖 (𝑖𝑛𝑝𝑢𝑡 _𝑠𝑡𝑟𝑖𝑛𝑔[𝑖𝑡𝑒𝑟] ));
𝑚𝑜𝑑𝑖 𝑓 𝑖𝑒 𝑑_𝑠𝑡𝑟𝑖𝑛𝑔 𝑚𝑜𝑑𝑖 𝑓 𝑖 𝑒𝑑_𝑠𝑡 𝑟𝑖𝑛𝑔 +𝑠𝑡 𝑟𝑖𝑛𝑔(𝑥);
end
𝑚𝑜𝑑𝑖 𝑓 𝑖𝑒 𝑑_𝑠𝑡𝑟𝑖𝑛𝑔 𝑚𝑜𝑑𝑖 𝑓 𝑖 𝑒𝑑_𝑠𝑡 𝑟𝑖 𝑛𝑔.𝑟𝑒 𝑝𝑙𝑎𝑐 𝑒 (𝑏,1);
𝑡𝑒𝑚𝑝 _𝑠𝑡𝑟𝑖𝑛𝑔 𝑜𝑐𝑡𝑎𝑙 (𝑖𝑛𝑡 (𝑚𝑜𝑑 𝑖 𝑓 𝑖𝑒 𝑑_𝑠𝑡𝑟𝑖𝑛𝑔)) ;
modied_string = "";
iter = 0;
while iter < len(temp_string) do
𝑥𝑎𝑠𝑐𝑖𝑖 (𝑡 𝑒𝑚𝑝_𝑠𝑡𝑟𝑖𝑛𝑔[𝑖𝑡 𝑒𝑟]);
𝑥𝑥+13;
𝑚𝑜𝑑𝑖 𝑓 𝑖𝑒 𝑑_𝑠𝑡𝑟𝑖𝑛𝑔 𝑚𝑜𝑑𝑖 𝑓 𝑖 𝑒𝑑_𝑠𝑡 𝑟𝑖𝑛𝑔 +𝑎𝑙𝑝ℎ𝑎(𝑥);
end
return modied_string;
Figure 1: Flowchart for understanding the Esocipher
is converted into ASCII and then the respective value of ASCII is
replaced by the corresponding alphabet, as per the given table 1. For
connotations like "period", "comma", "at", "exclamation", etc., they’re
nally converted into symbols like ’., ’,’, ’@’, ’!’, etc., to ensure that
the complete original string is obtained. The similarity index and
losses for the same are discussed in section 5. The algorithm for
deciphering an EsoCipher can be referred as dEsoCipher Algorithm.
A summarized visualization for the same is shown in Figure 2.
Algorithm 2: Deciphering the EsoCipher string
Result: The EsoCipher is deciphered and returned as a
string.
esocipher = "", deciphered_string = "", iter = 0, x = 0,
temp_string = "";
while iter < len(esocipher) do
𝑥𝑎𝑠𝑐𝑖𝑖 (𝑒 𝑠𝑜𝑐𝑖𝑝 ℎ𝑒𝑟 [𝑖𝑡𝑒𝑟 ]) ;
𝑥𝑥13;
𝑑𝑒𝑐𝑖𝑝ℎ𝑒𝑟𝑒𝑑_𝑠𝑡𝑟 𝑖𝑛𝑔 𝑑𝑒𝑐𝑖𝑝ℎ𝑒𝑟 𝑒𝑑 _𝑠𝑡 𝑟𝑖𝑛𝑔 +𝑐ℎ𝑎𝑟 (𝑥);
end
𝑑𝑒𝑐𝑖𝑝ℎ𝑒𝑟𝑒𝑑_𝑠𝑡𝑟 𝑖𝑛𝑔
0
+𝑠𝑡𝑟𝑖𝑛𝑔(𝑖 𝑛𝑡 (𝑑𝑒𝑐𝑖𝑝ℎ𝑒𝑟 𝑒𝑑 _𝑠𝑡𝑟𝑖𝑛𝑔,
8
)
;
𝑡𝑒𝑚𝑝 _𝑠𝑡𝑟𝑖𝑛𝑔 𝑜𝑐𝑡 𝑎𝑙 (𝑖𝑛𝑡 (𝑚𝑜𝑑𝑖 𝑓 𝑖𝑒 𝑑_𝑠𝑡𝑟𝑖𝑛𝑔)) ;
for iter in modified_string[::8] do
nal_string = nal_string + char(iter);
end
return modied_string;
4 IMPLEMENTATION OF ESOCIPHER
This section demonstrates an in-depth explanation of the way this
algorithm was implemented in Python 3.7 and it includes relevant
screenshots attached to it.
For the enciphering algorithm, no external libraries are needed
to be imported, unless a dierent cryptic function has to be used.
As for the algorithm, the users are allowed to set their own codes
to punctuation marks, so basically for more number of punctuation
marks, the cipher will get stronger. A string "hello world" is supplied
as an input to our program, with the notation for ’ ’ as "space_bar".
The output turned out to be as shown in Figure 3.
For Deciphering of the same generated string in Figure 3, a
separate algorithm was programmed in the same development
environment, as per Algorithm 2, stated above in this paper. The
string that is supposed to be inputted is the one generated in Figure
3. For looking into the results, refer to Figure 4.
5 SIMILARITY INDEX AND LOSSES
This section is about testing Algorithm 1 on a random paragraph,
Algorithm 2 on the result generated from Algorithm 1, and calcu-
lating the Levenshtein Distance [
2
] [
9
] between the original string
(random paragraph) and the output of Algorithm 2. Since the punc-
tuation marks are to be dened by the user, it is assumed within the
scope of this paper, that all the punctuation marks in the paragraph
are annotated in both the algorithms.
A short excerpt from a Harry Potter novel is taken, which went
through both the algorithms and the Levenshtein distance between
EsoCipher: An Instance of Hybrid Cryptography
Figure 2: Flowchart for understanding the process of deci-
phering an Esocipher
Figure 3: Output during Enciphering
Figure 4: Output during Deciphering
the original string and the deciphered string turns out to be 1, which
is due to a punctuation error, and is solvable with some alterations.
Refer to Figure 5 for the implementation.
Since the Levenshtein distance is 1 in a string of 234 characters,
the loss turns out to be 0.427%, which will be considerably lower
Figure 5: Implementation of Levenshtein’s Distance Algo-
rithm
and even 0 if all the punctuation marks are dened correctly in the
source code.
REFERENCES
[1]
Alexander W Dent. 2004. Hybrid cryptography. IACR Cryptol. ePrint Arch. 2004
(2004), 210.
[2]
Wilbert Jan Heeringa. 2004. Measuring dialect pronunciation dierences using
Levenshtein distance. Ph.D. Dissertation. University Library Groningen][Host].
[3]
James L Hieronymus. 1993. ASCII phonetic symbols for the world’s languages:
Worldbet. Journal of the International Phonetic Association 23 (1993), 72.
[4]
Markus Jakobsson and Jacob Ratkiewicz. 2006. Designing ethical phishing ex-
periments: a study of (ROT13) rOnl query features. In Proceedings of the 15th
international conference on World Wide Web. 513–522.
[5]
U Müller. [n.d.]. Brainfuck–an eight-instruction turing-complete programming
language (1993).
[6]
Albert R Plantz and Martin Berman. 1971. Adoption of the octal number system.
IEEE Trans. Comput. 100, 5 (1971), 593–598.
[7]
Masahiko Sakai. 2010. Introduction to esoteric language Malbolge. In Japan-
Vietnam Workshop on Software Engineering. 15–19.
[8]
Stryzhachenko and MY Tykhomirova. 2013. The esoteric programming languages.
Ph.D. Dissertation. Sumy State University.
[9]
Li Yujian and Liu Bo. 2007. A normalized Levenshtein distance metric. IEEE
transactions on pattern analysis and machine intelligence 29, 6 (2007), 1091–1095.
[10]
AA Zabenkov and DA Morel Morel. 2014. Esoteric programming languages as a
state-of-the-art semiotic trend. (2014).
ResearchGate has not been able to resolve any citations for this publication.
Conference Paper
Full-text available
We study how to design experiments to measure the suc- cess rates of phishing attacks that are ethical and accurate, which are two requirements of contradictory forces. Namely, an ethical experiment must not expose the participants to any risk; it should be possible to locally verify by the partic- ipants or representatives thereof that this was the case. At the same time, an experiment is accurate if it is possible to argue why its success rate is not an upper or lower bound of that of a real attack - this may be dicult if the ethics considerations make the user perception of the experiment dierent from the user perception of the attack. We intro-
Article
Although a number of normalized edit distances presented so far may offer good performance in some applications, none of them can be regarded as a genuine metric between strings because they do not satisfy the triangle inequality. Given two strings X and Y over a finite alphabet, this paper defines a new normalized edit distance between X and Y as a simple function of their lengths (|X| and |Y|) and the Generalized Levenshtein Distance (GLD) between them. The new distance can be easily computed through GLD with a complexity of O(|X|.|Y|) and it is a metric valued in [0, 1] under the condition that the weight function is a metric over the set of elementary edit operations with all costs of insertions/deletions having the same weight. Experiments using the AESA algorithm in handwritten digit recognition show that the new distance can generally provide similar results to some other normalized edit distances and may perform slightly better if the triangle inequality is violated in a particular data set.
Article
The possible adoption of the metric system in the United States makes it logical that any other major changes be considered at the same time. Therefore, it is proposed to adopt the octal number system in place of the decimal. The importance of computers in our lives makes it reasonable that we adopt a number system with a base 2n. The advantages and disadvantages of the various values of n are given. The octal (n=3) number system is found to be the best one. The feasibility and some ramifications of octal adoption are presented.
Article
A new ASCII encoding of the International Phonetic Alphabet (IPA) and additional symbols has been designed for all languages. Many of the previous ASCII versions were targeted at European languages and therefore left out many of the sounds of the other languages or used symbols for unusual sounds like clicks, for plosive bursts. When an attempt was made to label a large number of languages with phonemic and phonetic symbols, these were found to be inadequate. The present scheme borrows on earlier work by George Allen, Ian Maddieson, John Wells, Laver et al. and Hieronymus et al. Wherever possible, the present scheme was made similar to the base IPA symbols, so that many of the symbols will seem to have obvious meanings. Many of the symbols are the same as other schemes. The underlying principle is that any spectrally and temporally distinct speech sound (not including pitch) which is phonemic in some language should have a separate base symbol. In most cases the base symbol consists of...
  • W Alexander
  • Dent
Alexander W Dent. 2004. Hybrid cryptography. IACR Cryptol. ePrint Arch. 2004 (2004), 210.
Introduction to esoteric language Malbolge
  • Masahiko Sakai
Masahiko Sakai. 2010. Introduction to esoteric language Malbolge. In Japan-Vietnam Workshop on Software Engineering. 15-19.
The esoteric programming languages
  • M Y Stryzhachenko
  • Tykhomirova
Stryzhachenko and MY Tykhomirova. 2013. The esoteric programming languages. Ph.D. Dissertation. Sumy State University.
Esoteric programming languages as a state-of-the-art semiotic trend
  • A A Zabenkov
AA Zabenkov and DA Morel Morel. 2014. Esoteric programming languages as a state-of-the-art semiotic trend. (2014).