On Higher-Order Cryptography

Boaz Barak, Raphaëlle Crubillé, Ugo Dal Lago

TL;DR

Cryptographic primitives usually treat programs as static strings rather than active, executable functions. This paper lays the foundations for higher-order cryptography—where cryptographic primitives directly operate on functions as black-box inputs—by formulating a game-theoretic model of higher-order probabilistic polynomial-time computation. Using this framework, the authors prove an impossibility result for authenticating functions with linear-length inputs, while demonstrating that second-order pseudorandom functions are feasible if inputs are restricted to logarithmic length.

What Problem Does This Paper Address?

Standard cryptography treats programs like ordinary data: passive strings of bits. Two programs with identical input-output behavior can have completely different representations and thus vastly different ciphertexts or message authentication code (MAC) tags.

A natural question arises: Can we design cryptographic schemes that treat programs as pure functions (black boxes), without inspecting their code?

Extending cryptography to higher-order settings introduces a major theoretical roadblock: defining what an "efficient adversary" even means. In classic cryptography, active adversaries are modeled as second-order algorithms (oracle Turing machines). However, if the cryptographic primitive itself takes a function as input (making it second-order), an active adversary querying that scheme becomes a third-order algorithm. Prior theoretical computer science lacked a robust, composable definition of higher-order probabilistic polynomial-time (PPT) computation controlled by a cryptographic security parameter.

Methods

The authors build their computational foundation on game semantics:

  • Parametrized Games ($\mathcal{PG}$ and $\mathcal{PPG}$): They define a category of games parametrized by a security parameter $n$, where legal plays must have total length bounded by a polynomial $p(n)$. Strategies are deterministic Turing machines responding to environment queries in polynomial time.
  • Probabilistic Strategies via Oracle Games: Traditional probabilistic game models struggle with composability under polynomial-time bounds. Instead of outputting probability distributions directly, a probabilistic strategy is defined as a deterministic strategy that interacts with a bounded random-bit oracle ($O^p$).
  • Influential Variables in Decision Trees: To study the limits of deterministic second-order primitives, the authors leverage Boolean function analysis—specifically results relating decision tree depth, variance, and the influence of coordinates (O'Donnell, Saks, Schramm, and Servedio).

Datasets

Not discussed in the paper (this is a purely theoretical paper with no empirical datasets or benchmarks).

Key Insights and Ideas

  • Game semantics solves the higher-order complexity puzzle: Interactive game semantics naturally formalizes higher-order computation while bounding interaction length and message size via the security parameter, avoiding the pitfalls of prior functional complexity models.
  • Deterministic authentication of linear-input functions is impossible: If a program takes an $n$-bit string ($S[n] \to \mathbb{B}$), a polynomial-time scheme can only evaluate it on a negligible fraction of its $2^n$ possible inputs. By using decision tree analysis, the adversary can efficiently find a small set of "influential variables" that fix the output of the authenticator, finding collisions between functionally distinct programs.
  • Adversarial innocence: The collision-finding attack works in a black-box manner—the adversary detects influential variables without ever inspecting how the authenticating functional interacts with the function, echoing the game-semantic property of innocence.
  • The logarithmic-input escape hatch: If the function only takes inputs of logarithmic length ($\approx \log n$), a polynomial-time scheme has enough budget to exhaustively query every single coordinate. In this restricted regime, second-order pseudorandom functions (PRFs) can be constructed from standard first-order PRFs.

Key Results

  • Impossibility of Higher-Order MACs / Collision-Resistant Hashes: For any deterministic functional $F_n: (S[n] \to \mathbb{B}) \to S[p(n)]$ making at most $q(n)$ queries, there is a polytime probabilistic strategy that finds two functions $g_n, h_n$ such that:
  • $F_n(g_n) = F_n(h_n)$ (collision).
  • The normalized Hamming distance $H(g_n, h_n) \ge 0.1$.
  • Both functions are at distance $\ge 0.1$ from any function the adversary queried to $F_n$. Hence, secure deterministic second-order MACs and collision-resistant hash functions cannot exist when input functions take linear-length strings.

  • Feasibility of Logarithmic Second-Order PRFs: When input domains are restricted to strings of length $\lfloor \lg n \rfloor$, the authors provide an explicit compiler (fo2so) that turns any standard first-order PRF into a secure second-order PRF.

Limitations and Future Work

  • Negative results are restricted to deterministic schemes: The impossibility proof applies to deterministic authentication functionals; the feasibility of randomized higher-order MACs remains an open question.
  • Restricted positive domain: The positive PRF construction requires the input function to have a logarithmic input space, which severely limits practical expressiveness (equivalent to truth tables of polynomial size).
  • Categorical structure limits: The category of parametrized probabilistic games lacks full Cartesian closure (general replication is unavailable, only bounded replication), pointing toward a need for richer categorical formulations such as bounded linear logic coeffect calculi.

Summary updated

BibTeX
@inproceedings{barak2020higher,
  author = {Boaz Barak and Raphaëlle Crubillé and Ugo Dal Lago},
  title = {{On Higher-Order Cryptography}},
  booktitle = {ICALP},
  year = {2020},
  url = {https://openreview.net/forum?id=cb10ug_7huO},
}
Figure