Mininero is a python implementation of monero. But the git repository is three years old where the latest link does not have any content. Is there any other python implementation of monero where code for LSAG and ringCT is available?
2 Answers
I've implemented the Monero transaction code signing for the Trezor in python, the code is here:
https://github.com/ph4r05/monero-agent
And MLSAG in particular: https://github.com/ph4r05/monero-agent/blob/master/monero_glue/xmr/mlsag2.py
The python implementation also contains pure-python Bulletproofs implementation.
-
Thanks. In mlsag2.py, the parameter pk of the function gen_mlsag seems to be a matrix of Edpoints. Is it true? In particular, is there any test file calling gen_mlsag?– trijiaDec 4, 2018 at 7:57
-
@trijia correct,
pubs
is the mixring matrix. I ported it mainly from the original C++ source so it should have similar interface. It is called by transaction signer:monero_glue/protocol/tsx_sign_builder.py
There are tests for the whole transaction signing process inmonero_glue_test/test_agent_lite.py
– ph4r05Dec 4, 2018 at 9:12 -
In
gen_mlsag
,join
that is used in generatingm
is not working forpk[0]
(a vector of Edpoints). It says that "expected str instance, EdPoint found".– trijiaDec 5, 2018 at 6:45 -
gen_mlsag
is old version of MLSAG, I've removed it now in the master. Better usemlsag2.prove_rct_mg_simple
which is called by thetest_agent_lite.py
– ph4r05Dec 5, 2018 at 9:53
Mininero has a python implementation of RingCT. I wouldn't rely on it being up-to-date with Monero's core implementation as if I recall correctly, it's purpose was originally a testbed of RingCT before it was implemented in Monero proper. Useful still for academic purposes nonetheless.