# Generalized Boolean functions over Galois Rings*

Minjia Shi, Maolin Sun,† Ferruh Özbudak,‡ Patrick Solé§

## Abstract

Many authors have generalized Boolean functions with values over finite fields to functions valued over $Z_{p^k}$. In this work, we generalize their main properties to functions with values in Galois rings. We mainly study relations between generalized bent functions and their classical component functions. A connection with affine spaces of classical bent functions is established.

**Keywords:** Generalized Boolean functions, Bent functions, Galois rings

**AMS Cl. (2020):** Primary 94D10 Secondary 8W01

## 1 Introduction

Bent functions were first introduced by Rothaus [11] in 1976 as Boolean functions having constant magnitude Walsh transform, and were later generalized by Kumar, Scholtz and Welch [7] to $q$-ary bent functions. Bent functions form a remarkable class of Boolean functions with applications in many domains, such as difference sets [10], spreading sequences for CDMA [12], error correcting codes and cryptology [2]. In recent years, numerous generalizations of Boolean functions have been proposed and the properties of their Walsh-Hadamard transforms have been extensively studied [7, 13]. A possible cryptographic application of this range extension is the vectorization of stream ciphers like ZUC [16] where arithmetic is performed in $Z_{2^k}$ [6]. Very recently, an application to secret sharing schemes was

<footnote>*The research of Minjia Shi is supported by the National Natural Science Foundation of China (12471490).</footnote>

<footnote>†Minjia Shi and Maolin Sun are with the Key Laboratory of Intelligent Computing Signal Processing, Ministry of Education, School of Mathematical Sciences, Anhui University, Hefei 230601, China; State Key Laboratory of Integrated Service Networks, Xidian University, Xi'an, 710071, China. Email: smjwcl.good@163.com, maolinsun0203@163.com</footnote>

<footnote>‡ Sabanci University, Istanbul, Turkey. Email: ozbudak@metu.edu.tr</footnote>

<footnote>§ Patrick Solé is with I2M (Aix Marseille Univ, CNRS), Marseilles, France. Email: sole@enst.fr</footnote>
given in [1]. The aim of this paper is to extend further the range of the functions considered to Galois rings an important class of rings which contain both finite fields and rings $\mathbb{Z}_{p^k}$, for $p$ a prime, as special cases [5, 8]. In particular, Galois rings afford a notion of $p$-adic expansion analogous to what happens in $p$-adic analysis, and this notion will allow us to connect the properties of our generalized Boolean functions to their classical component functions. To be specific we now give some precise definitions.

A function from $\mathbb{F}_p^n$ to GR $(p^k, m)$ is called a generalized function on $n$ variables. The set of all such functions is denoted by $\mathcal{GF}_{p^n}^{(p^k, m)}$. An important tool in the analysis of a generalized function is the (generalized) **Walsh-Hadamard transform**, which is given by the map $\mathcal{H}_f : \mathbb{F}_p^n \to \mathbb{C}$, defined by

$$ \mathcal{H}_f(r, u) = \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x} \zeta_{p^k}^{\mathrm{Tr}(rf(x))}, $$

where $\mathrm{Tr}: \mathrm{GR}(p^k, m) \to \mathbb{Z}_{p^k}$ is the trace function on Galois rings defined in Section 2, $f \in \mathcal{GF}_{p^n}^{(p^k, m)}$, $r \in \mathrm{GR}(p^k, m)$, $u \in \mathbb{F}_p^n$, and $\zeta_{p^k} = e^{\frac{2\pi\sqrt{-1}}{p^k}}$ is a complex primitive $p^k$-th root of unity. The inverse Walsh-Hadamard transform of such an $f$ can be shown to be given by the relation

$$ \zeta_{p^k}^{\mathrm{Tr}(rf(x))} = p^{-n} \sum_{u \in \mathbb{F}_p^n} \zeta_p^{-u \cdot x} \mathcal{H}_f(r, u). \qquad (1) $$

The function $f$ is said to be a **generalized GR(p^k, m)-bent (or generalized bent function in short)** if $|\mathcal{H}_f(r, u)| = p^{\frac{n}{2}}$ for any $u \in \mathbb{F}_p^n$ and $0 \neq r \in \mathrm{GR}(p^k, m)$. The set of all generalized bent functions is denoted by $\mathcal{GBF}_{p^n}^{(p^k, m)}$.

A generalized bent function $f$ is **weakly regular** if there exists a constant $\lambda \in \{1, -1\}$ and some generalized functions $f^*$ satisfying $\mathcal{H}_f(r, u) = \lambda \sqrt{p^{*n}} \zeta_{p^k}^{\mathrm{Tr}(rf^*(u))}$ for any $u \in \mathbb{F}_p^n$ and $r \in \mathrm{GR}(p^k, m)$, where $p^* = (-1)^{\frac{p-1}{2}} p$. The function $f^*$ is called the **dual** of $f$. From (1), we see that the dual $f^*$ of a weakly regular generalized bent function $f$ is also a weakly regular generalized bent function.

**Caveat:** In sections 2 and 3 of this paper, to simplify notation, we write the results in the case of $k = 3$, and leave to the reader the tedious but straightforward generalization to $k > 3$.

The framework of this article is as follows. Section 2 collects background
material about Galois rings, Cyclotomic number fields, and generalized bent Boolean functions which will be useful in the subsequent sections. In Section 3, we present the complete characterization of generalized bent functions in terms of their classical components (Theorem 2, Theorem 3). In Section 4, we introduce partitions of $\mathbb{F}_p^n$ and affine spaces associated with generalized functions, study their properties and describe the relation between partitions, affine spaces and generalized bent functions (Theorem 4). In Section 5, we conclude this paper.

# 2 Preliminaries

Throughout this paper, let $\mathbb{F}_p^n$ be the $n$-dimensional vector space over $\mathbb{F}_p$, $\mathbb{C}$ be the field of complex numbers and $\mathbb{Q}$ be the field of rational numbers, where $p$ is prime and $n$ is a positive integer. Given two elements $u = (u_1, u_2, \cdots, u_n)$ and $v = (v_1, v_2, \cdots, v_n)$ of $\mathbb{F}_p^n$, define $u \cdot v = \sum_{i=1}^{n} u_i v_i$. If $z = a + bi \in \mathbb{C}$, then $|z| = \sqrt{a^2 + b^2}$ denotes the absolute value of $z$, and $\bar{z} = a - bi$ denotes the complex conjugate of $z$, where $i^2 = -1$ and $a, b$ are reals.

## 2.1 Galois rings

Galois rings have been studied by MacDonald [8], Hammons et al. [5], and others. Here we list some of the properties required for the rest of the paper. Let $p$ be a prime and $k, m$ denote positive integers.

The Galois ring $GR(p^k, m)$ is the Galois extension of degree $m$ of the residue class ring $\mathbb{Z}_{p^k}$. In particular, the ring $GR(p^k, m)$ can be viewed as the quotient $\mathbb{Z}_{p^k}[x]/(f)$, where $f$ is a monic basic irreducible polynomial in $\mathbb{Z}_{p^k}[x]$ of degree $m$. When $m = 1$, the ring $GR(p^k, m) = \mathbb{Z}_{p^k}$ and when $k = 1$, it is equal to the Galois field $\mathbb{F}_{p^m}$. Let $\zeta$ be a primitive element of order $p^m - 1$, that is, $\zeta^{p^m - 1} = 1$. All elements of $GR(p^k, m)$ can be described in two different forms (see [5, 8] for more details). In the first representation, every element $x \in GR(p^k, m)$ has a unique "p-adic" form:

$$x = \sum_{i=0}^{k-1} u_i p^i,$$

where $u_i \in \mathbb{T} = \{0, 1, \zeta, \cdots, \zeta^{p^m-2}\}$. The Teichmüller set $\mathbb{T}$ is a useful inverse image of the residue field $\mathbb{F}_{p^m}$ through reduction modulo $p$. In the second representation,
every element $x \in \text{GR}(p^k, m)$ has a unique "additive" form:

$$x = \sum_{r=0}^{m-1} a_r \zeta^r,$$

where $a_r \in \mathbb{Z}_{p^k}$. The Frobenius automorphism from $\text{GR}(p^k, m)$ to $\text{GR}(p^k, m)$ can be defined from the $p$-adic expansion:

$$\varphi : \sum_{i=0}^{k-1} u_i p^i \mapsto \sum_{i=0}^{k-1} u_i^p p^i.$$

Therefrom the trace map from $\text{GR}(p^k, m)$ to $\mathbb{Z}_{p^k}$ can be defined as

$$\text{Tr} : x \to x + \varphi(x) + \dots + \varphi^{m-1}(x),$$

where $\varphi^{m-1}$ is $m-1$ times the composition of $\varphi$ by itself. The usual trace map from $\mathbb{F}_{p^m}$ to $\mathbb{F}_p$ is given by

$$\text{tr} : x \mapsto x + x^p + \dots + x^{p^{m-1}}.$$

The map $\text{tr}^{-} : x \mapsto x \pmod{p}$ is a multiplicative isomorphism from $\mathbb{T}$ onto $\mathbb{F}_{p^m}$ and $\text{Tr}(u) = \text{tr}(\bar{u})$ for $u \in \mathbb{T}$.

## 2.2 Cyclotomic fields

In this paragraph, we present some results on cyclotomic fields, which will be used in the following sections. Let $k$ be a positive integer. Let $p$ be a prime, $m$ be a positive integer. Firstly, we state some basic facts on the cyclotomic field $K = \mathbb{Q}(\zeta_{pk})$. Let $\mathcal{O}_K$ be the ring of integers of $K = \mathbb{Q}(\zeta_{pk})$. Let the group of roots of unity in $\mathcal{O}_K$ be denoted by $W_K$. Some results on $K$ are given in the following pair of lemmas (see [15] for a general reference on cyclotomic fields).

**Lemma 1.** [9] Let $n$ be a positive integer. Let $k$ be any positive integer for odd prime $p$ or $k$ be a positive integer at least 3 for $p=2$. Let $\alpha \in \mathcal{O}_K$, and $|\alpha| = p^{\frac{n}{2}}$. Then $\frac{\alpha}{\sqrt{p^n}} \in W_K$.

**Lemma 2.** Suppose that $m$ and $p$ are two positive integers. Let $k$ be any positive integer for odd prime $p$ or $k$ be a positive integer at least 3 for $p=2$. Let $f$ be a generalized bent function from $\mathbb{F}_p^n$ to $\text{GR}(p^k, m)$. Then for every $u \in \mathbb{F}_p^n$ and
$r \in \text{GR}(p^k, m)$, there exist $\lambda_u \in \{-1, 1\}$ and $\rho_u \in \text{GR}(p^k, m)$ such that

$$ \mathcal{H}_f (r, u) = \lambda_u \sqrt{p^*} \zeta_{pk}^{\text{Tr}(\rho_u)}. $$

*Proof.* By definition of bentness, we have

$$ |\mathcal{H}_f (r, u)| = p^{\frac{n}{2}} = |\sqrt{p^*}|, $$

entailing $|\frac{\mathcal{H}_f(r,u)}{\sqrt{p^*}}| = 1$. By Lemma 1, we know that $\frac{\mathcal{H}_f(r,u)}{\sqrt{p^*}} \in W_K$. The result follows. $\square$

## 2.3 Generalized Boolean functions

We give two technical lemmas on generalized Boolean functions that will be used in the next section.

**Lemma 3.** Let

$$ \gamma_a = \sum_{v \in \text{GR}(4,m)} (-1)^{\sum_{i=1}^{2} \text{tr}(\overline{a_i}) \text{tr}(\overline{v_i})} \zeta_8^{\text{Tr}(\sum_{i=1}^{2} v_i 2^{2-i})}, $$

where $a, v \in \text{GR}(4, m)$, $a = (a_1, a_2)$, $v = (v_1, v_2)$, and $v_i, a_i \in \text{T}$. Then

$$ \zeta_8^{\text{Tr}(e)} = \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (-1)^{\text{tr}(\overline{a_1})\text{tr}(\overline{u_1}) + \text{tr}(\overline{a_2})\text{tr}(\overline{u_2})} \gamma_a, $$

where $e = 2u_1 + u_2$, $u = (u_1, u_2)$, $u_i \in \text{T}$.

*Proof.* Let $A = \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (-1)^{\text{tr}(\overline{a_1})\text{tr}(\overline{u_1}) + \text{tr}(\overline{a_2})\text{tr}(\overline{u_2})} \gamma_a$. Then

$$ \begin{aligned} A &= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (-1)^{\text{tr}(\overline{a_1})\text{tr}(\overline{u_1}) + \text{tr}(\overline{a_2})\text{tr}(\overline{u_2})} \sum_{v \in \text{GR}(4,m)} (-1)^{\text{tr}(\overline{a_1})\text{tr}(\overline{v_1}) + \text{tr}(\overline{a_2})\text{tr}(\overline{v_2})} \zeta_8^{\text{Tr}(\sum_{i=1}^{2} v_i 2^{2-i})} \\ &= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (-1)^{\sum_{i=1}^{2} \text{tr}(\overline{a_i}) \text{tr}(\overline{v_i}) + \sum_{i=1}^{2} \text{tr}(\overline{a_i}) \text{tr}(\overline{v_i})} \sum_{v \in \text{GR}(4,m)} \zeta_8^{\text{Tr}(\sum_{i=1}^{2} v_i 2^{2-i})}. \end{aligned} $$
Since

$$ \sum_{a \in \text{GR}(4,m)} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i)(\text{tr}(\bar{u}_i) + \text{tr}(\bar{v}_i))} = \begin{cases} 0, & \text{tr}(\bar{u}_i) \neq \text{tr}(\bar{v}_i), \exists i \in \{1, 2\} \\ 2^{2m}, & \text{tr}(\bar{u}_i) = \text{tr}(\bar{v}_i), \forall i \in \{1, 2\} \end{cases} $$

Then

$$ \begin{aligned} A &= \frac{1}{2^{2(m-1)}} \sum_{v \in \text{GR}(4,m), \text{tr}(\bar{u}_i) = \text{tr}(\bar{v}_i), \forall i \in \{1,2\}} \zeta_8^{\text{Tr}(\sum_{i=1}^{2} u_i 2^{2-i})} \\ &= \zeta_8^{\text{Tr}(\sum_{i=1}^{2} u_i 2^{2-i})} . \end{aligned} $$

□

**Lemma 4.** Let

$$ \gamma_a = \sum_{v \in \text{GR}(4,m)} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{v}_i)} \zeta_8^{\text{Tr}(\sum_{i=1}^{2} v_i 2^{2-i})}, $$

where $a, v \in \text{GR}(2^2, m)$, $a = (a_1, a_2)$, $v = (v_1, v_2)$, and $v_i, a_i \in \text{T}$. Then

$$ \zeta_8^{\text{Tr}(e)} + \zeta_8^{\text{Tr}(e)+2} = \frac{1}{2^{2(2m-1)-1}} \sum_{a \in \text{GR}(4,m), \text{tr}(\bar{a}_1) = \text{tr}(\bar{u}_1)} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{u}_i)} \gamma_a. $$

$$ \text{where } e = \sum_{i=1}^{2} u_i 2^{2-i}, u = (u_1, u_2), u_i \in \text{T}. $$

*Proof.* We prove it by the value of the trace of the first component of $u$.

(1) If $\text{tr}(\bar{u}_1) = 0$, then we have

$$ \begin{aligned} & \zeta_8^{\text{Tr}(e)} + \zeta_8^{\text{Tr}(e)+2} \\ &= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (1 + (-1)^{\text{tr}(\bar{a}_1)})(-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{u}_i)} \gamma_a \\ &= \frac{1}{2^{2(2m-1)-1}} \sum_{a \in \text{GR}(4,m), \text{tr}(\bar{a}_1) = \text{tr}(\bar{u}_1)} (-1)^{\text{tr}(\bar{a}_2) \text{tr}(\bar{u}_2)} \gamma_a. \end{aligned} $$
(2) If $\mathrm{tr}(\overline{u_1}) = 1$, from $\zeta_8^{\mathrm{Tr}(e)+2} = -\zeta_8^{\mathrm{Tr}(e)-2}$, then we have

$$
\begin{align*}
& \zeta_8^{\mathrm{Tr}(e)} + \zeta_8^{\mathrm{Tr}(e)+2} \\
&= \zeta_8^{\mathrm{Tr}(e)} - \zeta_8^{\mathrm{Tr}(e)-2} \\
&= \frac{1}{2^{2(2m-1)}} \sum_{a \in \mathrm{GR}(4,m)} (1 - (-1)^{\mathrm{tr}(\overline{a_1})})(-1)^{\sum_{i=1}^2 \mathrm{tr}(\overline{a_i}) \mathrm{tr}(\overline{u_i})} \gamma_a \\
&= \frac{1}{2^{2(2m-1)-1}} \sum_{a \in \mathrm{GR}(4,m), \mathrm{tr}(\overline{a_1}) = \mathrm{tr}(\overline{u_1})} (-1)^{\mathrm{tr}(\overline{a_2}) \mathrm{tr}(\overline{u_2})+1} \gamma_a.
\end{align*}
$$

□

3 Decomposition of Generalized Bent Functions

In this section, we present the complete characterization of generalized bent
functions in terms of their classical components. Let $f : \mathbb{F}_p^n \to \mathrm{GR}(p^3, m)$ be a
generalized bent function. It turns out that the Walsh-Hadamard transform of $f$
can be described in terms of the Walsh-Hadamard transform of its components $f_i$
(we generalize here some theorems in [9] and [14] from finite fields to Galois rings).

**Theorem 1.** Let $p = 2$, $rf(x) = \sum_{i=0}^{2} f_i(x)2^{2-i}$, where $f : \mathbb{F}_2^n \to \mathrm{GR}(2^3, m)$,
$f_i : \mathbb{F}_2^n \to \mathrm{T}$ and $r \in \mathrm{GR}(8, m)$. Set $B(x) = \sum_{i=1}^{2} \mathrm{tr}(\overline{a_i}) \mathrm{tr}(\overline{f_i(x)}) + \mathrm{tr}(\overline{f_0(x)})$, then

$$
\mathcal{H}_f (r, u) = \frac{1}{2^{2(2m-1)}} \sum_{a \in \mathrm{GR}(4,m)} \mathcal{H}_B (1, u) \gamma_a,
$$

where $\gamma_a = \sum_{v \in \mathrm{GR}(4,m)} (-1)^{\sum_{i=1}^2 \mathrm{tr}(\overline{a_i}) \mathrm{tr}(\overline{v_i})} \zeta_8^{\mathrm{Tr}(\sum_{i=1}^{k-1} v_i 2^{2-i})}$, where $a, v \in \mathrm{GR}(4,m)$, $\mathrm{Tr}: \mathrm{GR}(8,m) \to \mathbb{Z}_8$, $\mathrm{tr}: \mathbb{F}_{2^m} \to \mathbb{Z}_2$ and $\mathrm{Tr}(f_i(x)) = \mathrm{tr}(\overline{f_i(x)})$ for $f_i(x) \in \mathrm{T}$.

*Proof.* According to the definition of $\mathcal{H}_f (r, u)$,

$$
\begin{align*}
\mathcal{H}_f (r, u) &= \sum_{x \in \mathbb{F}_2^n} (-1)^{u \cdot x} \zeta_8^{\mathrm{Tr}(rf(x))} \\
&= \sum_{x \in \mathbb{F}_2^n} (-1)^{u \cdot x} \zeta_8^{\mathrm{Tr}(\sum_{i=0}^2 f_i(x) 2^{2-i})}.
\end{align*}
$$
Then by Lemma 3, we have

$$
\begin{align*}
\mathcal{H}_f(r, u) &= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} \sum_{x \in \mathbb{F}_2^n} (-1)^{\sum_{i=1}^2 \text{tr}(\bar{a}_i)\text{tr}(\bar{f}_i(x)) + \text{tr}(\bar{f}_0(x)) + u \cdot x} \gamma_a \\
&= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} \mathcal{H}_2 \left( \sum_{i=1}^2 \text{tr}(\bar{a}_i)\text{tr}(\bar{f}_i) + \text{tr}(\bar{f}_0) \right) (1, u) \gamma_a \\
&= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} \mathcal{H}_B (1, u) \gamma_a.
\end{align*}
$$

□

Now we can give a sufficient and necessary condition for a generalized Boolean function $f$ to be generalized bent.

**Theorem 2.** Let $p = 2$, $m$ be a positive integer, $k = 3$ and $rf(x) = \sum_{i=0}^{2} f_i(x)2^{2-i}$. Then $f$ is a generalized bent if and only if

(1) if $n$ is even, for any $u \in \mathbb{F}_2^n$ and $r \in \text{GR}(8, m)$, there exist some $v = (v_1, v_2) \in \text{GR}(4, m)$ and some $c_0 \in \mathbb{Z}_2$ such that

$$
\mathcal{H}_B (1, u) = 2^{\frac{n}{2}} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i)\text{tr}(\bar{v}_i) + c_0}
$$

for all $a \in \text{GR}(4, m)$.

(2) if $n$ is odd, then for any $u \in \mathbb{F}_2^n$ and $r \in \text{GR}(8, m)$, there exist some $v = (v_1, v_2) \in \text{GR}(4, m)$ and some $c_0 \in \mathbb{Z}_2$ such that

$$
\mathcal{H}_B (1, u) = 2^{\frac{n+1}{2}} \frac{1 + (-1)^{\text{tr}(\bar{a}_1) + \text{tr}(\bar{v}_1)}}{2} (-1)^{\text{tr}(\bar{a}_2) + \text{tr}(\bar{v}_2) + c_0}
$$

for all $a \in \text{GR}(4, m)$.

*Proof.* If $f$ is generalized bent, then for any $u \in \mathbb{F}_2^n$, $|\mathcal{H}_f(r, u)| = 2^{n/2}$. From Lemma 1, we have $\mathcal{H}_f(r, u) = 2^{n/2} \zeta_8^{\text{Tr}(e)}$ or $\mathcal{H}_f(r, u) = -2^{n/2} \zeta_8^{\text{Tr}(e)}$, where $e = \sum_{i=1}^2 v_i 2^{2-i}$, $v_i \in \mathbb{T}$.

(1) When $n$ is even, suppose $\mathcal{H}_f(r, u) = 2^{n/2} \zeta_8^{\text{Tr}(e)}$ and $e = \sum_{i=1}^2 v_i 2^{2-i}$. According to
Theorem 1 and Lemma 3, we have

$$
\begin{align*}
\mathcal{H}_f (r, u) &= 2^{\frac{n}{2}} \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} \mathcal{H}_B (1, u) \gamma_a \\
&= 2^{\frac{n}{2}} \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{u}_i)} \gamma_a.
\end{align*}
$$

Then we have

$$
\mathcal{H}_B(1, u) = 2^{\frac{n}{2}} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{v}_i)}
$$

for all $a \in \text{GR}(4, m)$, where $v$ just depends on $rf$ and $u$. Suppose $\mathcal{H}_f(r, u) = -2^{\frac{n}{2}} \zeta_8^{\text{Tr}(e)}$ and $e = \sum_{i=1}^2 v_i 2^{2-i}$. Then

$$
\mathcal{H}_B (1, u) = 2^{\frac{n}{2}} (-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{v}_i) + 1}
$$

for all $a \in \text{GR}(4, m)$.

(2) When $n$ is odd, suppose $\mathcal{H}_f(r, u) = 2^{\frac{n}{2}} \zeta_8^{\text{Tr}(e)}$. We know that

$$
\sqrt{2}\zeta_8^{\text{Tr}(e)} = (\zeta_8 + \zeta_8^{-1})\zeta_8^{\text{Tr}(e)} = \zeta_8^{\text{Tr}(e)-1} + \zeta_8^{(\text{Tr}(e)-1)+2}.
$$

If $\mathcal{H}_f (r, u) = 2^{\frac{n}{2}} \zeta_{2k}^{\text{Tr}(e)-1}$ and $\text{Tr}(e) - 1 = \sum_{i=1}^{2} v_i 2^{2-i}$, then according to Lemma 4, we have

$$
\begin{align*}
\sqrt{2}\mathcal{H}_f (r, u) &= \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m)} (\sqrt{2}\mathcal{H}_B (1, u))\gamma_a \\
&= 2^{\frac{n}{2}} \frac{1}{2^{2(2m-1)}} \sum_{a \in \text{GR}(4,m), \text{tr}(\bar{a}_1) = \text{tr}(\bar{u}_1)} 2(-1)^{\sum_{i=1}^{2} \text{tr}(\bar{a}_i) \text{tr}(\bar{u}_i)} \gamma_a.
\end{align*}
$$

Hence, we obtain

$$
\mathcal{H}_B (1, u) = \begin{cases} 2^{\frac{n}{2}} (\sqrt{2} (-1)^{\text{tr}(\bar{a}_2) \text{tr}(\bar{v}_2)}), & \text{tr}(\bar{a}_1) = \text{tr}(\bar{v}_1) \\ 0, & \text{tr}(\bar{a}_1) \neq \text{tr}(\bar{v}_1). \end{cases}
$$
Then

$$ \mathcal{H}_B (1, u) = \begin{cases} 2^{\frac{n}{2}} (\sqrt{2}(-1)^{\mathrm{tr}(\overline{a_2})\mathrm{tr}(\overline{v_2})+\mathrm{tr}(\overline{v_1})}), & \mathrm{tr}(\overline{a_1}) = \mathrm{tr}(\overline{v_1}) \\ 0, & \mathrm{tr}(\overline{a_1}) \neq \mathrm{tr}(\overline{v_1}). \end{cases} $$

Suppose $\mathcal{H}_f (r, u) = 2^{\frac{n}{2}} \zeta_8^{\mathrm{Tr}(e)-1}$ and $\mathrm{Tr}(e) - 1 = \sum_{i=1}^2 v_i 2^{2-i}$, it can be verified that

$$ \mathcal{H}_B (1, u) = \begin{cases} 2^{\frac{n}{2}} (\sqrt{2}(-1)^{\mathrm{tr}(\overline{a_2})\mathrm{tr}(\overline{v_2})+\mathrm{tr}(\overline{v_1})+1}), & \mathrm{tr}(\overline{a_1}) = \mathrm{tr}(\overline{v_1}) \\ 0, & \mathrm{tr}(\overline{a_1}) \neq \mathrm{tr}(\overline{v_1}). \end{cases} $$

If the condition (1) or (2) in this theorem holds, then from the definition of generalized bent functions and Theorem 1, we can show that $f$ is generalized bent. □

The above theorem gives a sufficient and necessary condition for $f$ to be a generalized bent function for $p = 2$. Next, we establish a similar necessary and sufficient condition in the case of $p \ge 3$.

**Theorem 3.** Let $p$ be an odd prime, $k = 3$, and $m$ be any positive integer. Let $rf(x) = \sum_{i=0}^2 f_i(x) p^{2-i}$, where $f: \mathbb{F}_p^n \to \mathrm{GR}(p^3, m)$, $f_i: \mathbb{F}_p^n \to \mathrm{T}$ and $r \in \mathrm{GR}(p^3, m)$. Then for $c = (c_1, c_2) \in \mathrm{GR}(p^2, m)$, set $C(x) = \sum_{i=1}^2 \mathrm{tr}(\overline{c_i}) \mathrm{tr}(\overline{f_i(x)}) + \mathrm{tr}(\overline{f_0(x)})$. Then $f$ is generalized bent if and only if, for every $r \in \mathrm{GR}(p^3, m)$ and any $c \in \mathrm{GR}(p^2, m)$, there exist $\lambda_u \in \{-1, 1\}$, $\delta_u \in \mathrm{T}$, $a_u = (a_{u_1}, a_{u_2}) \in \mathrm{GR}(p^2, m)$, $\mathrm{Tr}: \mathbb{F}_{p^m} \to \mathbb{Z}_p$, $\mathrm{Tr}: \mathrm{GR}(p^2, m) \to \mathbb{Z}_{p^2}$ and $\mathrm{Tr}(f_i(x)) = \mathrm{tr}(\overline{f_i(x)})$ for all $f_i(x) \in \mathrm{T}$ such that

$$ \mathcal{H}_C (r, u) = \lambda_u \zeta_p \frac{\mathrm{tr}(\overline{\delta_u}) + \sum_{i=1}^2 \mathrm{tr}(\overline{a_{u_i}}) \mathrm{tr}(\overline{c_i})}{\sqrt{p^*}^n}. $$

*Proof.* According to the definition of $\mathcal{H}_f (r, u)$, we can obtain

$$ \begin{aligned} \mathcal{H}_f (r, u) &= \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x} \zeta_{p^3}^{\mathrm{Tr}(rf(x))} \\ &= \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x} \zeta_{p^3}^{\mathrm{Tr}(\sum_{i=0}^2 f_i(x) p^{2-i})} \\ &= \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} \zeta_{p^3}^{\mathrm{Tr}(\sum_{i=1}^2 f_i(x) p^{2-i})} \end{aligned} $$
Then we have

$$ \mathcal{H}_f(r, u) = \frac{1}{p^{2(m-1)}} \sum_{a \in \text{GR}(p^2, m)} \left( \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} \right) \zeta_{p^3}^{i=1} \sum_{i=1}^{2} \text{tr}(\overline{a_i}) p^{2-i} . \quad (2) $$

where $a = (a_1, a_2) \in \text{GR}(p^2, m)$, $P_a = \{x \in \mathbb{F}_p^n | 1 \le i \le 2 \text{ and } \text{tr}(\overline{f_i(x)}) = \text{tr}(\overline{a_i})\}$.

Suppose $f: \mathbb{F}_p^n \to \text{GR}(p^3, m)$ is generalized bent. According to Lemma 2, for any $u \in \mathbb{F}_p^n$, we have

$$ \mathcal{H}_f(r, u) = \lambda_u \zeta_p^{\text{tr}(\delta_u)} \sqrt{p^{*n}} \zeta_{p^3}^{\text{Tr}(\rho_u)}, $$

for some $\lambda_u \in \{-1, 1\}$, $\text{tr}(\delta_u) \in \mathbb{Z}_p$ and $\text{Tr}(\rho_u) \in \mathbb{Z}_{p^2}$. Thus,

$$ \frac{1}{p^{2(m-1)}} \sum_{a \in \text{GR}(p^2, m)} \left( \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} \right) \zeta_{p^3}^{i=1} \sum_{i=1}^{2} \text{tr}(\overline{a_i}) p^{2-i} = \lambda_u \zeta_p^{\text{tr}(\delta_u)} \sqrt{p^{*n}} \zeta_{p^3}^{\text{Tr}(\rho_u)}. $$

Then we know that

$$ \frac{1}{p^{2(m-1)}} \sum_{a \in \text{GR}(p^2, m)} \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} = \left\{ \begin{array}{ll} \lambda_u \zeta_p^{\text{tr}(\delta_u)} \sqrt{p^{*n}}, & \sum_{i=1}^{k-1} \text{tr}(\overline{a_i}) p^{2-i} = \sum_{i=1}^{2} \text{tr}(\overline{\rho_{u_i}}) p^{2-i} \\ 0, & \sum_{i=1}^{k-1} \text{tr}(\overline{a_i}) p^{2-i} \neq \sum_{i=1}^{2} \text{tr}(\overline{\rho_{u_i}}) p^{2-i}. \end{array} \right. $$

Then we obtain

$$ \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} = \left\{ \begin{array}{ll} \lambda_u \zeta_p^{\text{tr}(\delta_u)} \sqrt{p^{*n}}, & \sum_{i=1}^{2} \text{tr}(\overline{a_i}) p^{2-i} = \sum_{i=1}^{2} \text{tr}(\overline{\rho_{u_i}}) p^{2-i} \\ 0, & \sum_{i=1}^{2} \text{tr}(\overline{a_i}) p^{2-i} \neq \sum_{i=1}^{2} \text{tr}(\overline{\rho_{u_i}}) p^{2-i}. \end{array} \right. \quad (3) $$

On the other hand,

$$ \mathcal{H}_C(r, u) = \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x + C(x)} \\ = \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} \zeta_p^{i=1} \sum_{i=1}^{2} \text{tr}(\overline{c_i}) \text{tr}(\overline{f_i(x)}) $$
Then we have

$$ \mathcal{H}_C (r, u) = \frac{1}{p^{2(m-1)}} \sum_{a \in \text{GR}(p^2, m)} \left( \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} \right) \zeta_p^{\sum_{i=1}^2 \text{tr}(\overline{a_i}) \text{tr}(\overline{c_i})} . \quad (4) $$

Therefore, if $a_u \in \text{GR}(p^2, m)$ such that $\sum_{i=1}^2 \text{tr}(\overline{a_{u_i}})p^{2-i} = \text{Tr}(\rho_u)$, we have

$$ \mathcal{H}_C (r, u) = \lambda_u \zeta_p^{\text{tr}(\overline{\delta_u}) + \sum_{i=1}^2 \text{tr}(\overline{a_{u_i}}) \text{tr}(\overline{c_i})} \sqrt{p^*}^n . $$

Since $u$ is arbitrary, $C(x)$ is bent.

Conversely, suppose for any $c \in \text{GR}(p^2, m)$,

$$ \mathcal{H}_C (r, u) = \lambda_u \zeta_p^{\text{tr}(\overline{\delta_u}) + \sum_{i=1}^2 \text{tr}(\overline{a_{u_i}}) \text{tr}(\overline{c_i})} \sqrt{p^*}^n, $$

for some $\delta_u \in \text{T}$, $a_u = (a_{u_1}, a_{u_2}) \in \text{GR}(p^2, m)$. Then we can obtain

$$ \begin{aligned} \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} &= \frac{1}{p^{2m}} \lambda_u \zeta_p^{\text{tr}(\overline{\delta_u})} \sqrt{p^*}^n \sum_{c \in \text{GR}(p^2, m)} \zeta_p^{\sum_{i=1}^2 (\text{tr}(\overline{a_{u_i}}) - \text{tr}(\overline{c_i})) \text{tr}(\overline{c_i})} \\ &= \begin{cases} \lambda_u \zeta_p^{\text{tr}(\overline{\delta_u})} \sqrt{p^*}^n, & \text{Tr}(a_u) = \text{Tr}(a) \\ 0, & \text{Tr}(a_u) \neq \text{Tr}(a), \end{cases} \end{aligned} \quad (5) $$

for any $a \in \text{GR}(p^2, m)$. Using equations (2) and (5), we obtain

$$ \begin{aligned} \mathcal{H}_f (r, u) &= \frac{1}{p^{2(m-1)}} \sum_{a \in \text{GR}(p^2, m)} \left( \sum_{x \in P_a} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} \right) \zeta_{p^3}^{\sum_{i=1}^2 \text{tr}(\overline{a_i}) p^{2-i}} \\ &= \lambda_u \zeta_p^{\text{tr}(\overline{\delta_u})} \zeta_{p^3}^{\text{Tr}(\rho_u)} \sqrt{p^*}^n \\ &= \lambda_u \zeta_{p^3}^{\text{Tr}(\rho_u) + p^2 \text{tr}(\overline{\delta_u})} \sqrt{p^*}^n. \end{aligned} $$

The theorem is proved. □

**Corollary 1.** Let $p$ be an odd prime and $n$ be a positive integer, or $p = 2$ and $n$ be an even integer. Let $f : \mathbb{F}_p^n \to \text{GR}(p^3, m)$ be a generalized bent function and for every $r \in \text{GR}(p^3, m)$ let the function $rf(x)$ have the decomposition $rf(x) = \sum_{i=0}^2 f_i(x) p^{2-i}$.
Then, for any $u \in \mathbb{F}_p^n$, $r \in \mathrm{GR}(p^3, m)$ and $a = (a_1, a_2) \in \mathrm{GR}(p^2, m)$, there exists a $\tilde{a}_u \in \mathrm{GR}(p^2, m)$ satisfying $\mathrm{Tr}(a) = \mathrm{Tr}(\tilde{a}_u)$ such that

$$ \sum_{x \in P_{\tilde{a}_u}} \zeta_p^{\mathrm{tr}(\overline{f_0(x)})+u \cdot x} = \lambda_u \zeta_p^{\mathrm{tr}(\overline{\delta_u})} \sqrt{p^*}^n $$

with $\lambda_u \in \{1, -1\}$, $\delta_u \in \mathbb{T}$, $\mathrm{tr}(\overline{\delta_u}) \in \mathbb{F}_p$. And if $\mathrm{Tr}(a) \neq \mathrm{Tr}(\tilde{a}_u)$,

$$ \sum_{x \in P_a} \zeta_p^{\mathrm{tr}(\overline{f_0(x)})+u \cdot x} = 0, $$

where $P_a = \{x \in \mathbb{F}_p^n | 1 \le i \le k-1, \mathrm{tr}(\overline{f_i(x)}) = \mathrm{tr}(\overline{a_i})\}$.

*Proof.* From Equation 3 in the proof of Theorem 3, the corollary follows. □

# 4 Characterization of generalized bent functions by affine spaces from partitions

In this section, we introduce partitions of $\mathbb{F}_p^n$ and affine spaces associated with generalized functions, study their properties and give the relation between partitions, affine spaces and generalized bent functions.

Let $p$ be a prime, $f : \mathbb{F}_p^n \to \mathrm{GR}(p^k, m)$ be a generalized bent function and for every $r \in \mathrm{GR}(p^k, m)$, let the function $rf(x)$ have the $p$-adic decomposition $rf(x) = \sum_{i=0}^{k-1} f_i(x) p^{k-1-i}$. Then, for $a = (a_1, a_2, \dots, a_{k-1}) \in \mathrm{GR}(p^{k-1}, m)$, set

$$ P_a = \bigcap_{i=1}^{k-1} f_i^{-1}(a_i) $$

and

$$ \Omega_f = \{P_a : a \in \mathrm{GR}(p^{k-1}, m)\}, $$

where $f_i^{-1}(a_i) = \{x \in \mathbb{F}_p^n | \mathrm{tr}(\overline{f_i(x)}) = \mathrm{tr}(\overline{a_i})\}$ and $1 \le i \le k-1$. Then, $\Omega_f$ is a partition of $\mathbb{F}_p^n$. For any partition $\Omega_f$ of $\mathbb{F}_p^n$, we denote $\mathcal{M}(\Omega_f)$ to be the set of all functions from $\mathbb{F}_p^n$ to $\mathbb{F}_p$, which are locally constant on each element of $\Omega_f$.

Let $1_p$ be the indicator function of a subset $P$ of $\mathbb{F}_{p^n}$:

$$ 1_P(x) = \begin{cases} 1, & \text{if } x \in P, \\ 0, & \text{if } x \notin P, \end{cases} $$
where $x \in \mathbb{F}_p^n$. Assume a partition $\Omega = \{P_1, ..., P_t\}$, then we have

$$ \mathcal{M}(\Omega) = \{ \sum_{i=1}^{t} c_i 1_{P_i} : (c_1, c_2, \dots, c_t) \in \mathrm{GR}(p^t, m) \}. $$

If $\Omega = \Omega_f$, from the definition of $\mathcal{M}(\Omega)$, then we have

$$ \begin{aligned} \mathcal{M}(\Omega_f) &= \{ \sum_{a \in \mathrm{GR}(p^{k-1}, m)} \mathrm{tr}(\overline{c_a}) 1_{P_a} : c_a \in \mathrm{T}, \forall a \in \mathrm{GR}(p^{k-1}, m) \} \\ &= \{ F(\mathrm{tr}(\overline{f_1}), \dots, \mathrm{tr}(\overline{f_{k-1}})) : F \text{ is any function from } \mathrm{GR}(p^{k-1}, m) \text{ to } \mathbb{F}_p \}. \end{aligned} $$

We introduce the following affine space $\mathcal{AS}_f$ associated with $f$

$$ \begin{aligned} \mathcal{AS}_f &= \mathrm{tr}(\overline{f_0}) + \mathcal{M}(\Omega_f) \\ &= \{ \mathrm{tr}(\overline{f_0}) + F(\mathrm{tr}(\overline{f_1}), \dots, \mathrm{tr}(\overline{f_{k-1}})) : F \text{ is any function from } \mathrm{GR}(p^{k-1}, m) \text{ to } \mathbb{F}_p \}. \end{aligned} \quad (6) $$

Now, let us give a result similar to Corollary 1 about the function $f_0$, where all functions in $\mathcal{AS}_f$ are bent functions. First, we need to state a pair of lemmas. The first is classical but technical. Its proof is omitted.

**Lemma 5.** [9, Lemma 14] Let $p$ be a prime. If $p$ is an odd prime, then $k$ is a positive integer or if $p = 2$, then $k \ge 2$. Let $S_1, ..., S_t$ be $t$ complex numbers. Assume that $|\sum_{i=1}^t \zeta_{p^k}^{\mathrm{tr}(c_i)} S_i|^2 = p^n$ for every $(c_1, ..., c_t) \in \mathrm{GR}(p^k, m)^t$. Then $S_i = 0$ except some $\tilde{i} \in \{1, ..., t\}$.

The second lemma connects generalized bent functions with partitions as defined above.

**Lemma 6.** Let $p$ be an odd prime and $n$ a positive integer, or $p = 2$ and $n$ an even integer. Let $f: \mathbb{F}_p^n \to \mathrm{GR}(p^3, m)$ and $\mathcal{AS}_f$ be the affine space defined in (6). If every function in $\mathcal{AS}_f$ is bent, then for any $u \in \mathbb{F}_p^n$ and $r \in \mathrm{GR}(p^3, m)$ there exists some $\tilde{P} \in \Omega$, $\lambda_u \in \{1, -1\}$ and $\mathrm{tr}(\overline{\eta_u}) \in \mathbb{F}_p$ such that

$$ \sum_{x \in \tilde{P}} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} = \lambda_u \zeta_p^{\mathrm{tr}(\overline{\eta_u})} \sqrt{p^*}^n $$
and for any $P \in \Omega \setminus \tilde{P}$, we have

$$ \sum_{x \in P} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} = 0. $$

**Proof.** Let $\Omega = \{P_1, \dots, P_t\}$. Then for any $u \in \mathbb{F}_p^n$ and $(c_1, \dots, c_t) \in \text{GR}(p^t, m)$, we get

$$ \begin{aligned} \mathcal{H}_{\sum_{i=1}^t \text{tr}(\overline{c_i}) 1_{P_i} + \text{tr}(\overline{f_0})} (r, u) &= \sum_{x \in \mathbb{F}_p^n} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)}) + \sum_{i=1}^t \text{tr}(\overline{c_i}) 1_{P_i}(x)} \\ &= \sum_{i=1}^t \zeta_p^{\text{tr}(\overline{c_i})} \sum_{x \in P_i} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})}. \end{aligned} $$

Since $\text{tr}(\overline{f_0}) + \sum_{i=1}^t \text{tr}(\overline{c_i}) 1_{P_i} \in \mathcal{AS}_f$ and every function in $\mathcal{AS}_f$ is bent, then according to Lemma 5, there exists some $\tilde{i} \in \{1, \dots, t\}$ such that

$$ \sum_{x \in P_i} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} = 0 $$

for $i \neq \tilde{i}$. Moreover, according to Equation 4, there exist $\lambda_u \in \{1, -1\}$ and $\text{tr}(\overline{\eta_u}) \in \mathbb{F}_p$ such that

$$ \mathcal{H}_{\sum_{i=1}^t \text{tr}(\overline{c_i}) 1_{P_i} + \text{tr}(\overline{f_0})} (r, u) = \zeta_p^{\text{tr}(\overline{c_i})} \sum_{x \in P_i} \zeta_p^{u \cdot x + \text{tr}(\overline{f_0(x)})} = \lambda_u \zeta_p^{\text{tr}(\overline{\eta_u})} \sqrt{p^{*n}}. $$

□

Through the above content, we can know the relation between a generalized bent function and an affine space $\mathcal{AS}_f$.

**Theorem 4.** Let $p$ be an odd prime and $n$ a positive integer, or $p=2$ and $n$ an even integer. Let $rf(x) = \sum_{i=0}^2 f_i(x) p^{2-i}$, where $f: \mathbb{F}_p^n \to \text{GR}(p^3, m)$, $f_i: \mathbb{F}_p^n \to \text{T}$ and $r \in \text{GR}(p^3, m)$. Then $f$ is generalized bent if and only if all functions in $\mathcal{AS}_f$ are bent, where $\mathcal{AS}_f$ is defined by (6).

**Proof.** Suppose that $f$ is a generalized bent function. According to Corollary 1,
for every $u \in \mathbb{F}_p^n$, there exist $a_u^*$, $\lambda_u \in \{1, -1\}$, $\delta_u \in \mathbb{T}$ and $\mathrm{tr}(\delta_u) \in \mathbb{F}_p$ such that

$$ \sum_{x \in P_{a_u^*}} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} = \lambda_u \zeta_p^{\mathrm{tr}(\delta_u)} \sqrt{p^{*n}}, $$

and

$$ \sum_{x \in P_a} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} = 0, $$

for any $\mathrm{Tr}(a) \neq \mathrm{Tr}(a_u^*)$, where $a_u^* := (a_{u_1}^*, ..., a_{u_2}^*) \in \mathrm{GR}(p^2, m)$ and $P_a = \bigcap_{i=1}^2 f_i^{-1}(a_i)$. Any function $g$ can be expressed as $g = \mathrm{tr}(\overline{f_0}) + F(\mathrm{tr}(\overline{f_1}), \mathrm{tr}(\overline{f_2}))$ for any $g \in \mathcal{AS}_f$, where $F \in \mathbb{F}_p[X_1, X_2]$. Then we have

$$ \begin{aligned} \mathcal{H}_g(r, u) &= \mathcal{H}_{\mathrm{tr}(\overline{f_0})+F(\mathrm{tr}(\overline{f_1}),\mathrm{tr}(\overline{f_2}))}(r, u) \\ &= \sum_{x \in F_p^n} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})+F(\mathrm{tr}(\overline{f_1(x)}),\mathrm{tr}(\overline{f_2(x)}))} \\ &= \frac{1}{p^{2(m-1)}} \sum_{a \in \mathrm{GR}(p^2,m)} \zeta_p^{F(\mathrm{tr}(\overline{a_1}),\mathrm{tr}(\overline{a_2}))} \sum_{x \in P_a} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} \\ &= \lambda_u \zeta_p^{\mathrm{tr}(\overline{\delta_u})+F(\mathrm{tr}(\overline{a_1}),\mathrm{tr}(\overline{a_2}))} \sqrt{p^{*n}}, \end{aligned} $$

therefore, the function $g = \mathrm{tr}(\overline{f_0}) + F(\mathrm{tr}(\overline{f_1}), \mathrm{tr}(\overline{f_2}))$ is bent.

Conversely, suppose that every function in $\mathcal{AS}_f$ is bent. We get

$$ \mathcal{H}_f(r, u) = \frac{1}{p^{2(m-1)}} \sum_{a \in \mathrm{GR}(p^2, m)} \left( \sum_{x \in P_a} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} \right) \sum_{i=1}^{2} \zeta_{p^3}^{\mathrm{tr}(\overline{a_i}) p^{2-i}}. $$

Then according to Lemma 6, for any $u \in \mathbb{F}_p^n$ and $r \in \mathrm{GR}(p^3, m)$, there exist $a_u^* := (a_{u_1}^*, a_{u_2}^*) \in \mathrm{GR}(p^2, m)$, $\lambda_u \in \{1, -1\}$, $\delta_u \in \mathbb{T}$ and $\mathrm{tr}(\delta_u) \in \mathbb{F}_p$ such that

$$ \sum_{x \in P_{a_u^*}} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} = \lambda_u \zeta_p^{\mathrm{tr}(\delta_u)} \sqrt{p^{*n}} $$

and

$$ \sum_{x \in P_a} \zeta_p^{u \cdot x + \mathrm{tr}(\overline{f_0(x)})} = 0 $$
for any $Tr(a) \neq Tr(a_u^*)$. Therefore,

$$ 
\begin{aligned}
\mathcal{H}_f(r, u) &= \sum_{x \in P_{a_u^*}} \zeta_p^{u \cdot x + \text{tr}(f_0(x))} \zeta_{p^k}^{i=1} \sum_{i=1}^{2} \text{tr}(\overline{a_{u_i}^*}) p^{2^{-i}} \\
&= \lambda_u \zeta_{p^3}^{i=1} \sum_{i=1}^{2} \text{tr}(\overline{a_{u_i}^*}) p^{2^{-i}} + p^2 \text{tr}(\overline{\delta_u}) \\
&= \lambda_u \zeta_{p^3}^{i=1} \sqrt{p^{*n}},
\end{aligned}
$$

so $f$ is a generalized bent function. $\square$

<figure><img src="image_1.png" /></figure>

# 5 Conclusion

This paper generalizes some results on bent functions and their complete characterizations [9, 14], from functions with range a finite field to functions with range a Galois ring. We investigate the relation between generalized bent functions and their classical components in a p-adic decomposition. The comprehensive description of generalized bent functions is entirely derived from the decomposition of generalized bent functions into their classical component functions. It is further proved that generalized bent functions, and some affine spaces of bent functions are the same object. As a further research direction, it would be worthwhile to explore generalizations of some notable results on Boolean functions in this setting—for example, the characterization of affine sets of Boolean functions as in [4].

# Declarations

**Data availability** No data were generated or analyzed during this study.

**Conflict of Interest** The authors declare no conflict of interest.

# References

[1] D. Agrawal, S. Krishnaswamy, S. Das, On Boolean functions derived from linear maps over $\mathbb{Z}_4$ and their application to secret sharing. Designs, Codes and Cryptography, https://doi.org/10.1007/s10623-024-01478-8 (2024).

[2] C. Carlet, Boolean functions for cryptography and error correcting codes. Cambridge University Press, Cambridge, (2021).
[3] C. Carlet, More correlation-immune and resilient functions over Galois fields and Galois rings. in *International Conference on the Theory and Applications of Cryptographic Techniques* 1997 May 11 (pp. 422-433), Springer, Berlin, Heidelberg.

[4] Carlet, C. A transformation on boolean functions, its consequences on some problems related to Reed-Muller codes, Eurocode 90, Lecture Notes in Computer Science, vol. 514, pp. 42-50 (1991).

[5] A. R. Hammons, Jr., P. V. Kumar, A. R. Calderbank, N. J. A. Sloane, Patrick Solé, The Z4-linearity of Kerdock, Preparata, Goethals, and related codes. IEEE Transactions on Information Theory 40(2): 301-319 (1994).

[6] Z. Jadda, P. Parraud, S. Qarboua, Quaternary cryptographic bent functions and their binary projection. Cryptography and Communications 5(1): 49-65 (2013).

[7] P. V. Kumar, R. A. Scholtz, and L. R. Welch, Generalized bent functions and their properties. Journal of Combinatorial Theory, Series A 40(1): 90-107 (1985).

[8] B.R. McDonald, *Finite rings with identity*. Marcel Dekker Inc, New York. (1974).

[9] S. Mesnager, C. Tang, Y. Qi, L. Wang, B. Wu, K. Feng, Further results on generalized bent functions and their complete characterization. IEEE Transactions on Information Theory 64(7): 5441-5452 (2018).

[10] K. Nyberg, Constructions of bent functions and difference sets. Workshop on the Theory and Application of Cryptographic Techniques on Advances in Cryptology, Denmark, May 21-24, 1990 Proceedings 9 1991 (pp. 151-160). Springer Berlin Heidelberg.

[11] O. S. Rothaus, On "bent" functions. Journal of Combinatorial Theory. Series A 20(3): 300-305 (1976).

[12] K.-U. Schmidt, Quaternary constant-amplitude codes for multicode CDMA. IEEE Transactions on Information Theory 55(4): 1824-1832 (2009).

[13] P. Solé, A.S. Shaporenko, N.N. Tokareva, Connections between Quaternary and Binary Bent Functions. Siberian Electronic Mathematical Reports 18(1): 561-578 (2021).
[14] C. Tang, C. Xiang, Y. Qi, K. Feng, Complete characterization of generalized bent and $2^k$ bent Boolean functions. IEEE Transactions on Information Theory 63 (7): 4668–4674 (2017).

[15] L. Washington, *Introduction to Cyclotomic Fields*. Springer, Berlin, (1997).

[16] H. Wu, T. Huang, P. H. Nguyen, H. Wang, and S. Ling: Differential attacks against stream cipher ZUC. *International Conference on the Theory and Application of Cryptology and Information Security*. Springer, Berlin, Heidelberg, https://doi.org/10.1007/978-3-642-34961-4_17 (2012).