arXiv:2610.39922cs.DSOct 2026

Manuscript Offprint

arXiv:2610.39922

Communication-Oblivious Permutation and Sorting

Qi Dong, Yilei Wang, Ke Yi

Abstract

With the help of secure hardware such as trusted execution environments (TEEs), private data can be uploaded and computed in untrusted cloud clusters, so that an adversary controlling the cloud can only see the data in encrypted form. However, the communication pattern between the processors may still reveal sensitive information about the data, so it is important to develop parallel algorithms in the BSP model whose communication pattern is independent of the input data, a property known as communication obliviousness. In this paper, we study such algorithms for three fundamental problems: permutation, sorting, and 0-1 sorting. For the first two problems, we prove a tight (up to lower-order terms) communication complexity of (2−2/p)n±o(n)(2 - 2/p)n \pm o(n). Here, pp is the number of processors and nn is the input size, assuming 2≤p2 \leq p and p=o(n1/3)p = o(n^{1/3}). Our lower bound holds regardless of the number of rounds and local memory size, while for balanced permutation and sorting the upper bound is achieved in a constant number of rounds with load at most n/p+o(n/p)n/p + o(n/p). For 0-1 sorting, we also derive a tight communication complexity of Ccut(p)⋅n±o(n)C_{\text{cut}}(p) \cdot n \pm o(n), where Ccut(p)C_{\text{cut}}(p) is the optimal value of a linear program parameterized by pp. Although there appears to be no closed-form for Ccut(p)C_{\text{cut}}(p), we show that it is strictly smaller than 2−2/p2 - 2/p for all p≥3p \geq 3, thus separating 0-1 sorting from general sorting in terms of their communication complexity.

1 Introduction

Large-scale analytics increasingly relies on cloud clusters because the underlying datasets and computations exceed the capacity of a single machine. A standard model for computation using a cluster is the Bulk Synchronous Processing (BSP) model [23], also known as the Massively Parallel Computation (MPC) model [5, 7]. In this model, which will be defined more precisely in Section 2, there are pp processors, each holding n/pn/p data initially and (ideally) also in the end. Computation proceeds in synchronous rounds, where each round consists of a local computation stage and a communication stage. Good BSP algorithms should have a small number of rounds, low total communication cost, and low memory requirement for each processor. For example, the classical sample sort algorithm runs in 3 rounds, has a communication cost of n+o(n)n+o(n), and requires n/p+o(n/p)n/p+o(n/p) local memory per processor, assuming the parameter range 2≤p≤o~(n)12 \leq p \leq \tilde{o}(\sqrt{n})^{1} [21]. Note that both its communication cost and local memory requirement are clearly optimal up to lower-order terms.

Datasets uploaded to a cloud often contain sensitive medical, financial, behavioral, or organizational information. While the data can be encrypted during communication and local computation, the adversary can still infer sensitive information from the communication pattern, which is known

∗^{*}Corresponding author.

1^{1}The ~notation hides logarithmic factors.

as side-channel attacks [26, 19]. Most cloud-based secure distributed computation systems suffer from such attacks as they are based on Trusted Execution Environments (TEEs), which prevent the untrusted cloud from seeing the data in plaintext but still reveal communication patterns. Thus, it is important to design algorithms whose communication pattern is independent of the input data, a property known as communication obliviousness. The sample sort algorithm, however, is not communication-oblivious (henceforth simply called oblivious): The communication pattern reveals which processors originally had the smallest n/p items, the second smallest n/p items, etc. A trivial oblivious algorithm sends all data to one processor, sorts them locally, and distributes them back in sorted order. This algorithm incurs (2−2/p)n(2 - 2/p)n communication, (almost) twice as much as non-oblivious sort, and more critically, requires n local memory, forfeiting all parallelism. Better parallel oblivious sorting algorithms have been designed [16, 18] using n/p+o(n/p)n/p + o(n/p) local memory, but the best communication cost they can achieve is 3n.

We use load, the maximum number of words received by a processor in a round, to measure per-processor communication. To keep this communication proportional to the local data size, we seek algorithms with O(n/p)O(n/p) load and a small constant factor. For balanced permutation, sorting, and 0-1 sorting, our algorithms achieve load at most n/p+o(n/p)n/p + o(n/p) while attaining the optimal leading communication cost.