One-hot vectors and truth-table products #
The algebra behind the lookup-table garbling of Heath, Kolesnikov and Ng [HKN24].
A lookup table with rows indexed by ι and outputs indexed by κ is a truth table
T : ι → κ → Bool. Multiplying its transpose by the one-hot vector of an index x selects row
x (tableMulBits_oneHot, [HKN24], Lemma 1, a fact credited there to
[HK21]).
With Free-XOR labels [KS08] the label of bit b on a wire with zero-label
G is G + bitOffset Δ b for a global offset Δ. The labelled product tableMul T X sums, for
each output u, the labels X j of the rows with T j u = true. It is additive in the labels,
and in characteristic two it commutes with offsets (tableMul_bitOffset). Consequently, if the
evaluator holds Free-XOR labels of the one-hot vector of x, the product of its labels is a
Free-XOR label of row x, whose zero-label is the product of the zero-labels
(tableMul_oneHotLabels, the display after Lemma 1 of [HKN24]). Only one row
carries the offset, so this form holds in every additive commutative group.
Main definitions #
Cslib.Crypto.Garbling.bitOffset: the multiple of the global offset selected by a bit.Cslib.Crypto.Garbling.oneHot: the one-hot vector of an index.Cslib.Crypto.Garbling.tableMulBits,Cslib.Crypto.Garbling.tableMul: transposed truth-table products on bits and on labels.
Main results #
Cslib.Crypto.Garbling.tableMulBits_oneHot: the product with a one-hot vector selects a row.Cslib.Crypto.Garbling.tableMul_bitOffset: Free-XOR linearity of the labelled product.Cslib.Crypto.Garbling.tableMul_oneHotLabels: one-hot labels give labels of the selected row.
References #
In characteristic two, bitOffset Δ is an additive map from Bool with + = xor.
The one-hot vector of x: true exactly at x.
Transposed truth-table product on labels: output u is the sum of the labels X j over the
rows j with T j u = true.
One-hot selection ([HKN24], Lemma 1): the transposed truth table times the
one-hot vector of x is row x.
Free-XOR linearity: in characteristic two, the product of a table with the offsets of a
bit vector v is the offset of the product of the table with v.
One-hot selection on labels (the display after Lemma 1 of [HKN24]). If the
evaluator holds Free-XOR labels of the one-hot vector of x with zero-labels G, then output u
of the product of its labels is the label of bit T x u with zero-label tableMul T G u.