Common block extensions for flat queries #
These are query preparation steps of [BS23], v0.6, Theorems 7.3 and 7.4 (printed pp. 258–260). For a pair, the choice uses the first block after the shorter word. For a batch, it searches for a block absent from the complete rows of all words.
Main definitions #
Cslib.Crypto.PRF.separatingWordBlock: choose a shared block of the given width.Cslib.Crypto.PRF.freshBatchWordBlock: search for a block absent from a batch of flat words.
Main results #
Cslib.Crypto.PRF.separatingWordBlock_prefix_incomparable: at positive width, appending the chosen block to two distinct aligned queries makes their words prefix-incomparable.Cslib.Crypto.PRF.computableInPolyTime_separatingWordBlock: the choice runs in polynomial time on all inputs.Cslib.Crypto.PRF.freshBatchWordBlock_eq_map_freshBatchBlock: the flat and indexed searches agree after splitting the messages into blocks.Cslib.Crypto.PRF.isPrefixFree_append_of_freshBatchWordBlock_eq_some: extending aligned words by the returned block makes a prefix-free set.Cslib.Crypto.PRF.freshBatchWordBlock_isSome_of_sum_div_lt: the search succeeds when the alphabet is larger than the total number of complete blocks.Cslib.Crypto.PRF.computableInPolyTime_freshBatchWordBlock: deterministic polynomial time with unary width and a framed list of words.
The result has the declared width on every input.
The input is a framed unary width, the framed first raw word, and the second raw word. The common block is returned as a raw word in deterministic polynomial time.
Appending a block returned by the flat search makes the batch prefix-free at positive width, provided each original word consists of complete blocks.
The word search returns the bit list of the same block as the indexed search, after splitting each input into complete blocks. For aligned inputs this splitting represents the entire word.
The flat-word search runs in deterministic polynomial time. The input is a framed unary width followed by a framed list of raw words, and the output is an option containing a raw word.