Paper 2023/1258 Original: eprint.iacr.org/2023/1258 ↗

Flexway O-Sort: Enclave-Friendly and Optimal Oblivious Sorting

Tianyao Gu
Yilei Wang
Afonso Tinoco
Bingnan Chen
Ke Yi
Elaine Shi
Abstract

Oblivious algorithms are being deployed at large scale in real world to enable privacy-preserving applications such as Signal's private contact discovery. Oblivious sorting is a fundamental building block in the design of oblivious algorithms for numerous computation tasks. Unfortunately, there is still a theory-practice gap for oblivious sort. The commonly implemented bitonic sorting algorithm is not asymptotically optimal, whereas known asymptotically optimal algorithms suffer from large constants. In this paper, we construct a new oblivious sorting algorithm called flexway o-sort, which is asymptotically optimal, concretely efficient, and suitable for implementation in hardware enclaves such as Intel SGX. For moderately large inputs of $12$ GB, our flexway o-sort algorithm outperforms known oblivious sorting algorithms by $1.32\times$ to $28.8\times$ when the data fits within the hardware enclave, and by $4.1\times$ to $208\times$ when the data does not fit within the hardware enclave. We also implemented various applications of oblivious sorting, including histogram, database join, and initialization of an ORAM data structure. For these applications and data sets from 8GB to 32GB, we achieve $1.44 \sim 2.3\times$ speedup over bitonic sort when the data fits within the enclave, and $4.9 \sim 5.5\times$ speedup when the data does not fit within the enclave.

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Preprint.
History
2026-07-20: last updated
2023-08-20: published
Short URL
https://ia.cr/2023/1258
License
https://creativecommons.org/licenses/by/4.0/

BibTeX

@misc{cryptoeprint:2023/1258,
      author = {Tianyao Gu and Yilei Wang and Afonso Tinoco and Bingnan Chen and Ke Yi and Elaine Shi},
      title = {Flexway O-Sort: Enclave-Friendly and Optimal Oblivious Sorting},
      howpublished = {Cryptology {ePrint} Archive, Paper 2023/1258},
      year = {2023},
      url = {https://eprint.iacr.org/2023/1258}
}
Note: In order to protect the privacy of readers, this archive does not use cookies or embedded third party content.