Fleischhacker, Hall-Andersen, and Simkin recently published a paper on constructing efficient laconic oblivious transfer using the KZG as a vector commitment scheme. Although their OT scheme is not more efficient than state-of-the-art OT schemes for exchanging single OT instances, it outperforms every state-of-the-art OT scheme in the laconic i.e. batched case.
Before diving into the concrete construction proposed by Fleischhacker et al. we first need to understand what it is that they achieved. In this part, we briefly discuss what (laconic) oblivious transfer is and recap the KZG polynomial commitment scheme.
Oblivious Transfer (OT) is a cryptographic primitive widely used in multi-party computation (MPC).
OT is a two-party interactive protocol between Alice and Bob. Essentially it allows Alice to give Bob a choice of two messages m0, m1, such that Bob can only choose to receive one of them (either
The KZG is a polynomial commitment scheme. Essentially, it allows Alice to commit to a polynomial and later on reveal points of the polynomial to Bob without revealing the polynomial itself. For our purpose, the KZG has four important functions:
$Setup(\lambda, t) \rightarrow SRS := (g^\alpha, g^{\alpha^2},\dots,g^{\alpha^t})$
The KZG needs a trusted setup, which generates a structured reference string (SRS) that contains the information necessary to compute
$Commit(SRS, \phi) \rightarrow C := g^{\phi(\alpha)}$
The commit function computes a commitment C for a given polynomial
$CreateWitness(SRS, \phi, i) \rightarrow (i,\phi(i), \omega_i:=g^{\psi(\alpha)})$
The CreateWitness function's purpose is to reveal a single point
$VerifyEval(SRS, C, \omega_i, i, \phi(i)) \rightarrow bool$
The VerifyEval function is the counterpart to CreateWitness. Its purpose is to check that a single point
The main idea behind the construction is simple. On a high level: Firstly, Bob commits to his choices (which Alice cannot know because of the hiding property). Then Alice computes a key based on the commitment and the possible choices and encrypts all possible messages with the key. The idea is now, that Bob can only recover the key for the choices he committed to and hence can only decrypt the messages he chose in the beginning. Let's start with the commitment.
Remember Bob has to commit to
However, note, that the classical KZG is only shown to be hiding for uniform random polynomials. In other words, the choices of Bob may be readable by Alice in the classical KZG scheme. Fleischhacker et al. solve this with a simple trick, they simply add a uniform random
Here is a short overview of the vector commitment scheme from the paper. Note they denote the SRS with pp and prepend the random evaluation r to the vector instead of appending it as described in this blog. Furthermore, they define the function BatchOpen, which reveals all points of the committed vector at once.
Let's take a deeper look at the concrete construction of the key generation.
Fleischhacker et al. use a so-called extractable witness key encapsulating mechanism to generate the keys for Alice and Bob. What is that? The main idea is very simple. Basically, you create a scheme for an NP relation, where you derive a key for a statement and another party can derive the same key if and only if they possess the witness to your NP statement. The NP relation in the case of this work is the relation of opening points to a polynomial commitment as a statement and KZG witnesses as a witness.
Let's take a look at the concrete scheme:
The main idea is to derive the key from the pairing equation from VerifyEval:
The naive way, letting the key equal the value of one side of the pairing equation e.g.
For any other party to obtain the same key, they have to receive the random
Note the 3rd equivalence holds because r is uniformly random and thus with non-negligible probability non-zero.
Here is a graphic of the paper summarizing the scheme. Note the paper uses additive notation for group operations. Additionally, the paper displays a
version where
Now let's put everything together!
The basic Laconic OT construction is a simple combination of the two previous sections, the WKEM and the hiding KZG vector commitment scheme.
Bob commits to a vector of his choices
and computes the according ciphertexts
Alice sends the hidden key according r as
where
The security follows from the hiding KZG vector commitment scheme and the WKEM.
Note in particular that recomputing the key
The paper provides benchmarks from an open-source implementation which can be found here. The implementation uses the BLS12-381 elliptic curve for the pairing-friendly group for the KZG and is implemented in Rust using arkworks. The benchmarks are performed on an i7-11800H @ 2.30GHz CPU with 64 GB of RAM. The Benchmarks are performed on 256-bit messages. Here is a graphic of the benchmarks from the paper. D is the vector of choices of Bob i.e. how many messages are being sent and received, pp is the SRS, and the digest is the KZG commitment. The Hash is essentially the Setup of the Laconic OT.
We just saw how Laconic i.e batched OT can be constructed using the KZG. Bob commits to a vector of his choices D using the KZG. Alice then uses a key encapsulation mechanism based on Bob's commitment to create two keys, with which she encrypts two messages. Bob is bound by the commitment to his choice and can only recompute one of the keys and hence only one message, the message of his choice.
Note that the Laconic OT outlined is a 1-of-2 OT version. However, since the i-th choice is committed as the evaluation of the polynomial at i, the construction could be just as well extended to a 1-of-n version.
the dicussed paper - https://eprint.iacr.org/2024/264
video to the paper - https://www.youtube.com/watch?v=81Hq7Ij94vE
more resources on Oblivious Transfer:
blog post - https://medium.com/partisia-blockchain/what-is-oblivious-transfer-and-why-should-you-care-db40d246ac0
Computerphile video - https://www.youtube.com/watch?v=wE5cl8J27Is
springer link with some further reading - https://link.springer.com/referenceworkentry/10.1007/978-1-4419-5906-5_9
more resources on the KZG:
blog post - https://www.zkdocs.com/docs/zkdocs/commitments/kzg_polynomial_commitment/
original paper - https://www.iacr.org/archive/asiacrypt2010/6477178/6477178.pdf