Encrypted Lookup

L4 · Application Components
lookup · 2 specifications · 1 implementation · 1 benchmark
WHAT IT ISA[i] with both the table and the index secret — random access without revealing the address.
FHEDATA-ACCESSPIRCHALLENGE
SIGNATURE
kernel lookup<type T: Integer, N: u32>(
%xs: secret<tensor<N x T>>,
%i: secret<T>,
) -> %v: secret<T>
Sizes and element types are left open here. A specification fixes them; an implementation says over which of them it works.
SPECIFICATIONS2all publishedIMPLEMENTATIONS11 measured
BENCHMARKS1across 1 machine
FASTEST1.25 sN2048 on fairmath-fpga
CHALLENGES1open
DESCRIPTION

Definition

Lookup returns the element stored at a secret index of a secret table:

v=Ai,A=(A0,A1,,AN1),  0i<N,v = A_i, \qquad A = (A_0, A_1, \ldots, A_{N-1}), \; 0 \le i < N,

with both the table AA and the index ii arriving encrypted. The machine that computes vv never learns which entry was requested.

Context

A lookup table is the oldest optimization in computing — precompute the answers, then index into them — and it turns any function small enough to tabulate into a single access. Encrypting the index turns that access into private information retrieval: the query is the index, and the index is nobody's business. On plaintext hardware indexing is free; homomorphically it becomes a selection over all NN entries, because the circuit cannot branch on a value it cannot see. Over an exact-integer scheme the selection can be an exact 0/10/1 mask; over an approximate scheme it is a polynomial that must land close to a one-hot selector.

Parameters Defined by Specifications

A specification narrows the general operation into a concrete problem by pinning:

  • the scheme and correctness regime — exact element recovery, or an approximation scored by closeness;
  • the element domain and width, and the table length NN;
  • the index domain, 0i<N0 \le i < N;
  • the packing of the table and where the index rides;
  • the rotation keys the answer may use, and what is measured.

Applications

Private information retrieval, oblivious RAM, and any table-driven computation over encrypted arguments: activation tables, S-boxes, piecewise functions, and branchy small functions all become a lookup the moment their argument is encrypted. It is a building block of confidential databases and of encrypted virtual machines, where an opcode's dispatch is itself a table indexed by secret state.

MAINTAINER
FM
fairmathreviews specifications · resolves disputes
USED BY · 0 KERNELS
Kernels above this one. If this kernel is wrong, or slow, they are wrong or slow with it.Nothing depends on this kernel yet.
BUILDS ON · 0 KERNELS
Kernels this one is stated in terms of. Not a call graph — a statement of dependence between problems.Nothing. This kernel sits at the bottom of the graph.
RECENT ACTIVITYNothing yet.