Give \(n\) scalars \({k_i}\) and \(n\) EC points \({P_i}\), calculate \(P\) such that \[P=\sum_{i=0}^n k_i P_i\]
Let's first partition each scalar into \(m\) windows each has \(w\) bits, then \[k_i = k_{i,0} + k_{i,1} 2^{w} + ... + k_{i,(m-1)} 2^{(m-1)w}\]
You can think each scalar \(k_i\) as a bignum and representing it as a multi-precision integer with limb size \(w\).
Then we have, \[\sum_i k_i P_i = \sum_i \sum_{j=0}^{m-1} k_{i,j} 2^{jw} P_i\]
By reordering the sums, we get \[ \sum_i k_i P_i = \sum_j 2^{jw} \left( \sum_i k_{i,j} P_i \right) \\ = \sum_j 2^{jw} W_j\]
It means we can calculte the MSM for each window \(W_j\) first, then aggregate the results via \(\sum_{j=0}^{m-1} 2^{jw} W_j\)
Then, let's examine \(W_j = \sum_{i=0}^n k_{i,j} P_i\)
Because each window has \(w\) bits, \(k_{i,j}\) has a value range of \([0, 2^w-1]\). Therefore, we can put \(n\) points into \(2^w\) buckets according to the value of \(k_{i,j}\). We can first calculate \(W_j\) by,
For example, if \(w=3\) and \(n=15\), then we have \(15\) points, \(8\) buckets, such that \[W_j = 4 P_1 + 3 P_2 + 5 P_3 + 1 P_4 + 4 P_5 + 6 P_7 + 6 P_8 + 3 P_{14} + 5 P_{15} \\ = 1 P_4 + 3 (P_2+P_{14}) + 4 (P_1+P_5) + 5(P_3+P_{15}) + 6 (P_7 + P_8) \\ = 1 B_1 + 3 B_3 + 4 B_4 + 5 B_5 + 6 B_6 \]
Therefore, \[ W_j = \sum_{t=0}^{2^w-1} t B_t \]
\[P=\sum_{i=0}^n k_i P_i \\ = \sum_j 2^{jw} W_j \]
https://www.notamonadtutorial.com/multiscalar-multiplication-strategies-and-challenges/
msm
zkp
public
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.
Syncing