or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
GLV Decomposition for Multi-Scalar Multiplication (MSM)
GLV Decomposition is an efficient way to calculate point scaling \(kP\). This method was originally published by Gallant, Lambert and Vanstone in 2001 [1], and was later integrated into the Bitcoin core code [2]. However, GLV Decomposition was not enabled in Bitcoin until a patent around the GLV method expired in 2020 [3].
A textbook introduction of enomorphisms of elliptic curves can be found in [4].
Problem
Given scalar \(k\) and EC point \(P\), caculate \(kP\).
Property of Enomorphism
Consider the elliptic curve over field \(\mathbb{F}_p\) \[E: y^2 = x^3 + c\\ P=(x,y) \in E\] Denote \[P' = (\beta x, y)\] If \(\beta\) is a cubic root of the base field \(\mathbb{F}_p\), i.e. \(\beta^3 \equiv 1\) (mod p), we know that \(P'\) is also a point on \(E\) since \(y_1^2 = (\beta x_1)^3 + c\) still holds.
If we can find a scalar \(\lambda\) such that \[ \lambda P = P' \\ \lambda (x, y) = (\beta x, y)\] We can use the GLV method to accerlate the calculation of \(kP\).
NOTE: On a particular elliptic curve, \(\lambda\) and \(\beta\) have to be known before GLV method can be applied, where \(\lambda\) and \(\beta\) are certain cube roots of \(1\) in their respective fields.
GLV Decomposition
We first write \(k\) in the following form \[k = k_1 + \lambda k_2 \mod n\]
where the integers \(k_1\) and \(k_2\) are of approximately half the bit length of \(k\).
Then we have, \[kP = k_1P + k_2 \lambda P\\ kP = k_1P + k_2 P'\]
Since \(k_1\) and \(k_2\) are of half the bit length of \(k\), half of the point doublings are eliminated.
The strategy is effective provided that \(k_1, k_2\) and \(P'\) can be computed efficiently. Compute \(P'\) only needs one muliplication \(\beta x_p\).
Decomposition of Scalars
An efficient algorithm for calculating \(k_1\) and \(k_2\) is listed below [4].
Algorithm: decomposition \(k = k_1 + \lambda k_2\)
Algorithm: Extended Euclidean
Implementation
Barret Reduction
A full explaination of Barret Reduction can be found here.
Reference code can be found in Yrrid's and Gregor's implementations.
Constants
Some demo python code for BLS12-381
Beta in montegomery form in Niall's code and Gregor's code
References
[1] Robert P. Gallant, Robert J. Lambert, and Scott A. Vanstone, Faster Point Multiplication on Elliptic Curves with Efficient Endomorphisms, 2001
[2] https://www.btctimes.com/news/bitcoin-upgrade-glv-enomorphism-tests-show-faster-verification
[3] https://patents.google.com/patent/US7110538B2/en
[4] Darrel Hankerson, Alfred J. Menezes, Scott Vanstone, Guide to Elliptic Curve Cryptography, 2004
[5] bls12-381/glv.go
[6] Barret Reduction
tags:
msm
zkp
public