Good day,

I am trying to integrate a post quantum signature scheme into the Monero codebase, first I had so many issues with key sizes and key derivations, but right now it seems to be partially working(mining works and some minor issues with transfers).

So the main issue that we are having is on transaction output keys, wherein it should have its uniqueness on every given output. We hacked our way inside, and instead of computing for the key_image we just used the public spend key of the sender and having the same tx output key on every output.

So I was thinking that this would cause alot of issues, and would defeat the the purpose of Monero's technology, so I am thinking of adding an additional field in the vout that would have a 256 bit random integer for every output, that would change the implementation of tx output key uniqueness, but instead it would be a PRNG way of verifying multiple outputs.

So I went ahead and start adding the code in,

 struct txout_to_randid
      explicit txout_to_randid() { }
      explicit txout_to_randid(const crypto::seed &_randID) : rng(_randID){ }
      crypto::seed rng;
typedef boost::variant<txout_to_script, txout_to_scripthash, txout_to_key, txout_to_randid> txout_target_v;
VARIANT_TAG(binary_archive, cryptonote::txout_to_randid, 0x3);
VARIANT_TAG(json_archive, cryptonote::txout_to_randid, "rng");
VARIANT_TAG(debug_archive, cryptonote::txout_to_randid, "rng");

And other serialization code in crypto_note_boost_serialization.h and json_object.h/cpp.

Then I solo mined offline, and when I found several blocks, the transaction still doesn't have the new field I created.

What seems to be the issue? Am I missing something?

FYI: The reason I did this is that post quantum signature schemes doesn't have the ability to create hierarchical derivations, meaning, I can't derive public keys from a given secret key, like Elliptic curves. Any suggestions are also welcome on how to approach this. :)

Thank you all.

  • 1
    Did you change the code to use your new output type or did you hope the compiler would notice that new type and think why not use it in miner txes instead of what it's currenrly doing ?
    – user36303
    Apr 18 '19 at 10:00
  • @user36303 I got it working now, I got a random number generated in the tx, I forgot to append it the construct_tx_with_key hopefully the quantum keys work now.
    – jnra
    Apr 20 '19 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.