Guest User

Stealth Payment IDs

a guest
Jun 16th, 2015
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //idea 1
  2.  
  3. var rkeys = {};
  4. rkeys = create_address(rand_32()); //for testing obviously
  5. var payID = {};
  6. payID.ID = "0e0eedd4"; //for example, 32 bit
  7. payID.sec = sc_reduce32(cn_fast_hash(payID.ID)); //not used
  8. payID.pub = sec_key_to_pub(payID.sec);
  9. var txkey = random_keypair(); //same keypair used for tx
  10. var der = generate_key_derivation(rkeys.view.pub, txkey.sec);
  11. ver realPayID = derive_public_key(der, -1, payID.pub); //this actually works, though I've no idea of any concerns
  12. //could use index > last output instead of -1
  13. //an integrated address like this would be 101 base58 characters instead of 139 now
  14.  
  15.  
  16. //idea 2
  17. /*I've decided idea 2 is not good (just using a different derivation as the paymentID), because while it's simpler and costs less, 32 bits does not create a good secret for the derivation.*/
Advertisement
Add Comment
Please, Sign In to add comment