1. Introduction
Symmetric ciphers are widely used in the modern digital world. The general idea of hiding secret information using mathematics can be described as a triplet
, where
is the key generation algorithm,
is the encryption function, and
is the decryption function [
1,
2]. A major requirement of any symmetric cipher is the ability to correctly restore the original message
encrypted by the function
using the same secret key
k. In other words, the following property should hold:
Symmetric ciphers are commonly classified into block ciphers and stream ciphers depending on their structure. Block ciphers are deterministic and can be used to encrypt fixed-length groups of bits. Hence, the application of this type of ciphers is limited by the size of a block, e.g., 128 bits. On the other hand, a stream cipher takes a message as input and combines it with the keystream, usually by applying an exclusive-or (XOR) operation.
Notably, it is possible to obtain a stream cipher by linking together encrypted blocks in specific ways. This is exactly how block ciphers are currently implemented in the real world. The general methodology behind this approach is to define a mode of encryption for a block cipher. The descriptions of these various modes can be found in [
3].
Due to the topic of this paper, we focus on the counter mode (CTR) of symmetric encryption. As far as the implementation of the various modes of encryption, the use of this mode is a common practice. CTR was originally proposed in [
4] to create a stream of encrypted blocks, as shown in
Figure 1.
The authors of [
5] point out the following advantages of the CTR mode:
Software efficiency: As opposed to the cipher block chaining (CBC) mode, subsequent ciphertext blocks are computationally independent. This fact greatly contributes to the performance speed of CTR mode.
Hardware efficiency: Subsequent blocks can be computed separately, allowing parallelization of calculations.
Preprocessing: As the message is used only in the last step of CTR mode, calculations can be made in advance to make the encryption process resemble the one-time pad (OTP) technique, i.e., simple XOR of the original message and a bit string obtained long before the input.
Random-access: It is not necessary to encrypt previous blocks to obtain the ciphertext of the upcoming ones; hence, encryption can start at any block.
Provable security: The above advantages do not affect the security of the CTR mode, which relies on the pseudorandom nature of the encryption function .
An enhancement of this mode called the Galois counter mode was published in [
6]. This mode was designed for use with AES cipher and was later standardized by NIST [
7]. Another enhancement was proposed in [
8]. Whether the block cipher presented in this paper can be implemented in these modes remains an open question thus far.
However, as pointed out in [
9], applications of CTR mode in practice commonly require some means of authentication. For this reason, in [
8], the authors introduced additional tags to deal with this issue.
It is worth mentioning that the current implementation of CTR mode and its enhancements usually makes use of the AES algorithm [
10,
11,
12,
13,
14]. Due to its structure, AES uses rather simple functions, most of which are linear. For this reason, depending on the size of the key 10, 12, or 14 rounds of encryption are performed. The CTR mode of AES is widely applied in such modern technologies as blockchain, cryptocurrency, and encrypted search. Recent applications of AES CTR mode for blockchain technology can be found in [
11,
12]. Here, the CTR mode is used to ensure data integrity and confidentiality. The authors of [
12] evaluated their approach by realizing a real implementation of their idea in the Ethereum blockchain by adding an extra layer to it. This change allowed the authors of [
12] to transform the permissionless blockchain into a permessionned one, which is useful for applications in wireless networks. In [
14], the authors used CTR mode to preserve the privacy of data during substring search.
It can be seen from
Figure 1 that CTR uses the idea of the nonce. This information is publicly known and, much like the OTP secret key, cannot be reused. The author of [
9] suggested splitting the nonce into two equal parts to achieve additional flexibility of CTR mode, thus making it applicable to longer messages. Interestingly enough, in our scheme the nonce is split to fit our goals; however, the obtained parts are not equal. Furthermore, we think that we can achieve the flexibility of our proposal by manipulating the main parameters of the block cipher. Hence, we believe that our idea can be used to encrypt short and long messages (of course, with distinct parameter values). In other words, by manipulating the block size, we think that we can maintain the speed of encryption for both types of messages.
In our research, we suggest trading multiple rounds of encryption for a single round of highly non-linear transformation. Furthermore, because we use matrix operations in our research, a significant boost in speed is possible within the single block encryption by applying parallelization of computations using several processors.
Previously, we published a paper [
15] in which we defined a CBC mode of the Shannon block cipher proposed in [
16]. In those papers, we implemented a mapping called the matrix power function (MPF) defined over a commuting platform, specifically, a Sylow group of prime cardinality
p. Based on the properties of the platform group, we defined power matrices over the ring of integers
. A key feature we used in our construction is a non-homomorphic mapping
f, which uniquely assigned an element of the Sylow group to an integer in
.
Interestingly enough, the newly defined block cipher was proven to be perfectly secure (a feature proven for the OTP technique by Shannon himself). However, a comparison of our block cipher to OTP has shown that in our case the same key can be used multiple times without revealing the secret data. Furthermore, in [
17] we presented a comparison of the performance of our cipher to AES-128 and TDES. The results of that paper have shown that by varying the main parameters of our proposal, we can encrypt roughly the same amount of data about 1.5 times faster than AES-128 and 47 times faster than TDES.
Following the path laid out in this paper, we propose the CTR mode of the Shannon block cipher based on MPF. Seeking to keep our proposal closer to the classic definition of this mode, we use a certain non-commuting group containing elements as a platform for MPF. In this way, it is possible to apply the XOR operation at the last step of CTR mode, which was not possible with the structures used in our previous publication. Moreover, we assume that by switching to a non-commuting group we contribute to the overall security of our scheme as well.
The rest of this paper is organized as follows: in
Section 2, we revise the basic definitions and algebraic structures used in our previous research; in
Section 3, we propose a block cipher based on MPF mapping and explore its basic properties; in
Section 4, we introduce the CTR mode of the proposed block cipher and in
Section 5 we explore its resistance against passive attacks. Finally, we present our conclusions at the end of the paper.
2. Our Previous Work and Preliminaries
To be self-contained, let us revise the notion of MPF. As the name of this mapping states, it is defined for matrices with their entries chosen from appropriate algebraic structures. Moreover, for cryptographic purposes, we use square matrices of order m. Hence, in total, each matrix contains entries.
Let us assume that is some multiplicative semigroup where each element has a maximum possible order of . This semigroup does not need to be cyclic and can even be non-commuting. We call a platform semigroup and denote the set of matrices with entries in by . Let
be a matrix in . We use this matrix as a base of MPF.
Due to the maximal order of elements in , it is clear that raising any arbitrary element of this semigroup makes sense modulo , as larger powers can be reduced. Hence, we consider the ring , which contains non-negative integers less than . We refer to it as the power ring and denote the set of matrices with entries in by . Matrices are inputs of the MPF, and we call them power matrices because their entries are used as powers.
Let us first assume that is a commuting semigroup. Formally, we can then define one-sided mappings called the left-sided MPF (LMPF) and the right-sided MPF (RMPF), respectively, in the following way:
Definition 1. Let be a publicly known matrix. Then, LMPF is a mapping denoted aswhere is the LMPF value with entries calculated in the following way: Definition 2. Let be a publicly known matrix. Then, RMPF is a mapping denoted aswhere is the RMPF value with entries calculated in the following way: Notably, if the platform semigroup
is commuting, the two-sided MPF can be defined as a mapping
due to the following associativity property:
However, if
is non-commuting, property (
1) does not hold in general, and the two-sided MPF cannot be defined. As such, based on the order of actions, we can define the left-to-right (LR) and right-to-left (RL) MPF.
Definition 3. Let be a publicly known matrix. Then, LRMPF is a mapping denoted aswhere is the LRMPF value with entries calculated in the following way:and are the appropriate entries of the LMPF value matrix . Definition 4. Let be a publicly known matrix. Then, RLMPF is a mapping denoted aswhere is the LRMPF value with entries calculated in the following way:and are the appropriate entries of the RMPF value matrix . In this paper, we use the LRMPF, although similar results can be obtained by switching the order of actions.
Now, we present a brief reminder of the non-commuting group used as a platform group for MPF construction.
Set
a and
b to be two non-commuting generators and let
e denote the identity element of a group defined by the following relations:
where
t is some positive integer which determines the cardinality of the obtained group. Explicit presentation of the so-called modular group via its generators and the defined relations is provided below:
The inspiration for this group comes from several papers on the theory of indecomposable non-commuting groups. In [
18], the authors discuss the realizability of seven examples of non-commuting groups which cannot be decomposed into the Cartesian product of any smaller groups. Each of the presented examples contains 16 elements in total. One of the briefly mentioned groups is a special case of the definition (
3) which is called a modular group of size 16, or
for short. The explicit presentation of this group is
To remain self-contained, we present the expressions for basic operations in
. However, we leave the proofs of these expressions outside of this paper, as they can be found in [
19].
Because the group
is multiplicative, we can define the product of two elements. Assume the indices
, whereas
. Then, given two elements of
and
, their product is calculated in the following way:
Moreover, given an element of
, its
n-th power is calculated in the following way:
where the notation
stands for the integer part of
. We note that calculating an inverse of an element of
is equivalent to raising it to the seventh power; hence, we have
In other papers [
20,
21], authors have considered non-commuting groups of sizes 32 and 64, respectively. Interestingly enough, special cases of definition (
3) were mentioned in those papers as well.
In a previous paper [
19], we explored the basic properties of
seeking implementations of this group in cryptography. The results of this paper showed that
can be used as a platform for MPF, and over the following years we published several papers in which we proposed various symmetric and asymmetric cryptographic primitives based on an MPF defined over
. Moreover, we considered the complexity of the algebraic problem behind a key exchange protocol defined using the aforementioned tools. Using Schaeffer’s criteria, we were able to prove that a certain MPF problem is NP-complete if
is used as a platform. This fact brings us one step closer to the branch of post-quantum cryptography, as it is conjectured that NP-complete problems are thus far uncrackable by quantum computers.
Even though the research presented in this paper belongs to the field of symmetric cryptography, there are similarities between the computational problems our primitives are based on. Hence, we claim that the CTR mode of our block cipher can be considered computationally safe. We define this feature formally in
Section 5 and prove it in Proposition 3.
In general, the group contains words of the types or , where and . However, due to relations , and , every word can be written in the form , which we consider a canonical representation. Hence, the cardinality of this group is . This fact is indicated by the index in its notation. A similar idea is true for the general case, i.e., .
Recently, we have considered applications of MPF defined over in symmetric cryptography. Based on our previous findings, in the upcoming section we present a symmetric block cipher, i.e., we show how to encrypt and decrypt a message using MPF defined over .
3. Shannon Block Cipher Based on MPF
Let us consider a message of bits which can be represented by a matrix M with entries in . Such a message is viewed as a single block for our cipher. The transformation of the initial message to its matrix representation is performed by splitting it into chunks of size t. The most significant bit of each piece is interpreted as the power of generator b whereas the rest of the bits represent the power of generator a. As such, we can define two matrices and which consist of the mentioned powers of generators b and a, respectively. Moreover, we use this index notation for other matrices as well, thus separating the powers of generators into appropriate matrices. We use the extra notations to define matrices with entries and , respectively, where and .
Furthermore, in our research we make use of the following extra mappings which help us to separate the powers of generators
a and
b. We denote these mappings by
and
, where
, and define them as follows:
At first, it may seem that the pair is a kind of analogue to the discrete logarithm mapping. However, because is a non-commuting and indecomposable group, the basic properties that the discrete logarithm should satisfy are invalid in the general case. Hence, the use of these mappings is not harmful to our scheme. Instead, we use them to hide the output of the LRMPF value.
More specifically, we define the matrix analogues of the mappings
and
by simply applying them entry-wise to the entries of the matrix
, where ⊙ denotes the Hadamard product of two matrices. Denoting them by the appropriate uppercase letters, we have:
Now, we are ready to describe our proposal in greater detail. Prior to executing the proposed scheme, the parameters
t and
m and the shifting parameter
, defined below in Equation (
7), are published online. In addition, note that each time something is chosen at random we assume that the choice is uniform in the appropriate set of possibilities.
3.1. Key Generation Procedure
The result of the following key generation procedure is a symmetric key .
Generate a binary matrix
Generate a matrix with random entries from ;
Generate a temporary matrix with random entries from
Choose a permutation matrix from the set of permutation matrices
Define ; using Gauss–Jordan algorithm, calculate its inverse .
Note that no additional restrictions are applied each time the matrix is generated at Steps 1–3 of the presented process. In addition, because
is a permutation matrix, the last step of the presented algorithm is always successful, i.e.,
is invertible. Hence, all the steps of this procedure are executed exactly once, as none of them can result in a failure. It can be seen that due to the definition of matrix
, both even and odd entries of
are distributed uniformly in the subsets of even and odd elements of
, respectively. This fact is important in establishing the perfect secrecy property in
Section 4.
3.2. Encryption Function
Assuming that the original message has been converted into its matrix representation, the encryption is performed as follows:
The obtained matrix representation of the message is split into separate matrices and , where each leading bit of an entry of the message matrix is used to form binary matrix , whereas the rest of bits are used to form . Notably, entries of are interpreted as powers of generator b. Similarly, contains powers of generator a.
The encryption algorithm is as follows:
where ‖ denotes the concatenation of two matrices,
is the entry-wise shifting by
bits (e.g., to the right) operator, and the addition is performed with respect to the appropriate modulo (i.e., matrices
and
are summed modulo 2,
and
modulo
, and finally modulo
). In all cases, we omit moduli of addition, as their values are usually clear from the context.
The matrix
is converted into a string of bits by concatenating its entries in the following way:
The obtained string c is the ciphertext of the initial message.
Due to the discussed steps, the encryption function is provided by
where
is the original message represented in matrix form and
is defined as in Equation (
7).
3.3. Decryption Function
Let us assume that the received ciphertext c has been transformed into a matrix in the same way as the original message. The following procedure is performed to decrypt the encrypted message using the symmetric key .
The decryption algorithm is as follows:
where
is a binary matrix obtained by splitting the first bits of
and
consists of the leftover bits. Subtraction is to be treated as an inverse of addition in the encryption algorithm (
7).
Matrices and are concatenated together entry-wise, producing matrix .
The obtained matrix undergoes the procedure of transformation to a string of bits by concatenating entries of the matrix.
Junk symbols are removed (if any). The output of this step is the initial message.
We can summarize the steps presented above by defining the decryption function as follows:
where
is the ciphertext represented in matrix form and
is defined as in Equation (
9).
3.4. Proof of the Validity
Looking at the presented encryption and decryption algorithms, we can clearly see that due to definitions of these matrices.
Let us consider an intermediate result
. Note that entries of matrix
T are provided by
An important restriction, which helps us to prove the validity of our protocol, is the structure of the key matrix
. Obviously, due to
being a permutation matrix modulo 2, it is invertible over
, as its determinant is always odd and hence is relatively prime with
for any value of
t. Furthermore, because exactly one entry is odd in each row and each column of
, exactly one of the multipliers in the product (
11) can contain generator
b, and hence it can never be cancelled unless raised to an even power.
It is clear that the restoration of the matrix
is successful modulo
, as in this case the non-commutative nature of the platform group is gone, i.e.,
. Hence, only the extra summands of
can affect the final result. However, the structure of matrix
helps to control extra summands in the powers of generator
a as well. More precisely, if the extra summand appears when calculating
, then it appears when restoring
as well, cancelling the original effect. Similarly, if the extra summand does not appear in the first place, then it does not appear during decryption. Hence, we have
. This is due to the fact that the parity of the powers of generator
a is preserved during decryption calculations thanks to the structure of matrices
and
. For this reason, and due to the successful restoration of the powers of generator
b using Formulas (
4) and (
5), we obtain the desired result. Hence, the matrix
, which has the same structure as
, successfully restores the initial matrix
when applied to
, i.e., we have
.
We now consider the matrix . Due to the properties established in this proof, the matrix successfully restores matrix , i.e., .
Combining these two observations, we gain the following result:
Moreover, applying the mappings and and subtracting the appropriate matrices yields the matrix form of the initial message, i.e., .
Matrix
now undergoes a transformation to obtain a string of bits
d by concatenating its entries as follows:
Relying on the discussed observations, we conclude that d is the bit string representing the initial message with junk symbols at the end. These can now be dropped to leave us with the initial message.
3.5. The Main Properties of the Proposed Block Cipher
In our previous paper [
16], we have shown that all the intermediate steps of the similarly designed block cipher operating in CBC mode produce values uniformly distributed in the appropriate algebraic structures. Moreover, the block cipher proposed in that paper has the perfect secrecy property. Here, we revise the appropriate proofs and adapt them to fit our proposal.
Due to the similarities between the two ciphers, we claim that the following statements are true.
Proposition 1. Assume that the secret key is uniformly chosen from the set of all possible keys . Then, in Step 2 of the counter mode, the intermediate matrices are distributed uniformly in and the matrix is distributed uniformly in .
Proof. Let us apply the previously defined mappings and to the matrix , where and . Recall that due to the statement of the proposition and the properties of matrix summation, the entries and are uniformly distributed in and , respectively.
Because is a permutation matrix modulo 2, it mixes up the entries of without changing them. For this reason, the entries of are uniformly distributed in . Hence, powers of generator b in matrix are uniformly distributed in .
We now consider the distribution of the powers of generator a in matrix . Keeping in mind the properties of permutation matrices, without loss of generality, we henceforth consider a special case of identity permutation, i.e., we assume that odd entries of matrix are located on its main diagonal. We make a remark regarding the general case of permutation matrices later in this proof.
Let us focus on the intermediate result
and apply the mapping
to this matrix. We can express every entry
as follows:
where
can be one of two possible values depending on the number of times the extra summand
was added. We split the sum (
12) into two parts based on the parity of entries of matrix
. Then, for even values of
, we have
Due to the special structure of matrix
, we have a single summand of the sum (
12) containing an odd entry
. Hence, we denote
Note that if
is a permutation matrix other than identity modulo 2, then the column index changes in the extracted summand. The omitted index in sum (
13) changes as well. These are the only two differences in the general case.
Due to construction, all possible values of the sum (
13) lie in the subset of even elements of
, and hence we claim that
which is obviously true, as these probabilities form a total probability. The exact values of these probabilities are irrelevant.
Considering the only odd summand, we can calculate the following probability:
where
is fixed. This comes from the fact that
, and hence
exists. Moreover,
is uniformly distributed due to the statement of the lemma.
Meshing facts (
15) and (
16) together, we obtain the following result:
This result means that powers of generator a in an intermediate matrix are distributed uniformly in . Note that because the term does not play a major part in this calculation, distributions of power of both generators are independent of each other, i.e., powers of generator b do not in any way affect the distribution of powers of generator a.
Similar calculations of probabilities can be performed for the powers of generator a in the matrix . Relying on the uniform distribution of entries of matrix and properties of matrix , we draw a conclusion that powers of generator a in matrix are distributed uniformly.
Lastly, the powers of both generators in matrix are distributed uniformly. Then, due to the properties of the matrix summation and uniform distribution of concatenated matrices, the final output is distributed uniformly in . The shifting operation does not play any part in this distribution, as it only performs an additional mix of bits. □
Proposition 2. Assume that the secret key is uniformly chosen from the set of all possible keys . Then, the block cipher presented in Step 2 is perfectly secure.
Proof. Let us consider encryption algorithm (
7). First, we turn our attention to matrix
and focus on the powers of generator
a. Denoting
, we rewrite each entry of matrix
U in the following form:
Due to the statement of the theorem, entries
are chosen at random and are uniformly distributed in
, whereas entries
are random arbitrary distributed values in
. For any fixed matrix
with entries
, we have
where
are fixed elements of
.
We now calculate the conditional probabilities of the entries of matrix
:
because the entries
and
are independent, and the difference
.
Another important property of matrix
is the independence of its entries. Because all
,
, are independent, for all
we have
In the last step, we use the fact that the sum is the total probability, and hence is equal to 1.
Relying on the obtained Equalities (
19)–(
21), we claim that
where
is a fixed matrix.
Similarly, matrix
is chosen uniformly from
. For this reason, analogous observation holds for the matrix sum
, with probability
. However, both sums in the expression of
are independent of each other, and hence we have:
where
is a fixed matrix defined over
and
is a fixed matrix defined over
. Hence, we have shown that the entries of matrix
are uniformly distributed in
.
Let us denote the set of all possible values of key matrix by . Note that each matrix from this set reduced modulo 2 is a permutation matrix, and hence the cardinality of this set is .
We now consider the second step of the encryption algorithm (
7), i.e., matrix
. Due to Proposition 1, entries of MPF value are uniformly distributed in
. All that is left is to explore the conditional probabilities of its entries, expressed as follows:
Explicit calculations of probability
are presented below in matrix form for simplicity:
where
is a fixed matrix. Here, we use the fact that the entries of
are identically uniformly distributed and are independent of matrix
. Furthermore, keeping with our notation, the sum
represents a total probability, and hence is equal to 1. Note that we use the notation
to indicate the probability of a certain fixed message, which is then split into two parts
and
.
We limit ourselves to the matrix form of these calculations, as the expression of probability for a single entry of is much more complicated due to restriction on matrix .
Because Expression (
25) is a numerator of conditional probability (
24), we obtain the following result:
It can be seen from the obtained result that the distributions of and match, and we can hence draw the conclusion that entries of matrix are independent of plaintext matrix .
The proof for the last step of the encryption algorithm is analogous to the proof of the first step, as the matrix consists of uniformly distributed entries in , whereas the shifting function does not have an impact on the distribution of the entries of the other matrix summand. □
However, it is important to note that for Proposition 2 to take place we have to apply restriction on matrix , i.e., we must have , where P is a permutation matrix. Otherwise, there is no way to ensure that the encryption function is one-to-one, and hence there is a second nonce , which can be used to decrypt the ciphertext. For these reasons, the conditional probabilities for the matrix do not grant us the desired independence from the nonce if the constraint on is neglected.
We should emphasize that in Proposition 2 we have established perfect secrecy for the encryption of a single block only. Obviously, as the plaintext grows in size it must be split into several blocks, and due to the fixed length of the secret key the CTR mode cannot possibly possess the perfect secrecy property, as it trivially contradicts Shannon theorem.
4. Counter Mode of Our Cipher
In this section, we introduce the main idea of this paper, i.e., the counter mode of our cipher. Due to the general scheme of this mode presented in
Figure 1, we consider only the encryption function (
8) of our original idea. Note that the restriction on matrix
is required in order to ensure that the encryption function is one-to-one, which, as we show in this section, plays an important role in establishing the perfect secrecy property of our block cipher. Moreover, according to [
1], despite the fact that the nonce is never decrypted, the original plaintext has to be restored using the same nonce and no other such nonces should exist. This condition implies the one-to-one nature of the encryption function. Hence, for now we leave this restriction intact and present our thoughts on the matter at the end of this paper.
Prior to performing encryption of the plaintext limited by blocks, the sender generates the nonce as a bit string, which for now can be interpreted as a number . This is done by randomly choosing an integer and setting . The counter mode is executed as follows:
For the
j-th block, we define a bit string
of size
and convert it into a matrix by splitting off
t-bit chunks
and interpreting them as entries of the matrix
row-wise, i.e., the matrix
is as follows:
The matrix is encrypted using the secret key using the encryption function to obtain a ciphertext matrix .
The matrix is transformed into a bit string of size by concatenating its entries, i.e., ;
The plaintext is split into separate disjoint parts of bits (with junk at the end if required), where . Each part is XORed with an appropriate bit string .
The output of this algorithm is the ciphertext , where c is obtained by concatenating chunks into a single string.
The decryption works similarly, with the plaintext replaced by the ciphertext in the last step.
However, the perfect secrecy property does not mean that our block cipher is impervious to other kinds of attacks. The widely known one-time pad technique is easily broken if the secret key is ever reused. This is something CTR mode and one-time pad have in common. The major difference in the CTR mode, as opposed to the one-time pad, is the fact that nonces must not be reused. However, it is much easier to ensure this restriction, and casual solutions for this issue are known.
5. Security Analysis
In this section, we take another step towards the security of our block cipher. Following the technique presented in [
1], we use the notion of an Attack Game played between an adversary
, an effective algorithm aimed at the disruption of communication by extracting hidden data (e.g., private key of some other relations) given the publicly available information, and a challenger, a machine excepting inputs from the adversary and generating outputs based on a certain sequence of actions.
The purpose of the attack game we consider in this section is to somehow tell apart the encryption function from other random functions. In other words, we aim to show that the encryption function can be viewed as a secure pseudorandom permutation (PRP). Note, however, that at the moment we assume that the messages to be encrypted are chosen at random. Hence, for now we adapt the notion of weak PRP security from [
1].
Attack Game 1. Consider the encryption function , where the is the encrypted plaintext in its matrix representation. For an index , we define the following Experiment β between the challenger and the adversary :
- 1.
The challenger randomly selects a function F in a following way:where is a truly random permutation. - 2.
The adversary requests a sequence of Q queries from the challenger consisting of plaintext matrices matrices , where is the index of the queries and ciphertext matrices .
- 3.
The challenger generates random matrices distributed uniformly in and computes . He sends the obtained pairs to the adversary.
- 4.
Relying on the obtained responses, the adversary outputs an experiment indicator and wins the game if .
Denote by the probability of the random event that outputs the value β. The advantage in winning the above game is then provided by Note that in this Attack Game the adversary remains passive and can only request queries one at a time. Extra investigations of possible enhancements of our proposal are needed to fully understand whether the adversary can be active in the presented Attack Game.
Relying on the uniform distribution of the ciphertext matrix in established in the previous section, we claim the following.
Proposition 3. The encryption function is a weakly secure pseudorandom permutation, i.e., the probability of winning the Attack Game 1 is negligible if messages are chosen at random with uniform distribution.
Proof. Let us first note that the adversary
can gain control of all the possible messages
by expressing them as a linear combination of the basis elements of the message space
. All the adversary needs to do is to request
queries and check matrices
for linear independence. Every subsequent query
, where
can be expressed in the following way:
for some coefficients vector
. Conveniently, the co-domain of the function
matches the domain, and hence every output can be expressed as a linear combination of the same basis elements, i.e.,
for some coefficients vector
.
If , i.e., the original encryption function is used to encrypt the messages , then due to the constraint on the parameter the encryption function is a one-to-one mapping. Hence, all of the outputs are distinct. Furthermore, given a random vector uniformly distributed , the probability , where is a fixed vector. For the first query, we can simply use Proposition 1. For subsequent queries, we rely on the uniform distribution of message matrices, as in this case the ciphertext matrices preserve this distribution.
On the other hand, if , then because is a random permutation it affects the matrix in a way indistinguishable from the one presented above, i.e., the output is distributed uniformly in , and hence the probability is the same for all queries q.
To summarize, regardless of the value of , all the values of the coefficients vector are equally possible, and hence the distribution of the outputs is indistinguishable from the uniform in . For this reason, is negligible. □
Hence, relying on the proven result, we claim that the function
can be considered a weakly secure pseudorandom permutation. We use this fact in
Section 5 to prove the resistance of our main idea against passive adversaries.
Note that as of now we cannot do any better than Proposition 3. This is due to the fact that hidden correlations arise between the ciphertexts when the adversary is allowed to choose the message matrices at will. We believe that this issue can be fixed using additional actions to mix the entries of the message matrices prior to applying the MPF mapping. However, this is a topic for future research.
As we proven that the encryption function is a weakly secure pseudorandom permutation, we only consider passive attacks at the moment. We formalize the resistance of of the presented CTR mode against passive adversaries in the following Attack Game aimed at relating each obtained ciphertext to the original plaintext given two choices. This means that the adversary can obtain useful information, based on which he can choose the original plaintext with a probability significantly different from the coin toss experiment.
Attack Game 2. Consider the nonce-based encryption scheme , where the ciphertext matrix . For an index , we define the following Experiment β between the challenger and the adversary :
- 1.
The challenger randomly selects a key .
- 2.
The adversary requests a sequence of queries to the challenger consisting of the pair of equal length messages , the nonces , where denotes the space of all possible nonces, and the ciphertexts .
- 3.
The challenger generates messages and nonces at random. Furthermore, he computes the ciphertext as presented above. He sends these values to the adversary.
- 4.
Relying on the obtained responses, the adversary outputs an experiment indicator and wins the game if .
We denote by the probability of the random event that outputs the value β. The advantage in winning the above game is provided by: Based on the properties of our scheme, we claim the following.
Proposition 4. For any efficient adversary , his advantage in Attack Game 2 is negligible.
Proof. This result follows directly from the fact that
is a weakly secure pseudorandom permutation and from Theorem 5.6 of [
1]. □
From the results of this paper, it can be seen that our proposed CTR mode of the block cipher based on MPF can resist all passive attacks.
From the point of view of implementation of our CTR mode, the practical advantage of winning Attack Games 1 and 2 must be taken into the consideration to determine the safe values of the main parameters of our block cipher, namely, the order of the square matrices
m and the group size determining parameter
t. Though more investigations may be required in this area, we think that the link between the number of queries sent by the adversary in Attack Game 2 can be estimated by the following inequality:
which comes from Theorems 4.4 and 5.6 of [
1].
Here, we should make another important observation. Due to the general structure of the CTR mode, the decryption function is never used. This fact grants us an opportunity to discard the restriction on the power matrix Y, thus making the encryption function irreversible. A further investigation of this change may be required to fully understand the effect it has on the proposed CTR mode.
6. Conclusions and Discussion
In this paper, we have presented a CTR mode of the original block cipher based on matrices. Interestingly enough, instead of using multiple rounds to obtain a ciphertext, we propose a strongly nonlinear MPF mapping. Our previous results together with our current findings show a promising future for the presented ciphers, as they are perfectly secure, which had previously been proven only for the OTP technique. In this paper, we have explored the resistance of our proposal to passive attacks; however, there is a great deal of work yet to be done. At the moment, we have introduced the basic idea of MPF application for the counter mode of encryption. It now makes sense to work towards enhancements of the original idea to make our proposal impervious to active attacks.
Interestingly, in the present paper we have demonstrated a way to construct a working block cipher using a non-commuting platform group. Despite the fact that the associativity property (
1) is not satisfied, we were able to define a suitable template for the power matrix
, which allowed us to overcome this feature of MPF. Note, however, that if the defined constraints on matrix
are neglected, the decryption function of the presented block cipher cannot be successfully used to restore the original plaintext.
The latter fact creates a rather interesting opportunity for our proposal, as discarding (or greatly loosening) the restrictions of the power matrix
would make the encryption irreversible. Even though, as pointed out in [
22], this change could be advantageous due to the PRP/PRF switching lemma, it is necessary to analyze the complexity of nonce collision problem, i.e., whether it is possible to effectively find two nonces which produce the same ciphertext matrix. If this problem can be easily solved, it would have a dire effect on the resistance of our proposal to all kinds of attacks.