Definitions and Theorems
Graph Theory
Graph: A graph is a pair where is a set of vertices and a set of edges. An edge in an undirected graph is a pair of vertices , while in a directed graph it is an ordered pair .
Incident: We say that an edge is incident on vertices and , and that and are neighbors or adjacent.
Degree: If is undirected, then the degree of a vertex is the number of edges incident to , i.e.,
A directed graph, however, has two different notions of degree due to the directions on the edges. Specifically, the in-degree of a vertex is the number of edges from other vertices to , and the out-degree is the number of edges from to other vertices.
Paths, walks and cycles: A path in a graph is a sequence of edges . In this case we say there is a path between and . We assume a path is simple, meaning are distinct.
Modular Arithmetic
Fermat’s Little Theorem: Let be a Galois Field modulo a prime . Then
where is the set of nonzero elements in .
Polynomials Over Finite Fields
Polynomial: A degree- polynomial is a function of the form:
We call the coefficients of the polynomial. A degree- polynomial is uniquely determined by its values at distinct points.
Galois Field: A Galois Field (or Finite Field) is a finite set of elements that together constitute a field.
When is prime we gain the unique property under modular arithmetic that guarantees the existence of a modular inverse for every element in the field. Thus we often work with Galois Fields modulo a prime , and denote it .
Polynomial Equivalence: Two polynomials and defined over are equivalent if:
Lagrange Interpolation Given distinct points , there exists a unique polynomial of degree at most such that for all . This polynomial can be recovered from the given points by first constructing the Lagrange basis polynomials , then using them to form a linear combination of the values to recover :
Example: Lagrange Interpolation
Recover the -degree polynomial from the points: , , and .
We first construct the Lagrange basis polynomials :
We can then recover by
The Many Applications of Polynomials
Secret Sharing
Assume we have a secret that we wish to distribute among parties such that any of them working together can recover the secret, but any less than cannot recover any information about . Polynomials provide an elegant solution to this problem.
We work over for some prime where and . To begin our secret-sharing scheme, we choose a random polynomial of degree such that . We can then distribute shares of the secret to the parties by evaluating and then sending:
That is, party receives , party receives , and so on. Any parties can recover the secret by pooling their information together ( points of ) and using Lagrange Interpolation to recover . They can then evaluate to learn the secret .
Reed-Solomon Codes
Reed-Solomon Codes are a class of error-correcting codes that are widely used in digital communication systems to protect against the loss or corruption of data packets. They are based on the theory of polynomials over Galois Fields modulo a prime .
Erasure Errors
Say we have a message we wish to transmit along a wire that is prone to drop packets. Denote this message , where each packet is represented as a value in . (Note: each packet contains a header that indicates its position in the message; that is, the recipient can deduce exactly which packets were lost during transmission).
We want to guard against the possibility of there being at most errors (dropped packets). We can do this by constructing a polynomial of degree such that
If there were no errors, then we could simply send points along the wire. However, if there are up to errors, we need to send an additional redundant points to help recover the original polynomial . So in total we send evaluations of , and call it the codeword of :
Recall that, given points, you can always construct a unique polynomial of degree that passes through all of them. Hence, even up to the case that packets are dropped, we can still recover the original polynomial since we possess points. Once we have , we can recover the dropped packets by evaluating at the missing points (which, as stated above, the recipient knows from the packet headers).
General Errors
TODO!: Explain
What if we don’t immediately know the locations of the errors? Let be the locations at which errors occured. Denote as the recipient’s evaluation of . So for all .
Error-locator Polynomial:
Crucially, observe that:
This holds at points in which no error occured since at those points ; and it is trivially true at points where errors occured since then . This is the true usefulness of the error-locator polynomial : the location of an error is guaranteed to be a root of .
Exercises
Equivalent Polynomials
Part A
Show that and are not equivalent polynomials under .
Solution
At first glance — armed with Fermat’s Little Thoerem — it may seem that should be equivalent to . However, note that FLT is stated as:
That is, is constrained to be in (a nonzero element in the Galois Field). To prove then that , it suffices to evaluate both polynomials at . Recall that we have and , so then:
This violates the property for , since
namely, , which is an element in (residue class of ) but is crucially excluded from the domain of in FLT. Hence and are not equivalent polynomials under .
Part B
Use Fermat’s Little Theorem to find a polynomial with degree strictly less than that is equivalent to over ; then find a polynomial with degree strictly less than that is equivalent to over .
Solution
Find for over .
For the first part, we reduce over using FLT. We have , so then FLT tells us that:
Meaning that any power of that is a multiple of will reduce to . We can then rewrite the exponent in terms of , since we know :
Hence, the equivalent polynomial to over with degree strictly less than is .
Find for over .
Similarly, we reduce over using Fermat’s Little Theorem. We have , so then FLT tells us that:
Meaning that we can reduce any exponent to a multiple of , since any multiple of modulo will reduce to . We reduce using this fact along with FLT:
Thus, reduces to . Multiplying by its coefficient , we get . We can similarly reduce :
To find then, we substitute these reduced terms back into :
Hence, is the equivalent polynomial to over with degree strictly less than .
Part C
In , prove that whenever has degree , it is equivalent to some polynomial with degree strictly less than .
Solution
Let , where . Define
such that
Recall from Fermat’s Little Theorem we have:
for all . So if has terms of degree , we can reduce them using:
The equivalence in then follows from the fact that every exponent can be reduced modulo using the identity . This ensures that any polynomial in with degree has an equivalent polynomial with degree strictly less than .
Secret Sharing
Part A
A secret number is required to launch a rocket, and Alice distributed the values of a degree- polynomial to a group . As usual, she chose such that . through can now gather to jointly discover the secret. However, is a malicious adversary and already knows , he wants to sabotage the scheme by making the other parties believe that the secret is in fact some fixed . How could he achieve this? In other words, what value should he report (in terms variables known in the problem, such as , , or ) in order to make the others believe that the secret is ?
Solution
The Bobs are using Lagrange interpolation to reconstruct , which is an -degree polynomial satisfying:
where are the Lagrange basis polynomials:
Since they are computing , the reconstructed secret is: . wants them to recover , so he must ensure that when they interpolate using his fake share , they obtain . The key observation is that only share is incorrect, meaning all other shares remain valid. Let’s express the reconstruction formula where share is tampered:
Rearranging for :
Since , we simplify it to , then compute:
Thus, should report:
in order to trick the group into reconstructing instead of .
Part B
Suppose an oral exam has questions created by TAs and readers. The answers are all encrypted, and we know that:
- Two TAs together should be able to access the answers.
- Three Readers together should be able to access the answers.
- One TA and one Reader should also be able to access the answers.
- One TA by themself or two Readers by themselves should not be able to access the answers. Design a secret sharing scheme to make this work.
Solution
Let and be the number of TAs and Readers that must collaborate to access the answers. According to our specification, , and . We will use the term threshold here to indicate the minimum number of points needed to interpolate the polynomial; i.e., a degree- polynomial has a threshold of (since points are required to interpolate it). Define three polynomials:
Each party is assigned shares as follows:
- Each TA receives:
- One point .
- One point .
- Each Reader receives:
- One point .
- One point .
Two TAs together can interpolate , since it is a degree- polynomial. Three Readers together can interpolate , since it is a degree- polynomial. One TA and one Reader together can interpolate , since it is a degree- polynomial. However, note that this scheme is flawed, since readers together have access to points on the degree- polynomial , which is enough to interpolate it and recover , breaking the security of our scheme.