A random table over the memory oracle #
A uniformly random function Fin U → Fin (2 ^ b) is the simplest resamplable hash family: its
seed is the whole table. Here it is stored in a field array table of U cells, behind the
memory oracle with private coins, (Memory.spec w).toRandomized.withCoins. resample refills the
table with one uniform b-bit draw and one write per cell (fill), and eval u reads cell u.
The abstraction function reads the table as a function (tableOf). The implementation is a
RandomizedRefinement of the seed-level specification tableSpec U b (refinement): the only
probabilistic fact is that independent uniform draws fill a uniform table (run_fill,
tableOf_writeFrom). The generic hop then gives the law of every adaptive client, and the run
from allocation (run) has the transcript law HashFamily.evalOps on every operation list
(run_obliviousClient). This is the memory-level counterpart of
HashFamily.WordRAM.Impl.evalOps_execSteps, with no register, instruction count or ExecSteps
bookkeeping. Every operation makes at most 2 * U calls, and eval exactly one
(isCostBounded_methods, expectedAmortized, isQueryBounded_run).
Main definitions #
Cslib.DataStructure.HashFamily.RandomTable.tableSpec: the random function as a seed-level specification.Cslib.DataStructure.HashFamily.RandomTable.fill,methods: the operations over memory with coins.Cslib.DataStructure.HashFamily.RandomTable.tableOf,writeFrom: the abstraction function, and the memory after a fill.Cslib.DataStructure.HashFamily.RandomTable.refinement: the distributional refinement.Cslib.DataStructure.HashFamily.RandomTable.run: allocate, fill, then serve a client.
Main results #
Cslib.DataStructure.HashFamily.RandomTable.run_fill: a fill writes a uniform table.Cslib.DataStructure.HashFamily.RandomTable.run_eq: the law of a client run from allocation.Cslib.DataStructure.HashFamily.RandomTable.run_obliviousClient: its oblivious transcripts areevalOps.Cslib.DataStructure.HashFamily.RandomTable.kWiseSpec_contract_run: they meet thekWiseSpeccontract for everyk.Cslib.DataStructure.HashFamily.RandomTable.demonicValid_run: every memory call is admissible.Cslib.DataStructure.HashFamily.RandomTable.expectedAmortized,Cslib.DataStructure.HashFamily.RandomTable.isQueryBounded_run: call counts.
References #
The table stored in the field table: cell u read as a b-bit word.
Fill cells i, …, i + n - 1 of the table with independent uniform b-bit words, one draw and
one write per cell.
The operations: resample refills the table, and eval u reads cell u.
The memory after writing θ j to cell i + j of the table for each j < n, in order.
The memory after a fill #
A full fill stores the written table.
Evaluation #
A fill writes a uniform table.
Reading a cell answers the stored word and leaves memory unchanged.
Admissibility #
Every call of a fill within an allocated table is admissible when b-bit words fit.
The refinement #
The random table refines the random function. From an allocated table of U cells,
resample draws a uniform table and eval u answers its entry u.
Costs #
One unit per call: resample makes one draw and one write per cell, eval one read.
A fill of n cells makes 2 * n calls.
Every operation makes at most its budget of calls.
In expectation as well, every operation costs at most its budget of calls.
The run from allocation #
Allocate a table of U cells, fill it, then serve the client p.
The law of a client run from allocation: a uniform table, then the client against the
random function. The law does not depend on the word size w, which only constrains
admissibility.
The memory-level evalOps theorem. From any memory state, the transcript law of the
oblivious client of ops, run after allocating and filling the table, is
HashFamily.evalOps of the random function.
The kWiseSpec contract over memory. A uniform table is k-wise independent for every
k (Probability.isKWiseIndependentHash_id). So on every oblivious operation sequence with at
most k distinct keys per epoch, the transcript law of the run from allocation meets
HashFamily.kWiseSpec: it is the ideal transcript law.
Every memory call of the run is admissible when the table and b-bit words fit.
A client whose operations cost at most n in total, with budget U, runs from allocation
with at most 1 + 2 * U + n calls.