3

In the function crypto/crypto.cpp/crypto_ops::derivation_to_scalar monero sends the output_index to tools::write_varint(end, output_index).

How does it append the output_index to derivation?

dEBRUYNE
  • 15,227
  • 17
  • 57
  • 114
adsl
  • 315
  • 1
  • 8
  • Kind of related -> https://monero.stackexchange.com/questions/10420/concatenate-in-the-monero-world/ – dEBRUYNE Nov 05 '18 at 12:36
  • 1
    In order to repruduce the amount i have tried several calculations similiar to the ones in the answer, however, i didn't get to the right answer so i am assuming the calculation is different. – adsl Nov 05 '18 at 12:53
  • end is a pointer to the area in the struct to write the varint. That struct (as binary) holds the concatenation. The first 32 bytes are the derivation and the next bytes are the output_index as a varint. – jtgrassie Nov 05 '18 at 14:06
  • @adsl if you're unable to reproduce it, you're doing it wrong. I'd recommend you start by attempting to parse existing transactions to see if you can do that successfully. – knaccc Nov 05 '18 at 15:44

0 Answers0