View difference between Paste ID: JJJYuQtC and WkgpAtp9
SHOW: | | - or go back to the newest paste.
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.*/
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.*/
18
//actually idea 2 is really bad, it could be used to unmask txns heading to known addresses