Multilinear Communication Protocol for Message Comparison
August 21, 2024
See Reed-Solomon Encoding and Fingerprinting for a univariate protocol based on Reed-Solomon encodings.
Protocol
Alice and Bob have messages of length n. Bob wants to check if Alice's message is equal to his but transmitting the full messages is too expensive. This protocol uses multilinear extensions to enable message comparison in O(log2(n)2) bits of communication.
- Fix a prime p such that p>nc where c is a constant greater than 1 and p>s where s is the number of symbols in the character set used to write the messages.
- Map each symbol in the messages to its corresponding element of Fp and represent the messages as n-dimensional vectors a=(a1,…,an)∈Fpn and b=(b1,…,bn)∈Fpn.
- Let ga be a function mapping the binary representations of the indices {0,…,n−1} to their corresponding entries in a. For i∈{0,…,n−1} represented as binary vectors
ga(i)=ai+1
- There are n entries in a, so k=⌈log2(n)⌉ bits of binary are required to encode them. Since 2k may be greater than n, excess indices in the domain {0,1}k will be mapped to 0.
ga:{0,1}k→Fp
- To specify ga, we use multivariate Lagrange interpolation. For interpolating set {0,1}k, the Lagrange basis is the set of polynomials {δv:v∈{0,1}k}.
- For v∈{0,1}k, the vth Lagrange basis polynomial δv:{0,1}k→{0,1} maps all x∈{0,1}k∖{v} to 0 and x=v to 1.
δv(x1,…,xk)=i=1∏kxi⋅vi+(1−xi)(1−vi)
- The interpolating polynomial is
ga(x1,…,xk)=i∈{0,1}k∑ai+1⋅δi(x1,…,xk)
- ai+1 represents the entry in vector a corresponding to index i+1.
- Let g~a:Fpn→Fp be the extension of ga from the domain {0,1}k to the larger domain Fpn.
- {0,1} map to the additive and multiplicative identities in Fpn.
- Use the same method to define a function g~b:Fpn→Fp where g~b(i)=bi+1 for i∈{0,…,n−1} represented as k-dimensional binary vectors.
gb(x1,…,xk)=i∈{0,1}k∑bi+1⋅δi(x1,…,xk)
- Alice evaluates y=g~a(x) at a random vector x∈Fpn.
- Alice sends y and x to Bob.
- Bob evaluates z=g~b(x) and checks that z=y. If they are not equal, he concludes that a=b. If they are equal, he concludes it is likely that the a=b.
x∈FpnPr[g~a(x)=g~b(x)]≤pk
Analysis
Error Probability
If Alice and Bob's messages are equal, a=b and ∀x∈Fpk(g~a(x)=g~b(x)). Then for any vector x∈Fpk picked by Alice, Bob will find that g~a(x)=g~b(x) and output EQUAL, so the error probability is 0.
If Alice and Bob's messages are not equal, a=b and the error probability is the probability that for the vector x∈Fpk picked by Alice, g~a(x)=g~b(x), causing Bob to output EQUAL for two non equal messages.
- See Multilinear Lagrange Interpolation for proof that if a=b then g~a(x)=g~b(x).
- Since g~a(x) and g~b(x) are both multilinear and k variate, they both have total degree ≤k.
- Let q=g~a−g~b. Since g~a(x)=g~b(x), q is nonzero. It is also multilinear and k variate since it is the difference of two multilinear k variate polynomials. The Schwartz-Zippel gives us the probability that a random vector x∈Fpk is a zero of q
x∈FpkPr[q(x)=0]≤pk
- This is the same as the probability that g~a(x) and g~b(x) agree at x∈Fpk
x∈FpkPr[g~a(x)=g~b(x)]≤pk
- To bound the probability of Bob determining that a=b to n1, we need it to be the case that k/p≤1/n. Since k=log2(n), picking p>log2(n)⋅n will achieve this goal.
pk=n⋅log2(n)log2(n)=n1
Communication Bits
- Alice must send bob x∈Fpk and g~a(x) which is an element of Fp, so she sends k+1 field elements.
- There's p elements in the field, so we need ⌈log2(p)⌉ bits to represent a field element.
- Suppose we've selected p=nc where c is a constant and c>1.
- Then it is still the case that p>log2(n)⋅n, bounding the error probability below n1
- The number of bits required to transmit a field element is then ⌈c⋅log2(n)⌉.
- Since k=⌈log2(n)⌉, we can compute the number of bits to transmit k+1 field elements:
(k+1)(⌈c⋅log2(n)⌉)
=(⌈log2(n)⌉+1)(⌈c⋅log2(n)⌉)
=⌈log2(n)⌉⋅⌈c⋅log2(n)⌉+⌈c⋅log2(n)⌉
- Dropping the insignificant terms, we have log2(n)⋅log2(n). Thus, the communication cost in big O is O(log2(n)2).