Mathematics for Cryptography
Jasmeet Kaur1, a) Simranjit Kaur2, b) and Mandeep Singh3, c)
1,2,3
Department of Computer Science and Engineering, CGC Jhanjeri Mohali, Punjab- 140307
2,3
Department of Computer Applications, CGC Jhanjeri Mohali, Punjab- 140307
Corresponding Author: a)95kaurjasmeet@gmail.com
b)
simranjitkaur6499@gmail.com
b)
Mandeep97294@gmail.com
Abstract: This article gives a general review of several cryptography algorithms, going over the mathematical foundations
and fields of study that are required to comprehend them. The article's aim is to well versed in readers with the mathematical
ideas and notions that are without getting into detailed algorithmic details. While not enlightening deeply into specific
algorithmic details, the article aims to habituate to readers with the mathematical concepts and principles that are necessary
to comprehend each of these algorithms.
This article seeks to give readers the background knowledge necessary to scrutinize various cryptography algorithms in
greater detail and to participate in the growing research and development in this quickly to surface the field by giving an
overview of the necessary mathematical backgrounds for these algorithms.
Keywords: Cryptography, mathematical foundations, number theory, algebra, probability theory, public-key, symmetric-key,
quantum, post-quantum, algorithms, information theory.
INTRODUCTION:
Effective use of cryptography necessitates an understanding of the fundamental mathematical concepts
underlying the algorithms used to protect sensitive data and secure communication. There is a connected set of
mathematical ideas that are understood and appreciated for each class of cryptographic methods. For example,
number theory, that addresses the problem of solving large prime numbers. It is fundamental to public-key
cryptography .Probability theory is used to examine the systems' dependency. Computer applications or skills,
including like programming, data structures, and algorithms, are also important for the application and use of
cryptography methods. The construction of groups, rings, and fields makes the system more reliable systems for
cryptography. To calculate the reliability of the systems, probability theory is being used. The implementation
and the usage of the methods of cryptography requires the knowledge of computer science, which includes
programming, data structures, and algorithms. By applying the mathematics frameworks underlying each class
of cipher, the user may learn as much qualification required to actively participate in the provided algorithm,
will make further advances in the relevant field. This paper focuses on the explanation of the mathematical
branches of the science that are the basis of different types of cryptographic algorithms.
ALGORITHMS:
Basic Encryption Algorithms:
Ciphers were widely employed in the past to encode and decode messages. They employed techniques such as
substitution and transposition. The history of cryptography has been greatly influenced by classic ciphers, which
also established the foundation for contemporary encryption methods. You may understand fundamental
concepts in cryptography by investigating these algorithms. Many techniques may be comprehended without a
thorough understanding of mathematics, even if some need ideas like matrix operations and modular arithmetic.
However, adopting cryptographic techniques might benefit from having a rudimentary grasp of mathematics.
Atbash One kind of encryption that switches letters is called Atbash. This approach transforms "A" into "Z,"
"B" into "Y," and so on. Message encryption is possible with this straightforward letter substitution.
ROT13 It is another substitution of cipher which moves the letters to 13 positions in the alphabet is called
ROT13. It is frequently employed to conceal spoilers or for basic encryption.
Caesar: Each letter in the alphabet will be swapped out with another which will be a specific number of spaces
in the Caesar cipher, another kind of shift cipher. If the shift is six, for instance, "A" becomes "G." Any full
number can be used as the shift.
.
Baconian: It is a encryption technique, called a "biliteral" cipher, which makes use of a straight binary scheme.
The five-letter code for each letter of the alphabet is composed of the letters "A" and "B." By substituting the
binary equivalent value for each letter, the text's layout will conceal its meaning.
Polybius Square: Pairs of digits are used in respect of letters in this substitution cipher. A 5 by 5 grid is used to
pair the letters. Every letter in the grid has a definite row and column number.
Simple Substitution: Every letter in the plain text is changed to a different letter in the simple substitution
cipher. There is a pre examined mapping that the replacements follow.
Codes and Nomenclators: This kind of substitution cipher uses a codebook or substitution table to exchange
words or letters with another words and letters. It entails certain codewords for comparable expressions or
names. To comprehend some codes and nomenclators completely, a certain amount of mathematical
understanding is must.
Transposition Algorithms:
By substituting a number of letters or units from the plaintext, these transposition ciphers begins the process of
generating ciphertext. For replacement, they usually follow certain patterns or guidelines. The mentioned
algorithms shows a variety of aspects, which includes the use of a portion of the alphabet, modular arithmetic,
and column rearrangement. The ciphers, have their own special methods for both encrypting and decrypting
data, belonging to a larger family which is known as classical substitution ciphers. This procedure entails
substituting certain codewords with comparable expressions or names. It may be necessary to have some
mathematics understanding depending on the codes and systems being utilized.
Columnar Transposition: This method uses a specific method to rearrange the columns of plain text, resulting
in a columnar transposition cipher. The main focus is on changing the order of characters or text rather than
changing them.
Autokey: The Autokey cipher is a version of the Vigenère cipher which employs a square or tabula recta. It
consists the plain text with a key through the help of modular arithmetic to increase the security. In this method,
the key for other characters includes the previously created cipher.
Beaufort: The Vigenere cipher is also known by the Beaufort cipher. The ciphertext is generated by subtracting
the plain text with the key modulo 26 in the encipher algorithm, which is different and unique.
Porta: Similar to the Vigenere cipher, the Porta cipher is polyalphabetic but only offers a subset of the 13
alphabets. In comparison to the Vigenere cipher, it reduces the key space.
Running Key: The Running Key cipher runs a extensive, non-repeated phrase key,which making it comparable
to the Vigenere cipher. Differentiating the key from the Vigenere cipher, this distinctiveness gives an additional
layer of protection.
While calculating or solving with these methods it doesn't require a specific background in mathematics, it can
be beneficial to have a rudimentary understanding of number theory and modular arithmetic.
Modular Arithmetic: Modular arithmetic is a branch of mathematics which looks at the remainder by dividing
one whole number with another number. It checks the properties and applications of the remainders. In this
system, numbers are reset or "wrap around" when they will reach a certain limit, called the modulus. Thus, the
value in modular arithmetic is check by the remainder when a number is divided by the modulus.
Number Theory: Number theory is a branch of mathematics which examines the properties and relationships
of numbers, specially the whole numbers. This field studies the concepts of prime numbers, divisibility, and
factorization. It also explores and examine the idea of prime factorization and other related topics. Number
theory plays an effective role in the development of many cryptographic algorithms, which are crucial for
encryption and secure communication methods.
Polygraphic Substitution Algorithms:
Other techniques like transposition, fractionation, or matrix operations are also included since each of these
algorithms replaces a number of plaintext symbols with a corresponding ciphet. They provide more encryption
compared to simple substitution ciphers.
Vigenere and Gronsfeld: This algorithm uses a keyword or key number to shift each letter in order to encrypt
plaintext.Unlike Gronfeld, who employs a key number for every letter, the Vigenere encryption makes use of a r
ecurring keyword. It encrypts the plaintext using the "tabula recta."
Homophonic Substitution: To strengthen encryption, this cipher substitutes multiple symbols or integers for ea
ch letter in the plaintext.Because there are several alternative substitutions for each letter, deciphering the cipher
text becomes increasingly challenging.Because they substitute numerous plaintext symbols with corresponding
ciphertext symbols, all of these algorithms are classified as polygraphic substitution ciphers. In addition, they
might make use of other strategies like transposition, fractionation, or matrix operations. The ciphertext is more
challenging to decipher because there are several plausible substitutes for each letter.
Four-Square: This method makes use of four 5x5 matrices with alphabetic letters. By matching each letter in
the matrix to a corresponding letter determined by a keyword, it encrypts plaintext.
Hill: It uses a key matrix to conduct matrix multiplication in order to encrypt plaintext. The encryption
permutation is determined by the key matrix.
Playfair: It encrypts two letter combinations. The alphabets in the 5x5 matrix form the key, which is followed
by the remaining letters. The substitution cipher letter is displayed in the row and column of each pair of letters.
ADFGVX and ADFGX: The German army employed the transposition and substitution ciphers ADFGVX and
ADFGX during World War I. They entail adding a transposition step to a modified Polybius square. The 6x6
grid is used by the ADFGVX encryption, although the ADFGX cipher uses a 5 × 5 grid.
Number theory and modular arithmetic were covered in the preceding part. Although not sophisticated
mathematical concepts are needed for this section, it will be helpful to have a rudimentary understanding of the
following subjects in addition to the ones that came before them:
Probability Theory: The study of inconstancy and randomness is the focus of this area of mathematics. It
offers a framework for calculating and examining the probability that certain events will take place. It includes
ideas like statistical inference, random variables, probability, and probability distributions. The study of vector
spaces and linear transformations is the main supereminence of the mathematical field known as linear algebra.
It covers the characteristics and functions of matrices, linear equations, and vectors. It covers ideas such as
vector addition and scalar, determining factor, matrix multiplication, eigenvalues, eigenvectors, and
multiplication.
Basic Algebra: The basis for algebraic manipulation and reasoning is basic algebra. It necessitate studying
mathematical symbols and the laws regulating operations like multiplication, division, addition, and subtraction.
Variables, equations, inequalities, and solving for unknowns are all included in basic algebra.
Modern Symmetric-Key Algorithms:
Data is encrypted and decrypted using a single key in symmetric keys encryption. Distributing the key prior to
transmission between entities is advised [1].
Encryption techniques are divided into two blocks based on the input data: block ciphers, where the block size is
defined for encryption, and stream ciphers, where a consecutive stream is passed for both encryption and
decryption. Some examples of block ciphers are RC2, AES, DES, RC6, and BLOWFISH. Since a symmetric
method uses the same key for both encryption and decryption, high security cannot be achieved; instead,
asymmetric algorithms are employed. Another name for it is public key encryption. [2-5].
Simon and Speck: The National Security Agency (NSA) created the two lightweight block cipher encryption
algorithms known as Simon and Speck. Speck can handle block sizes of 64, 96, or 128 bits, whereas Simon can
handle cube sizes of 32, 48, 64, 96, or 128 bits. Both
Algorithms employ bitwise XOR and substitution operations with a Feistel network topology [6].
Modern Public-Key Ciphers:
ECC(Elliptic Curve Cryptography): Because these algorithms are founded on the ideas of public-key
cryptography, which separates encryption and decryption keys, they are regarded as contemporary public-key
ciphers. To accomplish their cryptographic objectives, they might employ elliptic curves, modular arithmetic,
lattice-based cryptography, or other mathematical ideas [7].
ElGamal Encryption System: The Diffie-Hellman key exchange, which serves as a quondam pad for
encryption, is the primary step of the process. The three stages of ElGamal encryption are key generation,
encryption, and decryption. The later stages integrate key exchange calculations with message computations,
whereas key generation concentrates on key exchange. Any cyclic group, such as the multiplicative group of
integers modulo n, can be encrypted using ElGamal. Keep in mind that ElGamal encryption is not the same as
the Digital Signature Algorithm (DSA), which is a variant of the ElGamal imprint method [8].
XTR: It is a public-key encryption cryptographic technique. "EC\STR," which stands for Efficient and Compact
Subgroup Trace Representation, is the acronym for it. The representation of elements within a subgroup of a
finite field's multiplicative group is made possible by this technique. This is accomplished by using the trace
over GF(p 2) to represent elements that are part of a subgroup of GF(p 6) ∗.
In terms of security, XTR depends on how difficult it is to solve discrete logarithm issues over the whole
multiplicative group of a finite field. [9]
Quantum Cryptography: Quantum cryptography establishes secure communication by utilizing concepts from
quantum mechanics. These systems protect the secrecy and integrity of transmitted data by utilizing quantum
particles like photons. Photons are used to send messages, and they are understood if the intended recipient is
able to decode them. In the event that not, the sender changes the photons and sends the message again.
It's important to remember that quantum cryptography is a exorbitant technology with few real-world uses.
Quantum computers use quantum bit from a bounded-dimensional complex vector space (Hilbert space) H,
whereas conventional computers use bits (0 or 1) [10, 11].
Niederreiter: The algebraic geometry codes serve as the premise for this public-key encryption system. It has
effective encryption and decryption functions as well as protection from quantum computer assaults. It is an
supplementary building of the congruity check matrix concept and a variation of the McEliece cryptosystem.
Niederreiter uses a quicker encryption stratagem while still achieving security comparable to that of McEliece.
It may also be used to create a system of digital signatures [12].
Rainbow: It blends aspects of skewed and symmetric cryptography. Its purpose is to offer secure and effective
encryption and signing functions. Its foundation is the creation of a unilateral function using multivariate
quadratic polynomials. The perplexity of solving a system of multivariate equations over a bounded field
determines its security. This issue consists of concepts from multivariate polynomial algebra, such
as Grobner bases and elimination theory,linear algebra and number theory [13].
Cryptographic Hash Functions:
An unique kind of algorithm known as a cryptographic hash function takes an input and outputs a fixed-size
value to verify the validity of data known as a hash value. It is advantageous for cryptography applications
because to its qualities.
1. Since there is extremely little chance of receiving a particular hash value for a uneven input, the hash value
can be used as a representation of the input.
2. Detecting the input that matches a suitable hash value is quite challenging, offering preimage resistance.
3. Finding a second input that yields the alike hash value as a known input and offers second pre-image
resistance is also challenging.
It is also exceedingly tough to find two separate inputs that collide (create the same hash value).
Message authentication codes, digital signatures, and other authentication methods frequently involve
cryptographic hash functions. [14].
MD2, MD4, MD5: These cryptographic hash algorithms, MD2, MD4, and MD5, provide a 16-byte message
digest for an input message. The digest length for MD4 and MD5 is 128 bits.
MD5, which has more operations and an extra round, is a more robust variant of MD4.
every iteration. Finding a message with a given digest has an O(2128 ) time complexity, while finding two
messages with the same digest has an O(264 ) time complexity.
SHA-1, SHA-2, SHA-3: They have a index length of 160 bits, a cube size of 512 bits, and 80 rounds. SHA-2
and SHA-3 have different block sizes. The output sizes of SHA-2 range from 224 to 512 bits. The block size
with 64 rounds is 512 bits for output sizes of 224 and 256 bits.
RIPEMD-160:A hash algorithm called RIPEMD-160 combines two parallel versions of MD4 with various
enhancements to shifts and message word order.
Whirlpool: The iterated hash function Whirlpool makes use of a compression function.
built using a 512-bit key and a specialized 512-bit block cipher.
BLAKE2 and BLAKE3: BLAKE2 employs a condensed form of HAIFA while maintaining its beneficial
qualities. It is based on the Hash Iterative Framework (HAIFA).
Four hash functions with varying word lengths, block sizes, and digest sizes are included in BLAKE2. The most
recent version, BLAKE3, includes digest sizes of 224, 256, 384, and 512 bits, a word length of 64 bits, and a
cube area of 1024 bits.
HAVAL: HAVAL is a hash algorithm that has several advantages over MD5.
With the Strict Avalanche Criterion property, it makes use of five nonlinear boolean functions. There are fifteen
versions of HAVAL, each with varying digest lengths and pass counts, from between 128 and 256 bits. It
performs quicker than MD5,if fewer passes are needed.
The study and construction of cryptographic hash functions draws various number of mathematical fields. A
number of mathematical concepts used in cryptographic hash functions include number theory and probability
theory. Pre-image resistance and collision probability are two main aspects of the probabilistic theory which will
be applied in the hash algorithms. Boolean algebra is necessary to work with binary data, which helps in
managing and analysing the binary inputs and outputs effectively. Complex theory also plays a significant role,
which is focusing on ideas like computational difficulty, polynomial time reductions, and complexity classes to
assess the security features of cryptographic hash functions.
Key Exchange:
Key exchange in cryptography involves sharing a secret key securely between two or more parties on an
unsecured communication channel. With the help of this key, the information will be encrypted and decrypted,
which ensures the communication remains private and protected.
Diffie-Hellman: This method based on modular arithmetic to select random numbers. The shared secret key
created then it can be used for other tasks in cryptography, like symmetric encryption. Symmetric key exchange
is important that how Diffie-Hellman encryption and decryption works. The simplest approach it involves the
multiplicative group of integers modulo p, where g serves as a primitive root modulo p, and p is a prime number.
To ensure that the shared secret key can take any value, the numbers are chosen in such way that they will fall
between 1 and p-1.
Super-singular Exchange of Isogeny Keys (SIKE): The post-quantum key encapsulation method uses
isogeny-based encryption as its basis model. It generates effective key exchange operations and protects from
the quantum computer assaults.
Fresh Hope: It is a lattice-based cryptography-based post-quantum key exchange mechanism. To provide
security, it leverages lattice mathematics difficulties. The participants execute calculations utilizing error terms
and random polynomials to make it harder for eavesdroppers to retrieve the shared key. New Hope provides
effective key exchange functions and is built to withstand attacks from quantum computers. The following
mathematical ideas can be better understood and their security aspects can be examined if one has a firm grasp
of them.
Protocols: Previous theories hold significant importance, especially in areas like modular arithmetic, prime
numbers, and mathematical structures such as fields and groups. The earlier discussion about algebraic
geometry relates to this topic. Algebraic geometry studies shapes defined by algebraic equations. Isogeny-based
cryptography, which is used in protocols like SIKE, depends on this field. Lattice Theory is also relevant; New
Hope uses lattice cryptography, which is based on the mathematical idea of lattices, which are multi-
dimensional grids made up of points.
Theory of Computational Complexity: Knowing ideas such as computational hardness, complexity classes,
and hardness assumptions is beneficial in analysing the security of key exchange protocols.
Digital Signature Schemes:
Digital signatures are made up by using mathematical methods, like elliptic curve cryptography and modular
arithmetic, to ensure the digital messages are both valid and secure. To assess the security of digital signatures or
techniques like the discrete logarithm problem and the birthday paradox are commonly applied.
Digital Signature Schemes
Algorithm Elliptic Lattice Discrete Modular hash Prime
Name curves Theory logarithm arithmetic functions numbers
DSA * * *
Lamport *
Merkle *
ECDSA * *
DSS * * *
EdDSA *
Schnorr * * *
BLISS *
CONCLUSION:
The amount of mathematical expertise requires the increases in complexity and specialization when we explore
the different types of encryption algorithms. Prime numbers, finite fields, modular arithmetic, and number
theory provide the basis of transposition ciphers. We study probability theory, multivariate calculus,
fundamental algebra, linear algebra, and statistics with moving on to polygraphic substitution ciphers. Thes
topics makes it easier to perform mathematical operations and analyze frequency distributions. Building on the
ideas, modern symmetric-key algorithms integrate bitwise operations, propositional logic, boolean algebra,
Galois Field arithmetic, and substitution-permutation networks to increase the safety and effective cryptographic
procedures. Our understanding of mathematics is to further expand the encompass elliptic curves, digital
signatures, key exchange, quantum physics, information theory, coding theory, and other pertinent fields related
to contemporary public-key. In public-key frameworks, safe key exchange and encryption are facilitated by
Boolean circuits, algebraic geometry, polynomial rings, lattice theory, and public-key cryptography. Hash
functions are effected by probability theory, Boolean algebra, complex theory, and number theory, whereas key
exchange procedures are based on number theory, algebraic geometry, lattice theory, and computational
complexity. Digital signature methods uses a range of mathematical operations, such as discrete logarithm,
modular arithmetic, hash functions, and prime numbers, to make the safe signatures and ensures the integrity
and authenticity of communications. As we investigate increasingly sophisticated types of cryptographic
algorithms, this progression demonstrates the growing complexity and diversity of mathematical domains.
REFERENCES:
[1] T. Nie and T. Zhang, A study of DES and blowfish encryption algorithms, IEEE Reg. 10 Annu. Int. Conf.
Proceedings/TENCON, pp. 1–4, 2009, doi: 10.1109/TENCON.2009.5396115. 15
[2] O.Abood, S.Guirguis, A Survey on Cryptography Algorithms. International Journal of Scientific and
Research Publications. 8. 495-516. 10.29322/IJSRP.8.7.2018.p7978.
[3] M.Mushtaq et al. A Survey on the Cryptographic Encryption Algorithms. International Journal of Advanced
Computer Science and Applications. 8. 333-343,2017
[4] S.V. Swathi, P.M. Lahari, B.A. Thomas. Encryption Algorithms: A Survey, International Journal of Advanced
Research in Computer Science & Technology (IJARCST 2016), Vol. 4, Issue 2.
[5] C. Burwick and D. Coppersmith, The Mars Encryption Algorithm, NIST AES Propos., pp. 1–12, 1999,
[Online]. Available: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.35.5887&rep=rep1& type=pdf.
[6] Delfs, Hans; Knebl, Helmut (2007). ”Symmetric-key encryption”. Introduction to cryptography: principles
and applications. Springer. ISBN 9783540492436.
[7] I. Setiadi, A. I. Kistijantoro, and A. Miyaji, Elliptic curve cryptography: Algorithms and implementation
analysis over coordinate systems, ICAICTA 2015 - 2015 Int. Conf. Adv. Informatics Concepts, Theory Appl.,
no. November, 2015, doi: 10.1109/ICAICTA.2015.7335349.
[8] T. Elgamal, ”A public key cryptosystem and a signature scheme based on discrete logarithms,” in IEEE
Transactions on Information Theory, vol. 31, no. 4, pp. 469- 472, July 1985, doi: 10.1109/TIT.1985.1057074.
[9] Lenstra, Arjen K. and Verheul, Eric R.. ”An overview of the XTR public key system”. Public-Key
Cryptography and Computational Number Theory: Proceedings of the International Conference organized by
the Stefan Banach International Mathematical Center Warsaw, Poland, September 11-15, 2000, edited by
Kazimierz Alster, Jerzy Urbanowicz and Hugh C. Williams, Berlin, New York: De Gruyter, 2001, pp. 151-180.
https://doi.org/10.1515/9783110881035.151
[10] R. Kumar. A Survey on Post-Quantum Cryptography for Constrained Devices. International Journal of
Applied Engineering Research. 14. 2608-2615. 2019.
[11] D. Bruss, G. Erdelyi, T. Meyer, T. Riege, and J. Rothe, 2007, ACM Computing Surveys, Vol. 39, No. 2,
Article
[12] H. Niederreiter (1986). ”Knapsack-type cryptosystems and algebraic coding theory”. Problems of Control
and Information Theory. Problemy Upravlenija I Teorii Informacii. 15: 159–166.
[13] Buchmann, J.A., Butin, D., G¨opfert, F., Petzoldt, A. (2016). Post-Quantum Cryptography: State of the Art.
In: Ryan, P., Naccache, D., Quisquater, JJ. (eds) The New Codebreakers. Lecture Notes in Computer Science(),
vol 9100. Springer, Berlin, Heidelberg. https : //doi.org/10.1007/978 − 3 − 662 − 49301 − 46
[14] Menezes, Alfred J.; van Oorschot, Paul C.; Vanstone, Scott A. (7 December 2018). ”Hash functions”.
Handbook of Applied Cryptography. CRC Press. pp. 33–. ISBN 978-0-429-88132-9.
[15] N. A. Lal, A Review Of Encryption Algorithms-RSA And Diffie-Hellman, Int. J. Sci. Technol. Res., vol.
06, no. 07, pp. 84–87, 2017.