I am doing a project based on blockchain, and I found that Monero is a good candidate for my project because of its ring signature scheme.

The scenario is that I would like to create a transaction and choose a group of addresses to produce a ring signature for this transaction. However, I cannot find the method to produce a ring signature of addresses I choosed.

I am wondering is there any convenient way to achieve this goal?


The code that currently randomly selects inputs is here:


You can modify this code to instead specify your own choice of inputs.

  • I read the related code, but there is a question still confusing me. I know that Monero has changed to use Ring CT schema, which means the mixing addresses do not need to have the same amount of coin. But the source code in blockchain.cpp still query the database using the "amount" parameter. I am not sure whether this piece of source code is called in today monero's running process. – Yi Liu Apr 4 '18 at 0:29
  • @YiLiu On the blockchain, ring members are referenced by (amount, position) rather than by some other means (e.g. public key). Therefore, prior to RingCT, if you wanted to reference the 5th output that has ever existed on the blockchain with amount 3, you write (3, 5) as a ring member reference. In RingCT, all amounts are considered to be zero for the purposes of lookup and database storage. So to reference the 12345th ever RingCT output as one of your ring members in a transaction, on the blockchain you'd write in (0, 12345) as the reference. – knaccc Apr 4 '18 at 1:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.