I'd like to pay attention to core developers and the community that tests covered bulletproof
implementation of Monero core are too naive.
First, root functionality of hiding amounts should be trusted. Second, tests give a source of truth and allow the implementation of the Monero core in different languages.
Example of current test: https://github.com/monero-project/monero/blob/v0.17.1.9/tests/unit_tests/bulletproofs.cpp#L54-L61
So, the code below will pass the test.
bulletproof_PROVE() { return 'blahblah'; } bulletproof_VERIFY() { return true; }
It would be useful also to have fixtures to test on. Like it is in original cryptonote
part.
—
Background: I'm working on JS implementation of Monero core functionality https://github.com/CoinSpace/monerolib
The goal of the project: Light wallet without 12+Mb of WASM to be able send Monero transactions even from a coffee machine.
Original cryptonote
part of the code is covered by huge amount of excellent tests: https://github.com/CoinSpace/monerolib/blob/master/test/crypto-util.js Actually that tests helps to catch the bug in elliptic
library implementation https://github.com/indutny/elliptic/issues/250
But I've got stuck on bulletproof
implementation due to lack of source of truth: is code correct or not.
Some useful links:
- Bulletproofs: Short Proofs for Confidential Transactions and More http://web.stanford.edu/~buenz/pubs/bulletproofs.pdf
- Evaluation of Bulletproof Implementation https://blog.quarkslab.com/resources/2018-10-22-audit-monero-bulletproof/18-06-439-REP-monero-bulletproof-sec-assessment.pdf
- Original implementation https://github.com/monero-project/monero/blob/v0.17.1.9/src/ringct/bulletproofs.cc
- JS implementation: https://github.com/XMRWallet/Website/blob/master/src/js/monero.js#L3523
submitted by /u/mahnunchik
[link] [comments]