1. Introduction
With the development of cloud services, the privacy protection of data stored in the cloud has become particularly important. One solution to providing secure cloud computing on untrusted public clouds is Fully Homomorphic Encryption. This encryption scheme supports the computation of encrypted data in a homomorphic way without needing decryption on the cloud. Cloud services based on FHE frameworks play a role in many applications, such as private data banks, encrypted search and multi-party security calculations, while they have the well-known bottlenecks: high computational cost and limited homomorphic capacity. See [
1,
2] for details.
To mitigate the bottlenecks and improve the efficiency of homomorphic encryption for an acceptable fully homomorphic cryptosystem, Méaux et al. [
2] presented a new type of stream cipher, denoted as a filter permutator, at Eurocrypt 2016. They gave a general structure of filter permutators as shown in
Figure 1 [
2]. A filter permutator consists of three parts: the key register, which stores the original key; the permutation generator, which is parameterized by a Pseudo Random Number Generator (PRNG) and generates a permutation P to permute the key from the register; and the filter function, which filters the permuted key to output the key stream.
Lastly, the encryption (resp. decryption) needs to XOR the key stream with the plaintext (resp. ciphertext) to generate the ciphertext (resp. plaintext). A family of filter permutators, called FLIP, is specified. FLIP utilizes Knuth shuffle as the permutation generator parameterized by a forward secure PRNG based on the AES-128 and takes the direct sum of three Boolean functions as the filter function.
Different from the Boolean function used in traditional stream ciphers, the inputs of the Boolean function acting as a filter function in FLIP come from different permutations of the same key and, therefore, have the same Hamming weight. As a result, in order to construct the filter function in FLIP, Boolean functions with restricted input, studied early in [
3,
4], have now become a class of functions of great interest in cryptography.
It has been shown that, for Boolean functions with restricted input, balancedness, nonlinearity and algebraic immunity continue to play a vital role in the corresponding attacks on somewhat homomorphic cryptosystems in the framework of FLIP ciphers (see [
5,
6]). Considering the first general cryptographic requirement, these functions need to be balanced. Therefore, weightwise perfectly balanced (WPB) Boolean functions become the focus of research on Boolean functions with restricted input.
If a Boolean function is always balanced when restricted to each subset of
with the same Hamming weight (not equal to 0 or
n) and has different outputs when the input’s Hamming weight is 0 and
n, it is called a WPB function. In 2017, Carlet et al. constructed the first class of WPB functions using recursive methods for FLIP [
6]. In 2019, the author in reference [
7] proposed a class of WPB functions that belong to two-rotation symmetric Boolean functions. Some classes of WPB functions are presented by modifying the supports of Boolean functions with low algebraic degree not larger than 4 in [
8,
9,
10].
The reference [
11] analyzed the lower bound of weightwise nonlinearity of one class of WPB functions. A family of WPB functions with the maximal algebraic immunity is given in [
12], and based on them, Mesnager et al. proposed two new concrete ones in 2022 [
13]. Although WPB functions have attracted great attention, it is still challenging work to construct this class of functions, particularly the ones with other good cryptographic properties.
As mentioned above, modifying the supports of Boolean functions with low algebraic degree is a useful technique, which has been used in [
8,
9,
10] to build WPB functions. The focus of this technique is to find low-degree functions. The authors in [
8,
9,
10] found different functions possessing degrees not higher than 4. In this paper, we obtain a class of quadratic Boolean functions whose
p-weight is easy to analyze and calculate. Utilizing these functions, we propose a fresh class of
-variable WPB functions. We make a computer program and compute the
p-weight nonlinearity of functions with a small number of variables. The experimental results show that our functions have significantly higher
p-weight nonlinearity compared with the other main existing functions. In addition, we also analyze their algebraic degree and algebraic immunity.
The remainder of the paper is organized as follows. The formal definition and necessary preparations are introduced in
Section 2. A class of quadratic Boolean functions is presented in
Section 3. In
Section 4, we give the construction of WPB functions and show the specific process of proving them. Then, we compare the
p-weight nonlinearity of WPB functions with other papers. Finally, we conclude the paper with
Section 5.
2. Preliminaries
Let
be the
n-dimensional vector space over
,
be a vector in
, all zero vector
, and all one vector
. The mapping
f from
to
is called an
n-variable Boolean function.
is the set of all
n-variable Boolean functions. Usually,
f can be represented by its truth table, i.e.,
For a vector , we claim its support is , and its Hamming weight is . With being regarded as a vector, the Hamming weight of f is , where f’s support is often described as the set of input vectors making f outputs 1—that is to say, . If takes the value , we say that f is balanced.
In addition,
f can be expressed by its algebraic normal form, i.e.,
where the coefficient
,
. The algebraic degree of
f is defined as
A Boolean function f is said to be affine if .
When talking about a Boolean function
f with restricted input, we define it is
p-weight support as
where
. The
p-weight of
f is
For the sake of argument, we denote
Definition 1. Let . We claim that f is a WPB Boolean function if for and .
Thus far, the existing research has indicated that the number of variables of the WPB Boolean function is a power of 2 [
6]. Therefore, the Boolean functions that we construct in this paper have
variables.
In addition to the consideration of balancedness, the construction of Boolean functions should also consider meeting high nonlinearity to achieve resistance against fast correlation attacks. Nonlinearity is a particularly important cryptographic criterion of Boolean functions, which describes the minimum Hamming distance between a Boolean function and all affine functions. When the input of a Boolean function is restricted to the vector set with integer , we call its nonlinearity p-weight nonlinearity.
Definition 2. Let . For , the p-weight nonlinearity of f is expressed aswhere . is called the weightwise nonlinearity of f. Remarkably, reference [
6] gives the upper bound of the
p-weight nonlinearity of
f as follows
where
is the largest integer not greater than
a.
Another well-known cryptographic criterion of Boolean functions is algebraic immunity, which should be as high as possible to make the Boolean function resist algebraic attacks.
Definition 3. Suppose . The algebraic immunity of f is defined aswhere . Previous studies have shown that . Specially, if reaches the value , we say that f has the maximal algebraic immunity.
Next, we show the following two lemmas, which will be used later in the the paper.
Lemma 1. (Pascal’s Rule). Let k and j be two integers. We have Lemma 2 ([
14]).
(Chu–Vandermonde’s Identity)). Let k, t and j be three integers. We have 3. Quadratic Functions
This section introduces a new class of quadratic functions, which is going to be utilized to construct the following WPB functions.
Let
be a
-variable Boolean function with the form defined as
where
,
.
Example 1. If , .
If , .
Lemma 3. For defined in (4), it follows thatwhere , , , and . Proof. By (4), it can be deduced that
and
□
By Lemma 3, we can easily know that
if and only if
, where
and
are defined as same as in Lemma 3. The
p-weight support of
in (4) can be derived from this fact, which is
Lemma 4. The p-weight of defined in (4) iswhere and . Proof. Assuming that
, from (5), we have
where
, and
. Thus, we obtain
□
Lemma 5. Suppose m and p are two integers, then we have Proof. Assuming that
, we have
□
Theorem 1. The p-weight of defined in (4) iswhere and . Proof. When
, the
p-weights of
in (4) are
Thus, the p-weights of clearly satisfy (8).
The
p-weights of the Boolean function
when
in (4) are given in
Table 1. It is easy to see that all the
p-weights of
satisfy (8).
Now, we will use mathematical induction to complete this proof. We first assume that (8) holds for
when
, i.e.,
In what follows, we prove that (8) holds for .
- (1)
When
p is a odd, it can be easily deduced that
is even if
i is odd, or that
is odd if
i is even. Then, we have
where the first, second and fourth equations hold due to (6), (9) and (7), respectively, and the last one is from fact (3).
- (2)
When
p is even, we find that
i is odd if
is odd, or that
i is even if
is even. Then, we have
where the first, second and fourth equations hold due to (6), (9) and (7), respectively, and the last one is from fact (3).
□
4. WPB Functions
Let
be a
-variable Boolean function, which can be defined as
where
,
,
,
, and
is defined in (4).
Example 2. It is clear that is WPB. When , then The p-weight supports of are as follows, Thus, is WPB acoording the definition of WPB functions.
Lemma 6. Let be defined in (4). Given a vector such that for all , we have , where .
Proof.
where
. □
When , we note two facts: (1) the -variable function takes 1 if and only if for all , and (2) if and only if . Therefore, we have come to the following conclusion.
Corollary 1. The p-weight support of Boolean function defined in (10) iswhere , , , is defined in (4), and . Theorem 2. defined in (10) is a weightwise perfectly balanced function.
Proof. We use mathematical induction on
m in the proof process. First, by Example 2, we learn that
and
are WPB functions. Next, we assume that
is a WPB function for
with
and
. Thus, for
,
The calculation of the p-weight of defined in (10) is divided into three specific cases according to the value of p.
- (1)
If
, we claim
, and then
where the last identity holds by Theorem 1.
- (2)
If , there is one case where there is an integer i such that is not equal to . In this case, , similarly to case (1). There is another case where the fact holds that for all . In this case, we will discuss the p-weight of on the basis of the parity of .
- (2-1)
If
, we claim
where
,
. The second equality can be derived from Corollary 1, the third equality holds due to (8) and (12), and the last equality holds because
is odd.
- (2-2)
If
, we claim
where
,
. The second equation holds because of Corollary 1, the third equation is given by (8) and (12), and the last equation holds because of the condition that
is even.
Now, we consider the vectors and . It is easy to see that , and since , .
Based on the above discussion, the result follows that defined in (10) is a WPB function. □
Theorem 3. The algebraic degree of WPB function defined in (10) is Proof. Let the -variable Boolean fuction , where . Since , we can easily obtain .
Based on the obvious fact that
and
, we assume
. Then, we have
□
We simulate the
p-weight nonlinearity of
and
using the computer program and compare them with existing WPB functions. As shown in
Table 2 and
Table 3, the
p-weight nonlinearity of
and
are close to the upper bound
and reach higher values than those of most existing functions. In addition, the
p-weight nonlinearity of
is the highest when
p = 6, 7, 8, 9, 10.
In the end, the algebraic immunities of the function
in (10) for
m = 2, 3, 4 are given in
Table 4. Their algebraic immunrere is relatively poor when
m takes the value 4. Therefore, we still need to make more efforts on the WPB function for the optimal algebraic immunity with high weightwise nonlinearity.