Skip to content

Commit e294811

Browse files
committed
fix: more details in bls post
1 parent 26f92b2 commit e294811

File tree

1 file changed

+46
-13
lines changed

1 file changed

+46
-13
lines changed

content/blog/understanding-elliptic-curves-pairings-bls-signatures.md

+46-13
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ Now that we have our group members, we need an operation to combine them. Ellipt
7474

7575
Recall that the equation for an elliptic curve is a cubic curve (polynomial order 3), so a line (order 1) will intersect it at $3 \times 1 = 3$ points.[^columbia-ums] We use this fact to define the addition of two points along the curve.
7676

77-
Let the two points we wish to add be $\mathcal{P}$ and $\mathcal{Q}$. We draw a line from $\mathcal{P}$ to $\mathcal{Q}$, and $\mathcal{R}$ is the third point that the line intersects. We set up the equation $\mathcal{P} + \mathcal{Q} + \mathcal{R} = \mathcal{O}$, where $\mathcal{O}$ is the point at infinity (and also happens to be the additive identity ≠ the origin). Solving for $\mathcal{P} + \mathcal{Q}$ gives us $\mathcal{P} + \mathcal{Q} = -\mathcal{R}$. "Negating" a point on the curve means flipping it across the x-axis. ([Here is an illustration](https://www.researchgate.net/figure/The-group-law-for-an-elliptic-curve-P-Q-R-The-points-P-and-Q-sum-to-the-point-R_fig1_23552588) of what this operation looks like in the affine plane.)
77+
Let the two points we wish to add be $\mathcal{P}$ and $\mathcal{Q}$. We draw a line from $\mathcal{P}$ to $\mathcal{Q}$, and $\mathcal{R}$ is the third point that the line intersects. We set up the equation $\mathcal{P} + \mathcal{Q} + \mathcal{R} = \mathcal{O}$, where $\mathcal{O}$ is the point at infinity (and also happens to be the additive identity ≠ the origin). Solving for $\mathcal{P} + \mathcal{Q}$ gives us $\mathcal{P} + \mathcal{Q} = -\mathcal{R}$. "Negating" a point on the curve means flipping it across the x-axis.[^negation-illustration]
78+
79+
[^negation-illustration]: [Here is an illustration](https://www.researchgate.net/figure/The-group-law-for-an-elliptic-curve-P-Q-R-The-points-P-and-Q-sum-to-the-point-R_fig1_23552588) of what this operation looks like in the affine plane.
7880

7981
[^columbia-ums]: Block, Adam. "Introduction to Elliptic Curves." Columbia Undergraduate Math Society, 2017. <https://www.math.columbia.edu/~ums/pdf/UMS%20Talk%203.pdf>.
8082

@@ -86,27 +88,42 @@ When repeatedly _adding_ an elliptic curve point to itself, there is a problem a
8688

8789
## Pairings are bilinear maps
8890

89-
A bilinear map is a function $e: \mathbf{G}_1 \times \mathbf{G}_2 \rightarrow \mathbf{G}_T$[^typenot] with the following properties:
91+
A bilinear map is a function $e: \mathbf{G}_1 \times \mathbf{G}_2 \rightarrow \mathbf{G}_T$[^typenot] that satisfies the following constraints:
9092

9193
[^typenot]: This notation indicates the type of the function. In this case, it means: the function $e$ takes two arguments, the first an element from group $\mathbf{G}_1$, and the second an element from group $\mathbf{G}_2$, and returns an element from group $\mathbf{G}_T$.
9294

95+
$$
96+
\begin{align*}
97+
X, X^\prime &\in \mathbf{G}_1 \\\\
98+
Y, Y^\prime &\in \mathbf{G}_2 \\\\
99+
a &\in \mathbb{Z}
100+
\end{align*}
101+
$$
102+
[^howtoread-vars]
103+
104+
[^howtoread-vars]: This means: "The variables $X$ and $X^\prime$ are elements of group $\mathbf{G}_1$. The variables $Y$ and $Y^\prime$ are elements of group $\mathbf{G}_2$. The variable $a$ is any integer, including zero and negatives."
105+
93106
$$
94107
\begin{align}
95-
e(x + a,y) &= e(x,y) \times e(a,y) \\\\
96-
e(x,y + a) &= e(x,y) \times e(x,a) \\\\
97-
e(ax,y) &= e(x,y)^a \\\\
98-
e(x,ay) &= e(x,y)^a \\\\
99-
e(x,y)^a \ne 1 &\leftrightarrow a \ne 0 \\\\
108+
e(X + X^\prime,Y) &= e(X,Y) \times e(X^\prime,Y) \\\\
109+
e(X,Y + Y^\prime) &= e(X,Y) \times e(X,Y^\prime) \\\\
110+
e(aX,Y) &= e(X,Y)^a \\\\
111+
e(X,aY) &= e(X,Y)^a \\\\
112+
e(X,Y)^a \ne 1 &\leftrightarrow a \ne 0
100113
\end{align}
101-
$$[^notation]
114+
$$[^notation] [^degenerate]
115+
116+
[^notation]: Note that [some sources](https://ocw.mit.edu/courses/res-18-011-algebra-i-student-notes-fall-2021/mit18_701f21_lect24.pdf) may use a different set of operations: $+$ instead of $\times$, and $\times$ instead of $ \char`\^ $. This is merely a difference in notation. I have opted to use the notation that seems to be most common in existing practical cryptography materials pertaining to ECC pairings.
117+
118+
[^degenerate]: Line (5) is a "non-degeneracy" requirement. Without it, $e(x,y) = 1$ would be a valid pairing. Since it's a useless one, we exclude it and others like it.
102119
103-
[^notation]: Note that [some sources](https://ocw.mit.edu/courses/res-18-011-algebra-i-student-notes-fall-2021/mit18_701f21_lect24.pdf) may use a different set of operations: $+$ instead of $\times$, and $\times$ instead of $ \\^{\text{ }}$. This is merely a difference in notation. I have opted to use the notation that seems to be most common in existing practical cryptography materials pertaining to ECC pairings.
120+
Lines (3) and (4) are the most interesting for our purposes.[^derivable] Simply put, **we are allowed to freely swap scalar factors between the two parameters of $e$**.
104121
105-
As it turns out, lines (3) and (4) can be derived from lines (1) and (2), but it is helpful to state them outright. For our purposes, $\mathbf{G}_1 = \mathbf{G}_2$, so we'll just call the input group $\mathbf{G}$.
122+
[^derivable]: As it turns out, lines (3) and (4) can be derived from lines (1) and (2), but it is helpful to state them outright.
106123
107124
One common example of a simple bilinear map on the integers is the function $e(x,y)=2^{xy}$.
108125
109-
An elliptic curve pairing is a bilinear map where $\mathbf{G}$ is an elliptic curve.[^pairing-def] Two such pairings are the Weil pairing and the Tate pairing.[^specific-pairings]
126+
For the remainder of this post, $\mathbf{G}_1 = \mathbf{G}_2$, so we'll just call the input group $\mathbf{G}$. An elliptic curve pairing is a bilinear map where $\mathbf{G}$ is an elliptic curve.[^pairing-def] Two such pairings are the Weil pairing and the Tate pairing.[^specific-pairings]
110127
111128
[^pairing-def]: This statement is more of an introduction of terminology than a definition. It is _far_ from complete or rigorous.
112129
@@ -118,25 +135,35 @@ The BLS signature scheme uses elliptic curve pairings[^bls-weil] to describe a s
118135
119136
[^bls-weil]: The BLS paper uses the Weil pairing.
120137
138+
A signature scheme is a means of proving that an actor is the originator (or creator, generator, approver, etc.) of a message. This involves the actor using a secret value (a "private key" or "secret key") to generate a "signature" to distribute with the message. The actor also distributes a "public key" (or "verification key") which others can use to verify that the signature was generated using the private key, which implies that the signature could only have been generated by the actor.
139+
121140
### Setup
122141
142+
Usually predetermined as part of the protocol design.
143+
123144
1. Choose elliptic curve $\mathbf{E}$ with generator $g$.
124145
2. Choose pairing function $e: \mathbf{E} \times \mathbf{E} \rightarrow \mathbf{G}_T$.
125146
126147
### Key generation
127148
149+
Performed once by the actor who plans to generate signatures.
150+
128151
1. Choose a private key, scalar $\alpha$.
129152
2. Calculate and distribute public key $p = \alpha g$.
130153
131154
### Signing
132155
156+
Performed every time the actor signs a message.
157+
133158
1. Choose message $m \in \mathbf{E}$.[^hashing]
134159
2. Calculate and distribute signature $\sigma = \alpha m$.
135160
136161
[^hashing]: If your message is not already a point on the curve (it probably isn't) then you can use a hash function to convert it.
137162
138163
### Verification
139164
165+
Performed by anyone wishing to verify the signature for a message.
166+
140167
1. Check whether $e(p, m) = e(g, \sigma)$:
141168
142169
$$
@@ -173,7 +200,13 @@ Threshold signatures (distribute $n$ keyshares, any $t < n$ of them can generate
173200
174201
### Articles
175202
176-
- [Exploring Elliptic Curve Pairings (Vitalik Buterin)](https://medium.com/@VitalikButerin/exploring-elliptic-curve-pairings-c73c1864e627)
177-
- [What Are Elliptic Curve Pairings? (Zellic)](https://www.zellic.io/blog/what-are-elliptic-curve-pairings/)
203+
- [Exploring Elliptic Curve Pairings (Vitalik Buterin)](https://medium.com/@VitalikButerin/exploring-elliptic-curve-pairings-c73c1864e627) ([archive.org](https://web.archive.org/web/20240226035801/https://medium.com/@VitalikButerin/exploring-elliptic-curve-pairings-c73c1864e627))
204+
- [What Are Elliptic Curve Pairings? (Zellic)](https://www.zellic.io/blog/what-are-elliptic-curve-pairings/) ([archive.org](https://web.archive.org/web/20240207013708/https://www.zellic.io/blog/what-are-elliptic-curve-pairings/))
205+
206+
### Books
207+
208+
- [Pairings for beginners (Craig Costello)](https://static1.squarespace.com/static/5fdbb09f31d71c1227082339/t/5ff394720493bd28278889c6/1609798774687/PairingsForBeginners.pdf) ([archive.org](https://web.archive.org/web/20240119065123/https://static1.squarespace.com/static/5fdbb09f31d71c1227082339/t/5ff394720493bd28278889c6/1609798774687/PairingsForBeginners.pdf))[^thanks-porter]
209+
210+
[^thanks-porter]: Thanks to [Porter Adams](https://www.linkedin.com/feed/update/urn:li:activity:7171725082224963584?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7171725082224963584%2C7171754572875517952%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287171754572875517952%2Curn%3Ali%3Aactivity%3A7171725082224963584%29) for this suggestion!
178211
179212
{{%bio%}}

0 commit comments

Comments
 (0)