<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ignacio Manzur Tomasini on Medium]]></title>
        <description><![CDATA[Stories by Ignacio Manzur Tomasini on Medium]]></description>
        <link>https://medium.com/@tomasini.ignacio?source=rss-912769282663------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Qkl8NxOVZ6poB1bC</url>
            <title>Stories by Ignacio Manzur Tomasini on Medium</title>
            <link>https://medium.com/@tomasini.ignacio?source=rss-912769282663------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:41:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tomasini.ignacio/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Algebraic Geometry Codes]]></title>
            <link>https://medium.com/nethermind-eth/algebraic-geometry-codes-8b760f03b5d3?source=rss-912769282663------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b760f03b5d3</guid>
            <category><![CDATA[algebraic-geometry]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[asymptotically-good-codes]]></category>
            <category><![CDATA[encoding]]></category>
            <category><![CDATA[linear-codes]]></category>
            <dc:creator><![CDATA[Ignacio Manzur Tomasini]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 17:10:57 GMT</pubDate>
            <atom:updated>2023-04-03T17:10:59.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTEB1Pxg2LWh5TNnXVCDrA.png" /></figure><p><em>By</em><a href="https://www.linkedin.com/in/ignacio-manzur-0220121b7/"><em> Ignacio Manzur</em></a><em>. Special thanks to </em><a href="https://twitter.com/0xAlbertG"><em>Albert Garreta</em></a><em>, </em><a href="https://www.linkedin.com/in/yevgeny-zaytman-726640238/"><em>Yevgeny Zaytman</em></a><em>, </em><a href="https://twitter.com/mpfzajac"><em>Michal Zajac</em></a><em>, </em><a href="https://www.linkedin.com/in/aragirtas"><em>Ahmet Ramazan Agirtas</em></a><em>, and </em><a href="https://www.linkedin.com/in/aikaterini-panagiota-stouka/"><em>Aikaterini-Panagiota Stouka</em></a><em> for their helpful comments and suggestions.</em></p><p>This is a more technical blog post introducing algebraic geometry codes over curves. It assumes some level of familiarity with ring and field theory, as well as vector spaces over fields.</p><p>Table of contents:</p><ul><li><a href="#c765">Introduction: messages and information.</a></li><li><a href="#993a">What is a good (linear) code?</a><br>- <a href="#a82e">Error detection, error correction.</a><br>- <a href="#3213">Decoding received messages.</a><br>- <a href="#82fa">The example of Reed-Solomon (RS) encoding.</a><br>- <a href="#d14f">Algebraic Geometry codes.</a></li><li><a href="#ee70">Introduction to Algebraic Geometry (AG) codes (over curves).</a><br>- <a href="#6991">Preliminaries.</a><br>- <a href="#cc42">Evaluation codes.</a><br>- <a href="#10ec">Codes from ℙ¹</a></li><li><a href="#f25b">Beyond the alphabet size.</a><br>- <a href="#08d3">Asymptotically good codes.</a></li><li><a href="#aa67">Related work.</a></li><li><a href="#92e3">Conclusion.</a></li><li><a href="#f150">References.</a></li><li><a href="#c2cd">Disclaimer</a>.</li><li><a href="#7802">About us.</a></li></ul><h3>Introduction: messages and information</h3><p>Data is usually stored and transferred as a sequence of 0’s and 1’s, where each individual element in this sequence is a bit. Let’s say you want to send the following message to your friend via Wi-Fi: “Hello!”. If we picture what happens very naively, you are sending this string of bits through the air with radio waves:</p><p>“01001000 01100101 01101100 01101100 01101111 00100001”</p><p>Your friend receives it, her device understands the radio signal representing that string of bits, and displays “Hello!”. But what guarantees that this radio signal arrives unaltered to your friend’s device? Couldn’t this signal interact with our atmosphere as it travels and be modified or lost? The answer is that it absolutely can, and it happens every day. If only two bits in the preceding message are flipped, you send “Hell!” — a much more sinister message.</p><p>Now, say you stored all your most precious information in a hard drive. Unfortunately, the area where you live has been hit by a shower of cosmic radiation, probably after a violent solar flare. The resulting cosmic particles went through the transistors storing your data, flipping an unknown number of bits. The information you keep on your hard drive is now slightly different and might not even be readable anymore!</p><p>These problems are real. They come up all the time and can have serious consequences. Though cosmic ray bit flips are extremely rare (if any exist), think about a scratched DVD or corrupted USB drive. There are naive ways to deal with this problem: one that comes to mind is to send or store the same information multiple times and use the majority of received/stored information to decide what the correct data should be. It is clear that such a method quickly becomes inefficient. One way to efficiently deal with this problem is by using a type of encoding called linear code. When correctly designed, it allows users to encode information efficiently and detect and correct errors in received/stored data.</p><p>In this blog post, starting from the ubiquitous example of Reed-Solomon encoding, we explore another way of constructing such codes using the algebraic theory of curves over a finite field. These are particularly useful when the amount of data needing to be encoded becomes larger and larger. In fact, they are the <strong><em>best codes</em></strong> we know in these cases. We will focus on their construction rather than the decoding methods. We’ll also explore asymptotically good sequences of Algebraic Geometry (AG) codes at a very high level.</p><h3>What is a good (linear) code?</h3><blockquote><strong><em>Notation. </em></strong><em>For </em>q <em>=</em>pⁿ<em> an integer power of a prime number </em>p<em>, we denote by 𝔽</em>q<em> the unique (up to isomorphism) </em><a href="https://en.wikipedia.org/wiki/Field_(mathematics)"><em>field</em></a><em> with </em>q<em> elements. We can describe it as the splitting field of the polynomial X^</em>q<em>-X over 𝔽ₚ, where 𝔽ₚ is the set of integers {0, …, </em>p — <em>1} with addition and multiplication modulo </em>p<em>. Alternatively, one can see 𝔽</em>q<em> as the quotient 𝔽ₚ[X]/(ƒ(X)) where ƒ is a monic irreducible polynomial over 𝔽ₚ with degree </em>n<em>.</em></blockquote><p>A linear code C of length <em>n</em> and dimension <em>k</em> ≤ <em>n</em> is an 𝔽<em>q</em>-sub-vector space of 𝔽<em>qⁿ</em> of dimension <em>k</em>. Elements of C are called codewords. Many times, we realize such subspaces as the image of an 𝔽<em>q</em>-linear map V→𝔽<em>qⁿ</em>, where V is an 𝔽<em>q</em>-vector space of dimension <em>k</em>. The (minimal) distance <em>d</em> of the linear code is the minimal <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming distance</a> between nonzero codewords, or equivalently the minimum number of nonzero coordinates of any nonzero codeword. We say that C is an <em>[n,k,d]</em>-code (sometimes we emphasize <em>[n,k,d]q</em>).</p><h4>Error detection, error correction</h4><p>The distance of the code is intimately related to its ability to detect and correct errors in received messages. Intuitively, the larger this distance, the smaller the set of possible codewords close to the received message. We try to picture this in Figure 1 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GiWUTSlzze76PAdjeYrpjw.png" /><figcaption>Fig.1 Minimal distance and error detection/correction.</figcaption></figure><p>The red points represent codewords; some elements in the ambient linear space are shown in blue. Our code has a minimal distance of 4 (it would be the minimum number of horizontal or vertical steps one has to take to go from one point to another and not the Hamming distance, but we use it to understand what is going on). On the left, there has only been one error while transmitting the message, so the received message is the blue point one step to the right of our bottom left red point. Someone receiving such a message can immediately deduce that the original message is most likely the closest codeword to this point, which is our original red point. On the right, there have been two errors while transmitting the message, and the received word is the blue point in the middle of the figure. Here, someone receiving this message can deduce that there has been an error, but it cannot determine whether the original message was the bottom left or the upper right red point, as both are at distance 2 from the received word. Therefore this code can correct at most 1 error (remark that 1=⌊(4–1)/2⌋, in fact, this is the relationship between the minimal distance and the maximum number of errors one can correct “uniquely”), as shown by the green circle on the left, representing the “Hamming ball” around our codeword.</p><p>This simple example shows that we should aim to have the maximum possible minimal distance. Unfortunately, there is a simple result constraining the possible values of <em>d</em>:</p><p><strong>Lemma (Singleton bound).</strong> <em>If C is an [n,k,d]q linear code, then d≤ n-k+1</em></p><p><strong><em>proof. </em></strong>Let C be an arbitrary linear code over 𝔽<em>q</em> with minimal distance <em>d</em>. All codewords are distinct. If we delete the first <em>d — </em>1 coordinates of every codeword, they are still pairwise distinct because every pair differs in at least <em>d</em> coordinates. The number of coordinates of the new codewords is <br><em>n — d+1</em>, but there is the same number of distinct codewords. It follows that |C|≤ <em>qⁿ⁻ᵈ⁺¹</em>. If C is linear of dimension <em>k</em>, we have |C|=<em>qᵏ</em>. ◾</p><p>It follows that the largest possible value of <em>d</em> is <em>n — k+1</em> when we attain the singleton bound. Linear codes that attain this bound are called Maximum Distance Separable (MDS).</p><h4>Decoding received messages</h4><p>At the same time, we need to encode messages into codewords using a relatively simple procedure. We also need an algorithm to decode received messages: this means translating back received messages m into codewords from C. Such an algorithm should take a message m and return the closest (or a list of close) codewords to m. There are inefficient ways to do this, e.g., to check all codewords. We are interested in efficient decoding algorithms, and this will usually depend on the search distance.</p><h4>The example of Reed-Solomon (RS) encoding</h4><p>The Reed-Solomon encoding is one of the most important examples of linear codes. It is everywhere in modern storage and communication, which is all the more remarkable because of its elegant and simple nature.</p><p>Fix a prime power <em>q</em> (this quantity is called the <strong><em>alphabet size</em></strong>), <em>n</em> distinct elements of 𝔽<em>q</em>, say y₁, …, yₙ (the integer n is called the <strong><em>blocklength</em></strong>) and suppose you want to send a message that consists of <em>k &lt; n≤ q</em> elements (<em>k</em> is the <strong><em>dimension</em></strong>) x₁, …, xₖ in 𝔽<em>q</em>. We construct an extension of the message in the following way:</p><ul><li>Consider the vector of elements (x₁, …, xₖ) to be sent as the coefficients of a degree at most <em>k</em> — 1 polynomial ƒ(X)=x₁+x₂X+ … + xₖXᵏ⁻¹ over 𝔽<em>q</em>.</li><li>Compute the evaluations of ƒ at all yᵢ, that is compute ƒ(yᵢ) for i=1, …, n.</li><li>Send all the computed evaluations by sending the vector (ƒ(y₁),…, ƒ(yₙ)).</li></ul><p>This description of RS codes does not exactly fit our definition of a linear code. To see the link, consider the space V of polynomials with coefficients in 𝔽<em>q</em> with degree strictly less than <em>k</em>. These can be described by their vector of coefficients of length <em>k</em>. This is an 𝔽<em>q</em>-sub-vector space of 𝔽<em>qⁿ</em> because <em>k&lt;n</em>, and the fact that addition and scalar multiplication are defined component-wise. By using the obviously 𝔽<em>q</em>-linear evaluation map:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7nJWviTnjGU2W01bFBbE2A.png" /></figure><p>we see how any message encoded by using the previous description corresponds to exactly one element in the image of this map.</p><p>If your message stays intact during communication or storage, then it is immediate to obtain your original message back by using <a href="https://en.wikipedia.org/wiki/Interpolation">polynomial interpolation</a>. If not, RS codes possess many properties that allow for efficient decoding. For example, Reed-Solomon codes are MDS. Furthermore, the <a href="https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Welch_algorithm">Berlekamp-Welch</a> algorithm is an example of a decoding algorithm that is much more efficient than exhaustive search and can correct up to ⌊(<em>d — </em>1)/2⌋ errors.</p><h4>Algebraic geometry codes</h4><p>It is no wonder that RS codes satisfy all these nice properties; they are examples of a more general family of codes called <em>Algebraic Geometry codes</em> (over curves). We will explain later that they can be seen as evaluation codes over the projective line ℙ¹. Algebraic Geometry codes satisfy many desirable properties, including the fact that:</p><ul><li>They are explicitly constructible.</li><li>They are efficiently decodable.</li><li>They have good bounds on their parameters, though they are not MDS when the genus of the curve is greater than 0, they remain close to the singleton bound.</li></ul><h3>Introduction to algebraic geometry (AG) codes (over curves)</h3><p>Let us consider a curve 𝔛 over 𝔽<em>q, </em>we can think of it as being the projectivization (and possibly desingularization) of the affine curve <br>𝔛ₐ:={ (x, y)∈ 𝔽<em>q</em>² ∣ p(x, y)=0 }, where p∈𝔽<em>q</em>[X, Y] is absolutely irreducible (irreducible over the algebraic closure of 𝔽<em>q</em>).</p><p><strong><em>Technical details about homogenization, projectivization, and singularities. </em><br></strong>Let p∈𝔽<em>q</em>[X,Y], consider F∈𝔽<em>q</em>[X₀, X₁, X₂] defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yTjUZlNifjbem_6lYN4_w.jpeg" /></figure><p>We call F the <em>homogenization</em> of p with respect to X₂. This polynomial is homogeneous, meaning that for any λ∈𝔽<em>q</em>, we have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gs_gQ_NoM7wKSykMhHv_Vw.png" /></figure><p>The projectivization of the affine curve 𝔛ₐ can therefore be defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcytbxlBFoidz8G0F5P9TQ.png" /></figure><p>Here ℙ²(𝔽<em>q</em>) is the projective plane over 𝔽<em>q</em>, which we define as the quotient of the space 𝔽<em>q</em>³∖{(0,0,0)} by the equivalence relation (z₀, z₁, z₂) ∼ (λz₀, λz₁, λz₂), ∀ λ∈𝔽<em>q</em>*. We will encounter the projective line ℙ¹(𝔽<em>q</em>) later on and give a bit more intuition into how to think about it.</p><p><strong><em>Not crucial for understanding the post:</em></strong></p><p>The <a href="https://en.wikipedia.org/wiki/Resolution_of_singularities">resolution of singularities</a> part is somewhat more challenging to explain. Recall that a singularity of the projectivization is given by a point [x₀:x₁:x₂] in the projectivization such that ∂F/∂Xᵢ(x₀, x₁, x₂)=0 for i=0, 1, 2. We can assume that this does not happen, i.e., that the projectivization is nonsingular, without harming our argument.</p><h4>Preliminaries</h4><p>Consider a “closed point” P of 𝔛, which we can think about as a triple [x₀: x₁: x₂]∈ℙ²(𝔽<em>q</em>) such that F(x₀,x₁,x₂)=0, where F is the homogenization of p. We have to be careful here because 𝔽<em>q</em> is not algebraically closed, but this gives a good feeling for what a point might be. For each such point P, there exists a corresponding valuation (see below), or <em>place</em>, νₚ: K(𝔛)→ ℤ∪{∞}, where K(𝔛)=Frac(𝔽<em>q</em>[X,Y]/(p(X,Y))) is the function field of 𝔛 (here for an integral ring R we denote by Frac(R) its <a href="https://en.wikipedia.org/wiki/Field_of_fractions">field of fractions</a>). We recall that a valuation is such that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AhHAwNTjxZdM98tlUAjedA.png" /></figure><p>In analogy with the theory of curves over ℂ and their meromorphic functions, we can think of νₚ(ƒ) as being the order of the “rational function” ƒ at P: if νₚ(ƒ)&gt;0 we can think of ƒ as having a zero of order νₚ(ƒ) at P, if νₚ(ƒ)&lt;0 we can think of ƒ as having a pole of order — νₚ(ƒ) at P.</p><p>For each place νₚ, there is an associated local ring 𝒪ₚ={ƒ ∈K(𝔛)*|νₚ(ƒ)≥0}⋃{0} with unique maximal ideal 𝔪ₚ={ƒ∈K(𝔛)*|νₚ(ƒ)&gt;0}⋃{0} (a “rational function” ƒ in 𝒪ₚ is invertible “at P” if and only if νₚ(ƒ)=0).</p><p>The quotient 𝒪ₚ/𝔪ₚ:=kₚ, called the <em>residue field</em> at P, is a vector space over 𝔽<em>q</em>, and we define:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IfO6aqgo6hOg99h2anyfUw.png" /></figure><p>The idea now is to consider functions with prescribed zeros and poles because this will allow us to build linear maps from finite-dimensional vector spaces to 𝔽<em>q</em>ⁿ, whose images are precisely what we defined as linear codes. Furthermore, it can help us specify the type of functions we are looking for (as we will see, polynomials have a characteristic structure of zeros and poles over ℙ¹). We do this by associating formal sums to rational functions which encode their multiplicities. We set:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJV35R67CI7eQywtGPkFRw.png" /></figure><p>It can be proven that for any ƒ∈ K(𝔛)*, there are only finitely many points where ƒ has zeros or poles, so the previous sum <em>makes sense</em>. Sums of the form (1) are called <em>principal divisors. </em>We can also show that zeros and poles of rational functions compensate exactly when taken with the correct multiplicity, that is, for all ƒ∈ K(𝔛)*:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5e0ldHsiot4d81F2NdFQZQ.png" /></figure><p>The sum is meaningful because all but finitely many valuations are zero. There are also non-principal divisors, which arise when we allow arbitrary finite linear combinations of points D=∑ₚ cₚ ⋅ P, where all cₚ∈ℤ (the degree of D is defined in the same way). By using the properties of valuations above, it is easy to see that div(ƒ ⋅ <em>g</em>)=div(ƒ)+div(<em>g</em>), from which it follows that principal divisors form an additive subgroup of the additive group of divisors.</p><p>We can impose conditions on the order of zeros and poles of ƒ by taking a divisor D=∑ₚ cₚ ⋅ P and asking that all coefficients of div(ƒ) + D = ∑ₚ(νₚ(ƒ) + cₚ)⋅ P are positive. We denote this div(ƒ)+D ≥ 0, or div(ƒ) ≥ — D. Taking degrees is compatible with this partial ordering, meaning that if E ≥ D, then deg(E) ≥ deg(D).</p><p>For an arbitrary divisor D, its associated <em>Riemann-Roch space</em> is defined to be the following sub-vector space of K(𝔛):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YS0rxGMuUxyJJZt7v-JhCA.png" /></figure><p>Surprisingly (because K(𝔛) is a vector space of infinite dimension over 𝔽<em>q</em>), L(D) is finite-dimensional for all divisors D, with dimension ℓ(D). One of the greatest results of the theory of curves is the following:</p><p><strong>Theorem (Riemann-Roch).</strong> <em>There exists a divisor K called the canonical divisor such that for all divisors D, the following holds:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67ZC5w7FabuS0Fne3Jd7VA.png" /></figure><p><em>The quantity ℓ(K) is called the genus of the curve 𝔛, denoted g. We have deg(K)=2g — 2. In particular, since ℓ(K — D) is the dimension of a vector space, we find:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7dF-FjzXLPXaw72QG2fHUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*xR-hozb1zC2ovVsAy7d-Ng.png" /><figcaption>Fig.2 This picture shows compact complex surfaces of the increasing genus. You might be more familiar with the fact that the genus is the number of “holes” in the curve. This is called the “topological genus”. The genus as we defined in the statement of Riemann-Roch is called the “arithmetic genus”. In the complex case, one way to see the link between the seemingly different definitions of the genus of the curve is given by the <a href="https://en.wikipedia.org/wiki/Genus%E2%80%93degree_formula">degree-genus</a> and the <a href="https://en.wikipedia.org/wiki/Riemann%E2%80%93Hurwitz_formula">Riemann-Hurwitz</a> formulas. Source: <a href="http://www.map.mpim-bonn.mpg.de/2-manifolds">http://www.map.mpim-bonn.mpg.de/2-manifolds</a></figcaption></figure><p>Remark first that since deg(div(ƒ))=0, if the degree of D is strictly negative, there are no rational functions such that div(ƒ) ≥ — D, and so ℓ(D)=0. From this, we obtain the following:</p><p><strong>Corollary to Riemann-Roch.</strong> <em>If deg(D)&gt;2g — 2, then ℓ(D)=deg(D)+1 — g.</em></p><h4>Evaluation codes</h4><p>We have now obtained a roadmap for building (hopefully good) linear codes: we use linear maps from the finite-dimensional Riemann-Roch spaces to obtain linear codes and apply Riemann-Roch type arguments to obtain bounds on the length, dimension, and distance of the resulting codes. This is exactly what we do.</p><p>Let 𝔛 be a curve over 𝔽<em>q</em>, let G be an arbitrary divisor, and let 𝒫={P₁, …, Pₙ} a set of <em>n</em> 𝔽<em>q</em>-rational points (with coordinates in 𝔽<em>q</em>, alternatively such that kₚ=𝔽<em>q</em>) such that for all i, the coefficient associated to Pᵢ in the sum defining the divisor G is 0. Associate a very simple divisor to 𝒫 as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6S3WoKFeHSsVRXmI_9_Vmw.png" /></figure><p>For any place νₚ there is a natural way to “evaluate” a rational function ƒ∈ 𝒪ₚ “at P”: just send it to its image ƒₚ in the residue field kₚ=𝒪ₚ/𝔪ₚ by the natural quotient map. We define ƒₚ:=ƒ(P). If P is 𝔽<em>q</em>-rational, this means in particular that kₚ=𝔽<em>q</em>, and therefore we find that ƒ(P)∈𝔽<em>q</em>. Furthermore, in this case, the evaluation map is 𝔽<em>q</em>-linear, that is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huUouTauS1QaeAlg8MZdbQ.png" /></figure><p>This allows us to make the following definition.</p><p><strong>Definition (Evaluation code). </strong><em>The evaluation code C(𝔛,𝒫, G) is defined as the image of the linear map:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2fdE1TUiGNlxrgWQSbg0w.png" /></figure><p>For this definition to make sense, in view of our previous observations, we need ƒ∈ 𝒪ₚ for all ƒ∈ L(G) and P=Pᵢ. This is indeed the case because the coefficient associated with each Pᵢ is 0 in the sum defining the divisor G, therefore any function ƒ verifying ƒ ≥ — G is such that vₚ(ƒ) ≥ 0 for all P=Pᵢ.</p><p>We can now obtain the following basic estimates:</p><p><strong>Theorem.</strong> <em>The evaluation code C(𝔛,𝒫, G) is a linear code of length n=deg(Dₚ) (all degrees deg(Pᵢ) are 1 because they are 𝔽q-rational points) and dimension:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctDmeEkYFZ0-siuU672hoA.png" /></figure><p><em>In particular if deg(G)&lt;n, then</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mL_RzwAZjrXEEJHgo2y_9w.png" /></figure><p><em>And if 2g — 2&lt; deg(G)&lt; n, then</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQod6U3X8P_gKFsMaoac9A.png" /></figure><p><em>Its minimum distance d satisfies</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9OZBwhP7Heq5YSsEMzhs3w.png" /></figure><p><strong><em>proof. </em></strong>The first equality follows from Rank-Nullity, as the map is linear we find:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*07S2iFkwEvcHEsJyj8g98A.png" /></figure><p>Now the dimension of the image of <em>ev</em> is k by definition. If ƒ∈ L(G) is such that <em>ev</em>(ƒ)=<strong>0</strong>, then this means that νₚ(ƒ) &gt; 0 for all P=Pᵢ. Since in the sum defining the divisor G the Pᵢ’s do not appear, we find that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*niRSE26WvV2Tyyw5RRNqfw.png" /></figure><p>or in other words ƒ∈ L(G — Dₚ). The converse follows from the same argument. This shows that ker(<em>ev</em>)=L(G — Dₚ), and therefore dim(ker(<em>ev</em>))=ℓ(G — Dₚ). The inequalities involving k are a direct application of Riemann-Roch and its Corollary.</p><p>For the minimal distance, suppose <em>ev</em>(ƒ) is a nonzero vector in the image. Let <em>w</em> be its Hamming weight (the number of nonzero coordinates). Then <em>ev</em>(ƒ) has <em>n</em> — <em>w</em> coordinates equal to 0, w.l.o.g. assume these are the first <em>n</em> — <em>w</em>. This means that ƒ(P)=0 for P=Pᵢ and i=1, …, <em>n</em> — <em>w</em>, and in turn this means that νₚ(ƒ)&gt;0 for P=Pᵢ and i=1, …, <em>n </em>— <em>w</em>. As before, we find:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gkUUVu6nReGTrL5tKM9v8w.png" /></figure><p>Taking degrees and using equation (2) from above, together with the fact that the Pᵢ are 𝔽<em>q</em>-rational we obtain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zViXX1Tp2yzRDrkAT9MQjg.png" /></figure><p>Since <em>ev</em>(ƒ) was an arbitrary nonzero vector in the image, the same inequality holds for the minimal distance in place of <em>w</em>. ◾</p><p>Combining the above inequalities, it follows that if deg(G) &lt;<em>n</em>, then:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ot6Lcm-nQ6aw_FHFc4M5tg.png" /></figure><blockquote><strong>That is, the singleton defect of C(𝔛, 𝒫, G) is at most the genus of 𝔛. <br>In particular, it follows that if the curve has genus 0, then d=n — k+1 because of the singleton bound. That is, the code C(𝔛, 𝒫, G) is MDS.</strong></blockquote><h4>Codes from ℙ¹</h4><p>The projective line is the prototypical example of a genus 0 curve. As a set, we think of it as being the quotient:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLC9zX-nXglPUHD1laNlrg.png" /></figure><p>Elements of ℙ¹ are therefore represented by equivalence classes of points (z₁, z₂)∈ 𝔽<em>q</em>²∖{(0,0)} which we denote [z₁:z₂]. Essentially ℙ¹ can be thought of as the line containing the elements of 𝔽<em>q</em> represented by classes [z:1] for z∈𝔽<em>q</em>, together with a point “at infinity” ∞ = [1:0]. As a curve, its function field can be described as the field of rational functions in one formal variable 𝔽<em>q</em>(X) (using the equivalence between function fields and nonsingular projective curves).</p><p>Recall the definition of the Reed-Solomon codes:</p><p><strong>Definition (Reed-Solomon codes).</strong> <em>Let x =(x₁, …, xₙ)∈𝔽qⁿ be a tuple of distinct elements. The Reed-Solomon code RSₖ(x) of dimension k &lt;n is the linear evaluation code defined as follows:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6hU4GezML6RjvyXp1kuzw.png" /></figure><p>It turns out that the nice properties of RS codes can be obtained from the fact that they are a particular type of AG code from the projective line:</p><p><strong>Proposition.</strong> <em>Let x =(x₁, …, xₙ)∈𝔽qⁿ be a tuple of distinct elements. <br>Set 𝒫={ [x₁ :1], …, [xₙ :1] } and ∞=[1:0]. <br>Then the evaluation code C(ℙ¹, 𝒫, (k — 1)∞) is nothing but RSₖ(x). <br>In particular, RSₖ(x) is MDS.</em></p><p><strong><em>proof. </em></strong>The set L((<em>k </em>— 1)∞) consists of rational functions in one variable which have a pole of order strictly less than <em>k</em> at “infinity”. These are precisely the polynomials of degree &lt; <em>k</em>. This can be shown by using the fact that the valuation corresponding to ∞ is the natural extension to the field of rational functions in one variable of the valuation associated with the prime ideal (1/X) in 𝔽<em>q</em>[1/X]. Since <em>g</em>(ℙ¹)=0, equation (3) shows that RSₖ(x) is MDS. ◾</p><p>There exists an extension of RS codes, called generalized RS codes, defined in the following way:</p><p><strong>Definition (Generalized RS codes).</strong> <em>Let x =(x₁, …, xₙ), y=(y₁, …, yₙ)∈𝔽qⁿ be two tuples of distinct elements. The Generalized Reed-Solomon code GRSₖ(x) of dimension k &lt;n is the linear evaluation code defined as follows:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3NIBc7LgiRmeK4MT9ux2A.png" /></figure><p>It is possible to obtain the following result (for proof, we refer to <a href="https://arxiv.org/abs/2009.01281">[1], p.15</a>):</p><p><strong>Theorem.</strong> <em>Every Generalized Reed-Solomon code is an AG code from the projective line whose evaluation points avoid ∞, and conversely.</em></p><h3>Beyond the alphabet size</h3><p>We have now constructed linear codes by using curves over finite fields. As a particular example, we have obtained RS and even GRS codes. But if RS codes are so efficient and elegant, why do we need other codes? The answer lies in the integer <em>n</em>, which we call the blocklength of the RS code. Remark that in the definition, we asked for the <em>n</em> evaluation points to be distinct. Otherwise, we would have redundant information in our encoding. This constrains <em>n</em> to be, at most <em>q</em>, the alphabet size. We find that RS codes can encode messages that have a length at most <em>q</em> — 1.</p><p>If we need to send longer messages, we need to work over larger prime numbers or higher degree extensions. This makes decoding more expensive and implies having to implement many different finite fields (in our computers) depending on the lengths of the messages we want to send or store. One natural question, therefore, is the following: for a <em>fixed alphabet size</em> <em>q</em>, is it possible to obtain linear codes that can encode arbitrarily large amounts of information while still having error correction capabilities?</p><p>This question turned out to be very challenging. It was first understood that those were <em>possible</em><strong><em>,</em></strong> but an explicit construction was lacking. Not only did AG codes provide the first explicit examples of such codes, but they are currently the best that we know of, too.</p><h4>Asymptotically good codes</h4><p><em>In this section, we omit proofs.</em></p><p>For a<em> [n,k,d]q</em> code C define the information rate <em>R=k/n</em> and the relative minimal distance <em>δ=d/n</em>. An asymptotically good sequence of codes is a sequence of codes C₁, C₂,… with lengths <em>n</em>₁, <em>n</em>₂, …, dimensions <em>k</em>₁, <em>k</em>₂, …and minimal distances <em>d</em>₁, <em>d</em>₂, … respectively, such that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2T8OeEBwVBgNjm_1xTA_eA.png" /></figure><p>I.e., a sequence of codes with strictly positive asymptotic information rate/relative minimal distance. This condition means that as <em>nᵢ</em> grows arbitrarily large, the amount of information <em>kᵢ</em> and the minimal distance <em>dᵢ</em> do not become negligible with respect to <em>nᵢ</em>. This shows that we can encode an arbitrarily large amount of information while still having non-trivial error-correcting capabilities (because the minimal distance is not negligible w.r.t. <em>nᵢ</em>).</p><p>A non-constructive argument given independently by Gilbert and later Varshamov (using different techniques) shows that an asymptotically good sequence of codes exists over any finite field 𝔽<em>q</em> with 0 &lt;δ &lt;1–1/<em>q</em> and <em>R</em>=1-H<em>q</em>(δ) where:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3acC45ym9mSGbYthThf7Ww.png" /></figure><p>is the <em>q</em>-ary entropy function.</p><p>For a long time, it was an open question to determine an explicit/computable construction of asymptotically good codes. Algebraic geometry codes provide a possible answer. Coming back to equation (3), it can be seen as a tradeoff: as <em>n</em> increases, the minimal distance increases, but as the genus <em>g</em> increases, the distance decreases. Since <em>n</em> is ultimately related to the number of distinct 𝔽<em>q</em>-rational points, <em>the aim would be to find curves with low genus and a large number of 𝔽q-rational points</em>. Rewrite (3) as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4SOpw9zrOLJl3MSxzc1TA.png" /></figure><p>Letting <em>n</em> → ∞ in (4) motivates the following definition:</p><p><strong>Definition (Ihara constant).</strong> <em>The Ihara constant of 𝔽q is defined as follows:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqomEEEuS4Bd0QxfqTwFDQ.png" /></figure><p><em>Where 𝔛 runs through all curves over 𝔽q and n(𝔛) denotes the number of 𝔽q-rational points of 𝔛.</em></p><p>It is then possible to obtain the following result:</p><p><strong>Theorem (Asymptotic AG codes).</strong> <em>Assume A(q)&gt;1. For any R,δ &gt;0 satisfying R+δ=1 — 1/A(q), there exists asymptotically good codes with asymptotic rate and minimal distance at least R and δ respectively.</em></p><p>For the result to be meaningful, we need estimates on A(<em>q</em>). <a href="https://en.wikipedia.org/wiki/Hasse%27s_theorem_on_elliptic_curves">Hasse-Weil</a> immediately implies that A(<em>q</em>)≤ 2 √<em>q</em>. Several improvements culminated in the following upper bound:</p><p><strong>Theorem (Drinfeld-Vlăduţ).</strong> <em>For any q, A(q) ≤ √q — 1.</em></p><p>Using Shimura curves, Ihara showed that when <em>q</em> is a square, then A(<em>q</em>) ≥ √q — 1, and so in fact, A(<em>q</em>)=√<em>q — </em>1. Ihara’s lower bound, combined with the Theorem about asymptotic AG codes, shows that there exist asymptotically good codes with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yWf8tnVOdKs6L45OeJ91Tg.png" /></figure><p>This is known as the Tsfasman-Vlăduţ-Zink bound, and for <em>q</em> ≥ 49 it gives better asymptotic codes than the Gilbert-Varshamov bound!</p><blockquote><strong><em>And for general </em>q<em>?</em></strong><em> For general </em>q<em>, Serre showed in </em><a href="https://medium.com/b7bbef332dbc4feba9330874753ae4cc"><em>[9]</em></a><em> that A(</em>q<em>) ≥ c log(</em>q<em>). Later, the constant was improved, and we now know that c can be taken to be 1/(96 log(2)). When </em>q<em> is prime, this is often the best-known estimate.</em></blockquote><h3>Related work</h3><p>Theoretically, we can outline some of the major lines of work in the development of AG codes.</p><p>One has focused on improving the minimal distance bound in (3). As explained in [1], these can broadly be categorized based on whether they rely on the use of “base points” of divisors related to G or on the use of a filtration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPi-eCDSWhjL8aSZQOluDA.png" /></figure><p>with some clever estimates on the number of points in C(𝔛, 𝒫, Gᵢ)∖C(𝔛, 𝒫, Gᵢ₊₁). There are also some improvements that rely on the particular embedding of curves in projective space.</p><p>Decoding AG codes has also been the subject of extensive research. The first algorithm was proposed by Justesen et al. in <a href="https://ieeexplore.ieee.org/document/32157">[5]</a>, and the generalization to arbitrary AG codes has been given by Skorobogatov and Vlăduţ in <a href="https://www.semanticscholar.org/paper/On-the-decoding-of-algebraic-geometric-codes-Skorobogatov-Vladut/bbf6edfc6957e6467e376bd140258cdd62a1ead1#extracted">[6]</a>. These algorithms allow correcting errors up to half of the minimal distance minus some term depending on the genus. A productive direction has been to correct this defect. The key insight of Sudan in <a href="https://doi.org/10.1006/jcom.1997.0439">[7]</a> is that at the cost of returning a list of possible close codewords, we can decode errors that exceed the usual error-correction bound. Guruswami and Sudan then gave an improved algorithm correcting errors up to the so-called Johnson bound <a href="https://ieeexplore.ieee.org/document/782097">[8]</a>.</p><p>We only introduced AG codes over curves, but we can use some more theory to define codes over higher dimensional varieties. For a review, see <a href="https://arxiv.org/abs/0802.2349">[4]</a>.</p><p>AG codes also have been gaining some traction because of their potential in proof systems, where they would replace polynomial encodings and potentially enable more efficient protocols.</p><h3>Conclusion</h3><p>So why aren’t AG codes everywhere yet? The answer, for now, seems to be that their definition is quite abstract, and, to the best of our knowledge, an efficient computer implementation of all the necessary pieces has not been completed. It is our opinion, however, that this is only a matter of time and that, eventually, general AG codes will be widespread and universally adopted for communication, storage, and maybe even proof systems.</p><h3>References</h3><ol><li>Couvreur A., Randriambololona H., <em>Algebraic geometry codes and some applications</em><strong><em>,</em></strong> <a href="https://arxiv.org/abs/2009.01281">https://arxiv.org/abs/2009.01281</a></li><li>Beelen P., <em>A survey on recursive towers and Ihara’s constant,</em> <a href="https://arxiv.org/abs/2203.03310">https://arxiv.org/abs/2203.03310</a></li><li>Blake I., Heegard C., Høholdt T. and Wei V., <em>Algebraic-geometry codes</em>, in IEEE Transactions on Information Theory, vol. 44, no. 6, pp. 2596–2618, Oct. 1998, doi: 10.1109/18.720550.</li><li>Little J. B., <em>Algebraic geometry codes from higher dimensional varieties</em><strong>,</strong> <a href="https://arxiv.org/abs/0802.2349">https://arxiv.org/abs/0802.2349</a></li><li>Justesen J., Larsen K. J., Jensen H. E., Havemose A., and Høholdt T. <em>Construction and decoding of a class of algebraic geometry codes</em>. IEEE Trans. Inform. Theory, 35(4): 811–821, July 1989.</li><li>Skorobogatov, A.N., &amp; Vladut, S.G. (1990). <em>On the decoding of algebraic-geometric codes</em>. <em>IEEE Trans. Inf. Theory, 36</em>, 1051–1060.</li><li>Sudan M., <em>Decoding of Reed Solomon Codes beyond the Error-Correction Bound</em>, Journal of Complexity, Volume 13, Issue 1, 1997, Pages 180–193, ISSN 0885–064X, <a href="https://doi.org/10.1006/jcom.1997.0439">https://doi.org/10.1006/jcom.1997.0439</a></li><li>Guruswami V., Sudan M., <em>Improved decoding of Reed-Solomon and algebraic-geometry codes</em>, in <em>IEEE Transactions on Information Theory</em>, vol. 45, no. 6, pp. 1757–1767, Sept. 1999, doi: 10.1109/18.782097.</li><li>Serre J-P., <em>Rational Points on Curves over Finite Fields</em>. Cours de Jean-Pierre Serre, no. 6 (1985), (red.), 242 p. <a href="http://numdam.org/item/CJPS_1985__6_/">http://numdam.org/item/CJPS_1985__6_/</a></li><li><a href="https://en.wikipedia.org/wiki/Hamming_distance">https://en.wikipedia.org/wiki/Hamming_distance</a></li><li><a href="https://en.wikipedia.org/wiki/Field_(mathematics)">https://en.wikipedia.org/wiki/Field_(mathematics)</a></li><li><a href="https://en.wikipedia.org/wiki/Interpolation">https://en.wikipedia.org/wiki/Interpolation</a></li><li><a href="https://en.wikipedia.org/wiki/Resolution_of_singularities">https://en.wikipedia.org/wiki/Resolution_of_singularities</a></li><li><a href="https://en.wikipedia.org/wiki/Field_of_fractions">https://en.wikipedia.org/wiki/Field_of_fractions</a></li><li><a href="https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Welch_algorithm">https://en.wikipedia.org/wiki/Berlekamp–Welch_algorithm</a></li><li><a href="https://en.wikipedia.org/wiki/Genus%E2%80%93degree_formula">https://en.wikipedia.org/wiki/Genus%E2%80%93degree_formula</a></li><li><a href="https://en.wikipedia.org/wiki/Riemann%E2%80%93Hurwitz_formula">https://en.wikipedia.org/wiki/Riemann%E2%80%93Hurwitz_formula</a></li><li><a href="https://en.wikipedia.org/wiki/Hasse&#39;s_theorem_on_elliptic_curves">https://en.wikipedia.org/wiki/Hasse&#39;s_theorem_on_elliptic_curves</a></li></ol><h3>Disclaimer</h3><p>This article has been prepared for the general information and understanding of the readers. No representation or warranty, express or implied, is given by Nethermind as to the accuracy or completeness of the information or opinions contained in the above article. No third party should rely on this article in any way, including without limitation as financial, investment, tax, regulatory, legal, or other advice, or interpret this article as any form of recommendation.</p><h3>About us</h3><p><em>Nethermind is a team of world-class builders and researchers. We empower enterprises and developers worldwide to access and build upon the decentralized web. Our work touches every part of the Web3 ecosystem, from our Nethermind node to fundamental cryptography research and application-layer protocol development. We’re always looking for passionate people to join us in solving Ethereum’s most difficult challenges. Are you interested? Check out our </em><a href="https://nethermind.io/company/"><em>job board</em></a><em> and visit our </em><a href="https://nethermind.io/research/"><em>DeFi Research page</em></a><em> for our DeFi analyses.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b760f03b5d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nethermind-eth/algebraic-geometry-codes-8b760f03b5d3">Algebraic Geometry Codes</a> was originally published in <a href="https://medium.com/nethermind-eth">Nethermind.eth</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A tour of Verifiable Secret Sharing schemes and Distributed Key Generation protocols.]]></title>
            <link>https://medium.com/nethermind-eth/a-tour-of-verifiable-secret-sharing-schemes-and-distributed-key-generation-protocols-3c814e0d47e1?source=rss-912769282663------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c814e0d47e1</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[cryptography]]></category>
            <dc:creator><![CDATA[Ignacio Manzur Tomasini]]></dc:creator>
            <pubDate>Thu, 25 Aug 2022 12:37:04 GMT</pubDate>
            <atom:updated>2022-08-25T12:37:04.175Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9gcaOvRo-V5J692ieTzjRA.png" /></figure><p>by <a href="https://www.linkedin.com/in/ignacio-manzur-0220121b7">Ignacio Manzur</a>, <a href="https://www.linkedin.com/in/marc-graczyk-459562235/">Marc Graczyk</a> and <a href="https://twitter.com/0xAlbertG">Albert Garreta</a>. Special thanks to <a href="http://www.linkedin.com/in/aragirtas">Ahmet Ramazan Agirtas</a> for advice and valuable comments throughout the writing of this post, and to <a href="https://twitter.com/mpfzajac">Michal Zajac</a> for reviewing.</p><p>This article introduces Distributed Key Generation (DKG) protocols and one of its fundamental building blocks: Verifiable Secret Sharing (VSS) schemes. We begin our exploration with the cryptographic primitives that make Distributed Validator Technology (DVT) possible. While an expansion of our <a href="https://medium.com/nethermind-eth/sorting-out-distributed-validator-technology-a6f8ca1bbce3">previous article</a> on DVT, almost the entirety of this post can be read without any previous knowledge of DVT.</p><p>The present article can also be read as a continuation of <em>Secret Sharing For Sharing Mnemonics, </em><a href="https://medium.com/nethermind-eth/using-shamirs-secret-sharing-to-share-mnemonics-c40429835117"><em>Part I</em></a><em> and </em><a href="https://medium.com/nethermind-eth/secret-sharing-for-sharing-mnemonics-part-ii-d76dc1581681"><em>Part 2</em></a><em>.</em></p><p><strong>Table of contents:</strong></p><ul><li><a href="#c2af">Introduction</a></li><li><a href="#0c3f">Math preliminaries and notation</a></li><li><a href="#688d">Feldman’s VSS scheme and Joint Feldman DKG protocol</a></li><li><a href="#f9fe">Pedersen’s VSS scheme and Gennaro et al.’s DKG protocol</a></li><li><a href="#016c">Other directions to explore</a></li><li><a href="#aaff">Conclusion</a></li><li><a href="#02a6">References</a></li></ul><h3>Introduction</h3><p>What do Distributed Key Generation (DKG) protocols enable? At a high level, they allow for the distribution of power (in the form of a key) among a group of independent parties that do not trust each other. Only when a quorum has been achieved, the power, i.e. the key, can be used.</p><p>More concretely, DKG protocols allow for the generation and distribution of secret key fragments, or shares, among several parties. A crucial point is that the key is created during the protocol execution and that no single party is privy to the key before, during, or after such execution, only their individual key shares. Moreover, nobody apart from the involved parties knows the key either, and the protocol requires no intervention from trusted third parties.</p><p>Consider the following example: a company is run by a group of directors who do not trust each other and hence are uncomfortable with another director having access to the secret signing key of the company. To solve this issue, the group of directors can run a DKG protocol to generate a key, giving each director access to only part of it. This means that to successfully sign something, a quorum of directors must be established.</p><p>Notice the importance of the key being generated during the protocol execution: it would be undesirable if the secret key was known to some party and distributed among the directors using, for example, an out-of-the-box version of <a href="https://medium.com/nethermind-eth/using-shamirs-secret-sharing-to-share-mnemonics-c40429835117">Shamir’s Secret Sharing scheme</a>.</p><p>As described in our <a href="https://medium.com/nethermind-eth/sorting-out-distributed-validator-technology-a6f8ca1bbce3">previous post</a>, another use-case of DKG protocols can be found in DVT solutions, where a group of operators can create and distribute shares of an Ethereum (or of another blockchain) secret validator signing key. This, in combination with consensus protocols and <a href="https://link.springer.com/chapter/10.1007/3-540-46766-1_37">Threshold Signature Schemes (TSS)</a>, allows the group of operators to run an Ethereum validator without the need to trust each other.</p><h4>Adding some formality</h4><p>Let us set some notations, definitions, and terminology. We let <em>n</em> be the number of parties involved in the DKG protocol, and we let <em>t</em> be the number of <strong>Byzantine</strong> <strong>parties</strong> among them. A party is called <strong>Byzantine</strong> if it is malfunctioning (e.g., its computer is off) or actively trying to sabotage the protocol.</p><p>Throughout this article, we assume <em>t</em> &lt; <em>n</em>/2, i.e. we assume that less than half of the parties are Byzantine.</p><p>In a DKG protocol, a group of <em>n</em> parties <em>P₁, …, Pₙ</em> interacts with each other, through secure and authenticated communication channels, to <strong>generate</strong> a key pair (<em>sk, pk</em>) — a secret key and a public key, respectively. They create <em>n</em> <strong>secret key shares</strong> <em>sk₁, …, skₙ</em>, so that the party <em>Pᵢ</em> owns the share <em>skᵢ</em> at the end of the protocol, for each <em>i=1, …, n. </em>In fact, only the non-Byzantine parties are guaranteed to end up with a secret key share.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C8ZEREx-me7OifC8" /><figcaption><em>Simplified diagram of a DKG protocol for n=3</em></figcaption></figure><p>A DKG protocol is usually designed with a <strong>key recovery</strong> mechanism that allows any <em>t+1</em> parties to discover the secret key <em>sk</em>. This procedure uses the secret shares of the <em>t+1</em> parties involved in it, hence the name “key shares” given to the keys <em>sk₁, …, skₙ</em>.</p><blockquote><em>We remark that many applications do not use the key recovery mechanism. Indeed, running it reveals the secret key </em>sk<em> to a set of parties, which may defeat the purpose of using a DKG protocol in the first place. For example, it is common for Threshold Signature Schemes to use a DKG protocol to create key shares </em>skᵢ<em>, which are later combined to sign data with the secret key </em>sk<em> without the need of </em>sk<em> ever being revealed to any party. We will discuss this in detail in an upcoming post of this series.</em></blockquote><p>The following properties are required of a DKG protocol.</p><ul><li><strong>Correctness</strong>: If no more than <em>t</em> parties are Byzantine, then, roughly speaking, the protocol works as intended (in cryptography, the term “correctness” always refers, essentially, to a protocol working as expected).</li><li><strong>Secrecy</strong>: If again, no more than <em>t</em> parties are Byzantine, then no information on <em>sk</em> can be learned during the key generation phase. This is slightly vague, but a formal treatment of this topic is out of the scope of the article. In short, it means that no party and no observer learn <em>sk</em> during or after the execution of the protocol. It also means that no “partial information” can be learned about <em>sk</em>. For example, it must be infeasible to deduce, say, the last bit of <em>sk</em>. More than that, it must be infeasible to conclude that the last bit of <em>sk</em> is, say, “twice more likely to be <em>1</em> than <em>0</em>” (more generally, we want <em>sk </em>and <em>pk </em>to be uniformly distributed among the set of all possible keys).</li></ul><p>We have omitted technical details and definitions. We refer to <a href="https://link.springer.com/article/10.1007/s00145-006-0347-3">Gennaro et al. (2006)</a> for more formal treatment.</p><h4>Overview of protocols</h4><p>The two DKG protocols that are most widely used nowadays are the so-called <a href="https://link.springer.com/chapter/10.1007/3-540-46416-6_47"><strong>Joint Feldman DKG</strong></a> (JF DKG) protocol (1991) — one of the first such protocols to be described — and <a href="https://link.springer.com/article/10.1007/s00145-006-0347-3"><strong>Gennaro et al.’s DKG</strong></a> protocol (2006). Many DKG protocols are variations of these two.</p><p>The two protocols are still used concurrently today. One reason is that, in choosing one or the other, there is a tradeoff between efficiency and security. On the one hand, JF DKG is more efficient in computation, storage, and communication complexity. On the other hand, Gennaro et al.’s DKG protocol is more secure and resolves a known attack on the JF DKG protocol, which prevents the public key <em>pk</em> from being uniformly distributed. We will discuss this in more detail later.</p><p>The two protocols rely heavily on <strong>Verifiable Secret Sharing (VSS) schemes,</strong> which are extensions of Secret Sharing Schemes (SSS). More precisely, VSS schemes are SSS schemes with the extra functionality of allowing the parties to verify that the secret key shares they received are consistent with the secret being shared. Why is such a mechanism important? Recall that in <a href="https://medium.com/nethermind-eth/secret-sharing-for-sharing-mnemonics-part-ii-d76dc1581681">Shamir’s Secret Sharing scheme</a>, a corrupted dealer (the party sharing its secret) may send some key shares that do not correspond to the ones an honest dealer following the protocol would send. Even worse, during key reconstruction dishonest parties may contribute incorrect shares to gain information from the shares submitted by honest parties.</p><p>VSS schemes provide protection against such attacks by leveraging <strong>cryptographic commitments</strong>, a type of binding procedure in which a party publishes information that ties it to a certain value <em>v</em> while keeping it hidden from others, with the ability to reveal <em>v</em> later. The idea is that a party that commits to a specific value cannot alter it after that.</p><p>Next, we will go through both the Joint Feldman protocol and Gennaro et al.’s protocol, as well as the VSS schemes that underly them. Let’s begin by reviewing some mathematical concepts and establishing notation.</p><h3>Math preliminaries and notation</h3><p>Here we introduce basic math notations and concepts that are used when describing the DKG protocols.</p><p><strong>Finite fields and discrete logarithms</strong></p><p>We let <em>p</em> and <em>q</em> be two large primes for the rest of the article. We assume <em>q</em> divides <em>p-1</em>, i.e. we assume that <em>p-1</em> is a multiple of <em>q</em>. By 𝔽<em>ₚ</em> we denote the <strong>finite field</strong> with <em>p</em> elements. As a set, this is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0A7II2BYdLSIuVEPusGrqw.png" /></figure><p>Addition and multiplication in 𝔽<em>ₚ</em> are performed modulo <em>p</em>.</p><p>We fix an element <em>g</em>∈ 𝔽<em>ₚ</em> of “order <em>q</em>”, meaning that <em>q</em> is the smallest positive integer <em>x</em> such that <em>gˣ</em> ≡ 1(mod <em>p</em>).</p><blockquote><strong>Technical point (not essential for understanding this article)</strong></blockquote><blockquote>Hence<em>, g</em> generates a cyclic group 𝔾 of order q. We assume that the <a href="https://en.wikipedia.org/wiki/Discrete_logarithm"><strong>discrete logarithm problem</strong></a> is hard in 𝔾. Roughly, this means that given h∈𝔽ₚ*<em> such that gᵏ=h for some k∈{</em>0,…, q-1}<em> it is infeasible to find k.</em></blockquote><blockquote>⚠️ In practice, 𝔾 is taken to be the group generated by a point of an elliptic curve over 𝔽ₚ. For simplicity, we will stick to working directly on 𝔽ₚ.</blockquote><p><strong>Degree of polynomials and their defining points</strong></p><p>Observe the following phenomenon: given two points <em>(x,y)</em> and <em>(x’, y’)</em> in a plane, there is a unique line that passes through these two points. In particular, if two lines pass through the same two distinct points, then they are the same line.</p><p>Now, notice that a line is defined by a polynomial of degree <em>1</em>, that is a function <em>f</em> of the form <em>f(X)=aX+b </em>for some constants <em>a, b</em>.</p><p>Now, what happens when we turn our attention to degree <em>2</em> polynomials, i.e. functions of the form <em>f(X) = aX² + bX+ c</em>? Well, in this case, for any three points <em>(x₀, y₀), (x₁, y₁), (x₂, y₂)</em> there exists a unique degree <em>2</em> polynomial <em>f(X)</em> that traverses these points, i.e. <em>f(xᵢ) =yᵢ</em> for <em>i=0,1,2</em>.</p><p>Again, it can be shown that any two degree-<em>2</em> polynomials agreeing when evaluated at three distinct elements <em>x₀, x₁, and x₂</em> must necessarily be the same polynomial.</p><p>This trend generalizes to polynomials of arbitrary degree and to any field:</p><blockquote><em>Given </em>r+1<em> pairs of elements </em>(x₀, y₀), …, (xᵣ, yᵣ)<em> with </em>x₀,…, xᵣ, y₀, …, yᵣ<em>∈ 𝔽</em>ₚ<em> (or in an arbitrary field 𝕂), there exists a unique polynomial </em>f(X)<em> with coefficients in 𝔽</em>ₚ<em> of degree </em>r <em>such that </em>f(xᵢ)=yᵢ<em> for all </em>i=0,…, r<em>. The process by which such </em>f(X)<em> is found is called </em><a href="https://en.wikipedia.org/wiki/Polynomial_interpolation"><strong><em>polynomial interpolation</em></strong></a><em>.</em></blockquote><blockquote><em>In particular, given two polynomials</em> f(X),g(X) <em>of degree</em> r <em>with coefficients in</em> <em>𝔽</em>ₚ, <em>if there are</em> r+1 elements x₀, …, xᵣ∈ <em>𝔽</em>ₚ <em>such that</em> f(xᵢ) = g(xᵢ) <em>for all</em> i=0,…,r <em>then</em> f <em>and</em> g <em>are the same polynomial.</em></blockquote><p>This property has far-reaching consequences in cryptography. Indeed, it is a fundamental building block of secret sharing schemes, Reed-Solomon codes, and STARKs, to give a few examples.</p><p>As usual, we use 𝔽<em>ₚ</em>[<em>X</em>] to denote the set of polynomials on a variable <em>X</em>, with coefficients in 𝔽<em>ₚ</em>.</p><h3>Feldman’s VSS scheme and Joint Feldman DKG protocol</h3><p>We are now ready to start diving into the Joint Feldman DKG protocol. As already mentioned, it relies on a particular Verifiable Secret Sharing (VSS) scheme called Feldman’s VSS scheme.</p><h4>Feldman’s Verifiable Secret Sharing scheme</h4><p>A dealer wants to share a secret among <em>n</em> parties <em>P₁,…, Pₙ</em> in a way that any subset of at least <em>t+1</em> parties can reconstruct it. Recall that <em>t &lt; n/2</em> is the maximum number of Byzantine parties, and we want to allow the parties to check the information sent by the dealer and other parties for consistency.</p><p>VSS schemes provide a solution satisfying these requirements in three steps, namely:</p><ul><li>The broadcast step.</li><li>The verification step.</li><li>The reconstruction step.</li></ul><p>Assume that the secret <em>σ</em> can be represented as an element of 𝔽<em>q</em>. The dealer chooses, and keeps secret, a random polynomial of degree <em>t &gt; 0</em> from 𝔽<em>q[X], </em>say</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*NKq6A8xP_7RVPoPKLojydQ.png" /></figure><p>such that <em>f(0)=a₀=σ</em> is the shared secret.</p><p><strong>Broadcast step</strong></p><p>The dealer now computes elements <em>s₁, …, sₙ</em> of the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*X9phaN-T1KGCfNqH4tXcyg.png" /></figure><p>We call the elements<em> s₁, …, sₙ</em> shares<em>.</em> Next, the dealer sends <em>sᵢ</em> privately to <em>Pᵢ</em> for each <em>i=1,…,n</em>. Note how we start at <em>i=1</em> and not at <em>i=0</em> since <em>f(0)=σ</em> is our secret.</p><p>The protocol is the same as Shamir’s Secret Sharing scheme up to this point. We mentioned before that such a scheme is vulnerable to attacks from Byzantine parties (including the dealer itself) that do not send shares corresponding to an honest execution of the protocol. So how can a party <em>Pᵢ</em> be sure that the share received is the result of the dealer following the protocol honestly?</p><p>The idea is to make the shares <em>sᵢ</em> <strong>verifiable</strong>. To this end, we make the dealer <strong>commit</strong> the coefficients of the polynomial <em>f</em>. That is, the dealer publishes the values:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*gFR_jY6-912GIUz38EZkFQ.png" /></figure><p>If the values published are the claimed ones, we now have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*tScSH2Y5yKpBbAFBxqGmlg.png" /></figure><p>The values <em>v₀, …, vₜ</em> are called <strong>commitments</strong> for the coefficients of <em>f</em>. The figure below shows the broadcast step for the case <em>n=5</em> and <em>t=2</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_41LiGSVuuh55a6y" /><figcaption>Simplified diagram of the broadcast step in Feldman’s VSS with n=5 and t=2</figcaption></figure><p><strong>Verification step</strong></p><p>To verify its share <em>sᵢ</em>, the party <em>Pᵢ</em> computes (<em>g</em> to the power <em>sᵢ</em>), then (<em>v₀</em> * (<em>v₁</em> to the power <em>i) … * (vₜ</em> to the power <em>i</em>ᵗ)), and finally it checks that these two values are equal modulo <em>p</em>.</p><p>If <em>Pᵢ</em> finds that the two values disagree, then <em>Pᵢ</em> publishes a <strong>complaint</strong> against the dealer. The dealer then publishes <em>sᵢ</em>, and each party verifies whether</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*YvvvqNbuyD0ks-ghTMff3g.png" /></figure><p>An honest party <em>Pⱼ</em> considers the dealer <strong>disqualified</strong> if either more than <em>t</em> complaints are published against the dealer, or the previous check fails. Since any set of more than <em>t</em> parties contains an honest party, <em>Pⱼ</em> disqualifies the dealer if, and only if, the dealer has been dishonest.</p><p><strong>Key reconstruction step</strong></p><p>At the end of the protocol, either the dealer has been disqualified, or the honest parties hold at least <em>t+1</em> verified shares. Hence, the honest parties can reconstruct the original secret using polynomial interpolation (we will revisit this argument with further details while describing the JF DKG protocol below).</p><p>The same commitments that the dealer publishes are used to detect incorrect shares at reconstruction time. The dishonest (i.e., Byzantine) parties cannot hold more than <em>t</em> shares (because <em>t</em> is the number of corrupted parties). It can be argued that, in this situation, these parties cannot learn anything about the secret during the broadcast phase.</p><p>This completes our description of Feldman’s VSS scheme. Notice how this scheme is an extension of <a href="https://medium.com/nethermind-eth/using-shamirs-secret-sharing-to-share-mnemonics-c40429835117">Shamir’s Secret Sharing</a> method. Indeed, the scheme is the same as Shamir’s, with the added functionality of allowing the parties to verify their shares’ validity, and filter out any incorrect shares submitted by malicious parties during the reconstruction step.</p><h4>The Joint-Feldman DKG protocol</h4><p><a href="https://link.springer.com/chapter/10.1007/3-540-46416-6_47">T.P. Pedersen</a> proposed this protocol in 1991. The protocol consists mainly of <strong><em>n</em> parallel applications of Feldman’s VSS scheme</strong> where each party <em>Pᵢ</em> is the dealer in one of the protocols and a receiver in the rest. This duality is characteristic of a DKG protocol.</p><p>To generate the public and secret keys <em>sk, pk</em>, as well as the shares of <em>sk</em>, each party <em>Pᵢ</em> chooses a random polynomial</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*l-RlHH8L2tjlt8QiVokEPA.png" /></figure><p>over 𝔽<em>q </em>and takes<em> fᵢ(0)</em> as its secret (notice thus that <em>Pᵢ</em>’s secret <em>fᵢ(0)</em> is randomly chosen), and then performs Feldman’s VSS scheme with all other parties, <em>Pᵢ</em> being the dealer. As a result, there are <em>n</em> Feldman’s VSS schemes running in parallel, one per party.</p><p>In the figure below, we illustrate which pieces of information are sent from one party to another during this first step, taking <em>n=3</em>. We also indicate what information is known to each party by the end of this step. The figure does not take into account the values committed by each party during the execution of the schemes, which are all public. All values are reduced modulo <em>q</em> but we omit the “mod <em>q</em>” appendices in the figure for readability purposes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Dabv_7uzauKZCwfX" /><figcaption>Simplified diagram of n=3 parallel applications of the broadcast step of Feldman’s VSS scheme</figcaption></figure><p>Note that some parties may get disqualified as a dealer. For simplicity, let us assume that the non-disqualified parties are P₁, …, Pᵣ and that the disqualified parties are the ones indexed from <em>r+1 </em>to <em>n</em>. The public key <em>pk</em> is then computed as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*O_lmzlqablzxpbkXCxdNxA.png" /></figure><p>while the secret key is defined as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*dPyPdmPuJhT5wNKU6PbNtw.png" /></figure><p>Note that <em>pk</em> can be computed by any party since the elements in the product in <em>(3) </em>are made public (as commitments) during the execution of the <em>n</em> parallel Feldman’s VSS schemes. On the other hand, observe that <em>fᵢ(0)</em> is known only to party <em>Pᵢ</em> (for each<em> i=1, …, r</em>), and so individual parties have no obvious way of computing <em>sk</em> (one must prove that, under appropriate assumptions, this is the case). Next, each honest party <em>Pⱼ</em> computes its secret key share<em> skⱼ</em> as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*VXlW4QdXmtsp9i_zEckCsQ.png" /></figure><p><em>Pⱼ</em> knows all the information needed to compute <em>skⱼ</em>: it<em> </em>received the element <em>f₁(j)</em> during Feldman’s VSS scheme with <em>P₁</em> as the dealer, it received<em> f₂(j)</em> during Feldman’s VSS with <em>P₂</em> as the dealer, and so on. See the figure above. Finally, we define</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*KQSJ4PssHeY3I6Do79BMkg.png" /></figure><p>Note that <em>A₀=pk</em>. We call <em>Aₖ</em> the <em>k</em>-th public verification value<em>. </em>As its name suggests, it is a public value, since each one of the factors in the product is made public during an execution of Feldman’s VSS.</p><p><strong>How to reconstruct <em>sk</em> from the secret key shares</strong></p><p>Next, we describe how any set of at least <em>t+1</em> parties can reconstruct the secret key created during the JF DKG protocol. Recall, however, that such a mechanism is not used in the context of DVT, or if <em>sk</em> is to be used in a Threshold Signature Scheme (TSS) involving the parties.</p><p>The method follows standard interpolation arguments with an extra verification step. Define <em>h(X):= f₁(X) + … +fᵣ(X)</em>. Then for each <em>j=1, …, r</em>, we have that <em>skⱼ=h(j)</em>.</p><p>With overwhelming probability, <em>h</em> is of degree exactly <em>t </em>and we omit the proof. Note that <em>h(0) = f₁(0) + … +fᵣ(0)</em> is the secret key <em>sk</em>, modulo <em>p</em>.</p><p>Since <em>h</em> has degree <em>t</em>, any <em>t+1</em> correct shares among <em>sk₁, …, skᵣ</em> will suffice to reconstruct the secret <em>sk</em> by using polynomial interpolation. Say that these <em>t+1</em> shares are <em>sk₁, …, skₜ₊₁</em>. We have<em> h(1)= sk₁</em>, … , <em>h(t+1)= skₜ₊₁</em>. As mentioned earlier, a unique degree <em>t</em> polynomial satisfying such equalities does exist, and using a degree <em>t</em> polynomial interpolation on the points <em>(1, sk₁), … , (t+1, skₜ₊₁)</em> will compute the polynomial <em>h</em>. The secret key <em>sk</em> can be obtained by computing <em>h(0)</em> modulo <em>q, </em>as usual. It can also be argued that any collection of strictly less than <em>t+1</em> shares leaks no information about <em>sk</em>.</p><p>The public verification values allow honest parties to check that the shares submitted by the other parties at the reconstruction time are correct. Say that <em>Pᵢ</em> wants to verify <em>Pⱼ</em>’s share <em>skⱼ</em>. Observe that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*5RCJAipt-YA1xlp_39jImA.png" /></figure><p>Hence, <em>Pᵢ</em> computes the quantity on the left-hand side and verifies that modulo <em>p</em>, this value equals <em>g</em> raised to the power of the share sent by <em>Pⱼ</em>. If the two values agree, then the share sent by <em>Pⱼ</em> is correct. Otherwise, the share is not the result of an honest execution of the protocol, and the reconstruction stops. Then <em>Pⱼ</em> is eliminated from this reconstruction. This ensures that the collection of at least <em>t+1</em> shares used to reconstruct the secret <em>sk</em> will, in fact, successfully reconstruct it.</p><p><strong>A vulnerability in the Joint Feldman DKG protocol</strong></p><p><a href="https://link.springer.com/article/10.1007/s00145-006-0347-3">Gennaro et al. (2006)</a> showed that an adversary could influence the distribution of the public key, making it non-uniform, by using the complaint system against itself. Just by corrupting two parties, the adversary can control the last bit of <em>pk</em>. This, in turn, leaks information about the secret key <em>sk</em>. For example, it is a fact that about half of the powers of <em>g</em> (when working in 𝔽<em>ₚ</em>*) end with the bit <em>0</em>, and the other half end with the bit <em>1</em>. In this case, because the relation <em>pk≡ gˢᵏ </em>(mod <em>p</em>) holds (check this!), knowing the last bit of the public key allows for discarding half of all possible secret keys.</p><p>This implies that the JF DKG protocol cannot be used as a generic secure DKG protocol. As mentioned, DKG protocols are executed in many use-cases to distribute key shares for later use in a Threshold Signature Scheme, such as <a href="https://link.springer.com/article/10.1007/s00145-004-0314-9">BLS</a>. Notably, the key reconstruction step is never supposed to be performed.</p><p>It was shown recently by <a href="https://eprint.iacr.org/2021/005">Gurkan et al. (2021)</a> that the JF DKG protocol is <em>security-preserving</em> when used to distribute key shares for the BLS signature scheme. This means that an adversary that can break the signature scheme by forging a signature after participating in the DKG protocol, can also break the original signature scheme. In other words, <strong>using the JF DKG protocol to create and distribute key shares for the BLS scheme is as secure as the BLS scheme itself</strong> (and the same is true for any <strong><em>rekeyable</em></strong> encryption scheme).</p><p>Gennaro et al. proposed a protocol that does not present the above vulnerability.</p><h3>Pedersen’s VSS scheme and Gennaro et al.’s DKG protocol</h3><p><a href="https://link.springer.com/article/10.1007/s00145-006-0347-3">Gennaro et al.’s DKG protocol (2006)</a> presents an alternative to the JF DKG protocol by resolving the vulnerability pointed out above. It relies on a VSS scheme called Pedersen’s VSS, which, similarly to Feldman’s VSS scheme, is also an extension of Shamir’s Secret Sharing scheme. Its advantage over Feldman’s VSS scheme is the so-called <strong>perfect secrecy</strong> of the shared secret. Roughly speaking, the information the adversary learns of the secret is independent of the secret being shared. Such a VSS scheme is called <strong>information-theoretically secure</strong>. Alternatively, information-theoretic security is also characterized as resistance against computationally unbounded (i.e., having “infinite” computing power) attackers. The price paid for this improvement is an <strong>increased overall computational complexity of the protocol</strong>.</p><p>Gennaro et al.’s DKG protocol uses an <strong>additional</strong> <strong>parameter <em>h</em> from the subgroup generated by <em>g</em></strong>.</p><p>The core structure of the two protocols (Gennaro et al.’s and Joint Feldman’s) are the same, therefore, we will only emphasize the relevant differences.</p><h4>Pedersen’s VSS scheme</h4><p><strong>Broadcast step</strong></p><p>This time the dealer generates two random degree <em>t</em> polynomials <em>f₁(X)</em> and <em>f₂(X)</em> with<em> f₁(0) = σ</em> being the dealer’s secret. Explicitly : <em>f₁(X) = aₜ Xᵗ + … + a₁X + a₀</em> and <em>f₂(X) = bₜ Xᵗ + … + b₁X +b₀</em>. The dealer then privately sends to each party <em>Pᵢ </em>(for <em>i=1, …, n</em>) the elements</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*tFYYGPBfi7KaLJ8JhxdGnw.png" /></figure><p>Such elements are called the secret key shares of <em>Pᵢ</em>. The commitments are now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*-n7VhRtNpxMXqU633BKXoQ.png" /></figure><p><strong>Verification step</strong></p><p>Each party <em>Pᵢ</em> performs the following verification check, which will hold if the dealer has been honest:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*NWd7QfuYIxOJwZwiyIXtPA.png" /></figure><p>Besides that, the verification process is the same: the issuing of complaints, the dealer publishing the conflicting shares, and the eventual disqualifying of the dealer.</p><p><strong>Key recovery step</strong></p><p>This step is almost identical to the reconstruction step in Feldman’s VSS scheme: if the dealer is not disqualified, any <em>t +1</em> honest parties can use their shares to reconstruct the secret. One may also use the commitments to verify the revealed shares <em>sᵢ</em>, in which case each party must also reveal <em>šᵢ</em>.</p><h4>Gennaro et al.’s DKG protocol</h4><p>For the most part, Gennaro et al.’s DKG protocol proceeds in the same way as the JF DKG protocol, using Pedersen’s VSS scheme instead of Feldman’s. Next, we outline some of the main differences. As in the JF DKG protocol, the public key is defined as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*vuKDMlBSFOkeDUsFL53aUg.png" /></figure><p>However, if one just follows the JF DKG protocol using Pedersen’s VSS scheme instead of Feldman’s, one sees that <em>pk</em> cannot be computed by all parties, since the values</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*I1l-X2KYszTphkZSImgbIw.png" /></figure><p>are never committed. Indeed, as we have seen, Pedersen’s VSS scheme commits values of the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*STzPqvYsFs2G_OarRdb6jw.png" /></figure><p>For this reason, Gennaro et al.’s DKG protocol adds an extra step where each party <em>Pᵢ</em> also commits the values</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*TzsuQ9IlGMFKzGeiuYfAwg.png" /></figure><p>At this point, we need to look out for parties that have been honest throughout the protocol, except at the point of committing the values appearing in <em>(4). </em>To this end, for each party <em>Pᵢ</em>, every other party <em>Pⱼ</em> verifies whether or not the following holds:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*QbXu8J4hWK4yzmjN84ZVnQ.png" /></figure><p>where sᵢⱼ is the share of <em>Pᵢ</em>’s secret that <em>Pᵢ</em> sent to <em>Pⱼ</em>. We will leave you with this as an exercise: if <em>Pᵢ</em> has been honest, then the equation holds :)</p><p>Now, for each party <em>Pᵢ</em> that fails this check, but that passed all previous checks, the rest of the parties <em>Pⱼ</em> uses polynomial interpolation to recover <em>Pᵢ</em>’s secret, namely the value aᵢ₀, and then computes vᵢ₀. This can be done because there are at least <em>t+1</em> honest parties, and each such party <em>Pⱼ</em> knows the value<em> fᵢ(j)</em> (mod <em>p</em>).</p><p>The increased commitment size, as well as the additional verification and reconstruction steps, make this protocol more expensive (in terms of storage, computation, and communication) than its JF DKG counterpart.</p><h3>Other directions to explore</h3><p>A line of DKG protocols we have not explored uses so-called bilinear pairings on cyclic elliptic curve groups. The intricacies of these are beyond the scope of the post, and we refer to <a href="https://cacr.uwaterloo.ca/techreports/2007/cacr2007-33.pdf">this protocol due to Kate and Goldberg (2007)</a> for further details.</p><p>In the VSS schemes we have seen, notice how the dealer needs to compute as many commitments as the degree of the polynomials chosen plus one. This means that the number of commitments is roughly <em>n/2</em> per party, or, more technically, 𝒪<em>(n)</em>. This is because we operate under the assumption of <em>t &lt; n/2</em> Byzantine parties, and so in theory choosing polynomials of degree <em>t </em>should suffice. But in general, one cannot know in advance the exact number <em>t. </em>For maximum security and optimal efficiency, one should therefore choose polynomials of degree ⌊ <em>n/2</em>⌋ (the “floor” of <em>n/2)</em>. The <a href="https://uwspace.uwaterloo.ca/bitstream/handle/10012/5285/Thesis.pdf?sequence=1">eVSS (2010</a>) and <a href="https://people.csail.mit.edu/devadas/pubs/scalable_thresh.pdf">AMT (2020)</a> DKG protocols address this efficiency issue, having a constant number of commitments per party, no matter the value of <em>n</em> (i.e., the number of commitments is reduced from 𝒪<em>(n)</em> to 𝒪<em>(1)</em>). This is done by combining bilinear pairings on finite groups with the so-called KZG polynomial commitment scheme.</p><p>Recent protocols, such as <a href="https://www.notion.so/A-tour-of-Verifiable-Secret-Sharing-schemes-and-Distributed-Key-Generation-protocols-39d39b7db13148a0b9711565541ce10f">this protocol due to Groth (2021)</a>, remove the interaction between the parties. Each dealer creates and publishes dealings (which contain shares and other commitment information) without interacting with other participants. Each receiver can verify whether a dealing is correct without interaction with other participants. To this end, non-interactive zero-knowledge proofs (NIZKs) are used to ensure that each dealing is correct. Since anybody can verify the NIZK proof, this means the dealings are publicly verifiable, and everybody will agree on whether a dealing is valid or not.</p><h3>Conclusion</h3><p>This is the second post in our series explaining Distributed Validator Technology. We have introduced the two most common DKG protocols, which are a central cryptographic primitive of DVT and Threshold Signature Schemes, and we have shown how they are built on top of the concept of Verifiable Secret Sharing. Furthermore, we have briefly referenced more sophisticated DKG protocols.</p><p>Stay tuned for the following posts in the series!</p><ul><li><strong>Post 3 </strong>(the next post): Consensus protocols</li><li><strong>Post 4</strong>: Threshold Signature Schemes</li></ul><h3>References</h3><ul><li>Villalobos, I., Garreta, A., <em>Sorting out Distributed Validator Technology</em> (first post in this series): <a href="https://medium.com/nethermind-eth/sorting-out-distributed-validator-technology-a6f8ca1bbce3">https://medium.com/nethermind-eth/sorting-out-distributed-validator-technology-a6f8ca1bbce3</a></li><li>Zajac, M., <em>Secret sharing for Sharing Mnemonics, Part I</em>: <a href="https://medium.com/nethermind-eth/using-shamirs-secret-sharing-to-share-mnemonics-c40429835117">https://medium.com/nethermind-eth/using-shamirs-secret-sharing-to-share-mnemonics-c40429835117</a></li><li>Zajac, M., Sen, U., <em>Secret sharing for Sharing Mnemonics, Part II</em>: <a href="https://medium.com/nethermind-eth/secret-sharing-for-sharing-mnemonics-part-ii-d76dc1581681">https://medium.com/nethermind-eth/secret-sharing-for-sharing-mnemonics-part-ii-d76dc1581681</a></li><li>Desmedt, Y., Frankel, Y. (1992). Shared generation of authenticators and signatures. In: Feigenbaum, J. (eds) Advances in Cryptology — CRYPTO ’91. CRYPTO 1991. Lecture Notes in Computer Science, vol 576. Springer, Berlin, Heidelberg. <a href="https://doi.org/10.1007/3-540-46766-1_37">https://doi.org/10.1007/3-540-46766-1_37</a></li><li>Pedersen, T.P., <em>A Threshold Cryptosystem without a Trusted Party</em>. Advances in Cryptology — EUROCRYPT 1991. Lecture Notes in Computer Science. <a href="https://link.springer.com/chapter/10.1007/3-540-46416-6_47">https://link.springer.com/chapter/10.1007/3-540-46416-6_47</a></li><li>Gennaro, R., Jarecki, S., Krawczyk, H. et al. <em>Secure Distributed Key Generation for Discrete-Log Based Cryptosystems</em>. J Cryptology, 2007. <a href="https://link.springer.com/article/10.1007/s00145-006-0347-3">https://link.springer.com/article/10.1007/s00145-006-0347-3</a></li><li>Feldman, P., <em>A practical scheme for non-interactive verifiable secret sharing</em>. 28th Annual Symposium on Foundations of Computer Science, 1987. <a href="https://ieeexplore.ieee.org/document/4568297">https://ieeexplore.ieee.org/document/4568297</a></li><li>Pedersen, T.P., <em>Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing</em>. Advances in Cryptology — CRYPTO 1991. Lecture Notes in Computer Science. <a href="https://link.springer.com/chapter/10.1007/3-540-46766-1_9">https://link.springer.com/chapter/10.1007/3-540-46766-1_9</a></li><li>Kate, A., Goldberg, I., <em>Asynchronous Distributed Private-Key Generators for Identity-Based Cryptography</em>. Cryptology e-Print archive, 2009. <a href="https://eprint.iacr.org/2009/355">https://eprint.iacr.org/2009/355</a></li><li>Boneh, D., Lynn, B. &amp; Shacham, H., <em>Short Signatures from the Weil Pairing</em>. J Cryptology, 2004. <a href="https://link.springer.com/article/10.1007/s00145-004-0314-9">https://link.springer.com/article/10.1007/s00145-004-0314-9</a></li><li>Gurkan, K. et al. <em>Aggregatable Distributed Key Generation</em>. Cryptology e-Print archive, 2021. <a href="https://eprint.iacr.org/2021/005">https://eprint.iacr.org/2021/005</a></li><li>Joux, A., Nguyen, K. <em>Separating Decision Diffie-Hellman from Computational Diffie-Hellman in Cryptographic Groups</em>. <em>J</em>ournal of Cryptology, 2003. <a href="https://link.springer.com/article/10.1007/s00145-003-0052-4">https://link.springer.com/article/10.1007/s00145-003-0052-4</a></li><li>Kate, A. <em>Distributed Key Generation and Its Applications</em>. <a href="https://uwspace.uwaterloo.ca/bitstream/handle/10012/5285/Thesis.pdf?sequence=1">https://uwspace.uwaterloo.ca/bitstream/handle/10012/5285/Thesis.pdf?sequence=1</a></li><li>Tomescu, A. et al. <em>Towards Scalable Threshold Cryptosystems</em>. IEEE Symposium on Security and Privacy (SP), 2020. <a href="https://people.csail.mit.edu/devadas/pubs/scalable_thresh.pdf">https://people.csail.mit.edu/devadas/pubs/scalable_thresh.pdf</a></li><li>Groth, J. <em>Non-interactive distributed key generation and key resharing.</em> Cryptology e-Print archive, 2021. <a href="https://eprint.iacr.org/2021/339.pdf">https://eprint.iacr.org/2021/339.pdf</a></li></ul><p><em>Nethermind is a team of world-class builders and researchers. We empower enterprises and developers worldwide to access and build upon the decentralized web. Our work touches every part of the Web3 ecosystem, from our Nethermind node to fundamental cryptography research and application-layer protocol development. We’re always looking for passionate people to join us in solving Ethereum’s most difficult challenges. Are you interested? Check out our job board </em><a href="https://nethermind.io/company/">https://nethermind.io/company/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c814e0d47e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nethermind-eth/a-tour-of-verifiable-secret-sharing-schemes-and-distributed-key-generation-protocols-3c814e0d47e1">A tour of Verifiable Secret Sharing schemes and Distributed Key Generation protocols.</a> was originally published in <a href="https://medium.com/nethermind-eth">Nethermind.eth</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>