dalek-cryptography / bulletproofs

A pure-Rust implementation of Bulletproofs using Ristretto.
MIT License
1.02k stars 216 forks source link

notes-rp.md questions/clarification #355

Open yojoe opened 2 years ago

yojoe commented 2 years ago

I have some questions in understanding the notes-rp.md documentation. Would be great if these questions could be answered or maybe the documentation could be improved.

Here are the following sections:

1. Line 77

https://github.com/dalek-cryptography/bulletproofs/blob/1a10ce1a5b87299014658770346b376a858e7691/docs/notes-rp.md?plain=1#L76-L77 The second half of this sentence is confusing: ", a vector of statements about each entry." What is meant by "about each entry"? "entry" of what?

2. Line 80

https://github.com/dalek-cryptography/bulletproofs/blob/1a10ce1a5b87299014658770346b376a858e7691/docs/notes-rp.md?plain=1#L80 There are 3 statements in total (lines 62-64) (and all of them are "statements about vectors" as written two sentences before). So which of the 3 statements are meant by each of the two vector-statements? I guess the last two are meant, but the confusing part is that even after the transformation of adding challenger y to statement 2 and 3 there are still 3 statements. How is this supposed to combine statement 2 and 3 into a single one? What's also a bit confusing is that statement 2 and 3 switch position between line 62-64 and 86-88:

https://github.com/dalek-cryptography/bulletproofs/blob/1a10ce1a5b87299014658770346b376a858e7691/docs/notes-rp.md?plain=1#L86-L88

Anyway, after line 88 we still have 3 statements. What have we achieved? Wasn't the idea to get down to 2 statements? And how can adding a random vector "challenger y" combine two statements into one? What's the math/rules behind this?

3. Linex 93 - 101

https://github.com/dalek-cryptography/bulletproofs/blob/1a10ce1a5b87299014658770346b376a858e7691/docs/notes-rp.md?plain=1#L93-L94 What is meant by "in the same way"? Previously we added a "challenger vector y" to statement 2 and 3 but still had 3 statements. Now it seems like "challenger scalar z" is added to statement 1 (in square) and to statement 2 but not statement 3 and we add the 3 statements together and end up with one. So it's definitely not "in the same way" and now the 3 statements which were previously separated by a comma are now combined into one statement by plus/addition. It would be helpful to mention the math/rules that allow this transformation. Just a little hint at least for further reading would be great.