-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulletproof rewinding proposed (and tested) for a single range proof #329
Comments
Some questions / comments:
Generally, this seems like a very insecure / dangerous modification to make to the protocol. If you can explain the bigger-picture goal with rewinding, maybe we could suggest a more robust way to go about solving the problem. |
Hi yes, thank you for the really insightful response.
This would be the Pedersen commitment,
Yes, this is intended.
Yes, I have thought about this, but was not sure. This should definitely be made more secure, and one way could be by providing two private rewind keys, e.g.
This would be very much appreciated. The main use case has to do with wallet recovery. So a user would normally have a backup of their unique wallet seed words somewhere, but could more easily lose their entire wallet without having made any backups or only having old backups. With the wallet seed words, the unique deterministic sequence of blinding factors a wallet would produce can be replayed. However, this is not sufficient or practical for wallet recovery. One protocol that can be used in a wallet to enable recovery from Bulletproof rewinding is to derive one or more private rewind keys from the seed words and to use it in every UTXO construction. A secondary use case would be for trusted 3rd parties to identify spending, by only having access to the public rewind key and embedded extra data. |
Could the wallet not merely encrypt messages to itself somewhere? As an aside, there is no mechanism by which wallets can even observe newer higher speed chains, much less fetch historical data, but addressing that requires other solutions, like anonymous messaging schemes ala mixnets and some storage scheme. I've zero clue about this design or when aynone will really make such solutions work, but it'll be more future proof if you structure things as encrypted messages, and do not assume that wallets can find old transactions. |
This would be a use case for wallet recovery where a user did not make backups. |
Closed in favour of #335. |
Hi there,
I would like to know how open the
dalek-cryptography/bulletproofs
maintainers and community are to add Bulletproofs rewinding functionality to the crate.We use
dalek-cryptography/bulletproofs
in our project and have a need to do wallet recovery from seed values. I have implemented Bulletproof rewinding in a fork on main that is similar to what other projects have done (e.g. Grin), demonstrated from a user perspective in this test.The user calls
pub fn prove_single_with_rewind_key
instead ofpub fn prove_single
, with two additional parameters,pvt_rewind_key: &Scalar
andextra_data: &[u8; 23]
. The 23 bytesextra_data
can be any message a user wants to embed within the proof. Internally,pvt_rewind_key
is converted into a rewind nonce and a private nonce:With the Party and Dealer's algorithm:
a_blinding
is replaced byrewind_nonce
s_blinding
is replaced byXOR(rewind_nonce, merge_into_word(value, extra_data))
t_1_blinding
is replaced byprivate_nonce
t_2_blinding
is replaced byprivate_nonce
Usage:
pub fn verify_single
still works exactly as it did before.pub fn get_rewind_nonce_from_pub_key
to retrieverewind_nonce
for a specific commitment.pub fn get_private_nonce_from_pvt_key
to retrieveprivate_nonce
for a specific commitment.pub fn rewind_single_get_value_only
to rewind a proof for a given commitment, to get the value and 23 bytesextra_data
only. If the wrongrewind_nonce
is provided, garbage data will be returned.pub fn rewind_single_get_commitment_data
to rewind the proof for a given commitment, returning the value, blinding factor and 23 bytesextra_data
upon success.Thank you kindly.
The text was updated successfully, but these errors were encountered: