-
knaccc
UkoeHB_ if i understand correctly, the view tag concept is essentially that one scalarmultbase can be saved per output scanned, 255 out of 256 times?
-
knaccc
that's very cool
-
knaccc
i like everything in your issue #6456, with just the exception that the janus mitigation requires knowledge of the private view key. i think making the janus mitigation work with view-only wallets should be a design goal
-
knaccc
s/knowledge of the private view key/knowledge of the private spend key
-
monerobux
knaccc meant to say: i like everything in your issue #6456, with just the exception that the janus mitigation requires knowledge of the private spend key. i think making the janus mitigation work with view-only wallets should be a design goal
-
knaccc
also, for the record, i'd be in favor of eliminating encrypted payment ids
-
knaccc
and thus i'd be in favor of leaving them in txextra and not putting them into the new tx_supplement, and then hopefully they will be used less and less until not used at all
-
UkoeHB_
Ah I see a question. The 48-byte method seems to require using a secret subaddress for change outputs. However, in the future I imagine needing to do audits will be fairly widespread. Based on the framework I laid out in ZtM2 ch8 (section 8.2), the only way to do an audit is for the auditor to know the auditee's addresses and subaddresses. Note the framework includes InProofs, which require addresses
-
UkoeHB_
A solution might be a spend-wallet/view-wallet hierarchy, where the view wallet has access to the chain, and then talks to the spend wallet for importing key images (to identify change outputs). The view wallet would need to send info to the spend wallet to get key images, so it could just send the information to perform Janus tests too, a point in favor of Janus base key method. However, a view wallet
-
UkoeHB_
would only talk to a spend wallet periodically, so its set of key images would always be older than new outputs being discovered. In that case, with 48-byte proofs you could do a Janus test sooner on non-change outputs, a Janus test on change outputs up to the block height with known key images, and then leave the remainder change outputs as 'tentative change outputs' pending a refresh with the spend
-
UkoeHB_
wallet.
-
UkoeHB_
Im not sure if we want to base the design choice on that complex of a setup though
-
UkoeHB_
Hm although the auditor has to learn addresses and subaddresses.. while the point of Janus is to prevent that!
-
UkoeHB_
But an auditor would be able to use the secret change address to Janus attack subaddresses hidden from the audit
-
UkoeHB_
Regarding the change subaddress assumption.. what if someone doesn't want all their change outputs to go to the same address? It seems to have some privacy implications for advanced users.
-
UkoeHB_
One big point against Janus base key method is TxTangle wouldn't be compatible
-
knaccc
i should catch up on TxTangle, i don't know what that is
-
knaccc
good points above
-
knaccc
so either we accept that an auditor (or anyone with knowledge of the private view key) is able to janus attack a wallet
-
knaccc
or we add a janus schnorr proof on both of the 2 outs in a 2-out tx
-
knaccc
it's worth pointing out that the auditor can't gain anything from janus attacking the wallet, since all a janus attack achieves is proving that subaddresses belong to the same wallet
-
UkoeHB_
anyone who knows the private view key can calculate all subaddresses, so it isn't a concern
-
UkoeHB_
he could uncover hidden subaddresses from the same private keys
-
knaccc
right
-
knaccc
ok so great, the auditor issue isn't a concern, right?
-
UkoeHB_
auditor doesnt need to know the private view key, which is the point of the audit framework
-
UkoeHB_
so there is a small window
-
knaccc
i should read up on your auditor framework stuff
-
UkoeHB_
txtangle is in there as well, ch11
-
knaccc
what is the advantage of not simplifinh things by just giving the auditor the private view key?
-
UkoeHB_
they don't learn about future outputs you might receive
-
UkoeHB_
and don't learn key images, so can't know when current unspent outputs are spent
-
knaccc
ok so without the auditing framework, the other way to achieve the same outcome would be to simply get the auditee to switch to a new wallet/new private view key at the point where they want to cut off the auditor from seeing future transactions, until some point at which they wish to have further txs audited and where they will provide the auditor with the more recent private view key
-
UkoeHB_
yes that would work, although they would have to update all contacts with new addresses, and transfer all funds over from all subaddresses
-
knaccc
so the auditing framework is for when you only want to restrict recent transactions from an auditor until the next audit
-
UkoeHB_
right, it also means if the auditor gets compromised then your view key/key images are not compromised
-
UkoeHB_
minimizes risk
-
knaccc
interesting, ok
-
knaccc
i'll take a read of it in z2m2
-
knaccc
btw i still marvel at z2m all the time. incredbile piece of work
-
UkoeHB_
thanks :)
-
UkoeHB_
I think these are the main tradeoffs to consider:
-
UkoeHB_
1. Janus base key: +32 bytes on average, requires private spend key, not compatible with TxTangle
-
UkoeHB_
2. 48-byte Schnorr (w/ change out assumption): +48 bytes on average, view-only compatible, change assumption is not super clean/robust given design goal of view-only compatibility
-
UkoeHB_
3. 48-byte Schnorr (w/o change out assumption): +96 bytes on average, view-only compatible, no concern about change outputs
-
UkoeHB_
notes: 48-byte Schnorr is TxTangle compatible; no compromises are made on scanning time for any solution
-
knaccc
UkoeHB_ can you be specific about the change assumption not being clean/robust given design goal of view-only compatibility?
-
knaccc
is that only with reference to the auditing framework?
-
UkoeHB_
there is the auditing scenario, and also that maybe people don't want to always use the same change address
-
knaccc
given that balances received to any subaddress in an account are generally supposed to be in a single pool, i'm struggling to see a scenario where it'd be useful to send change to a particular subaddress within an account
-
UkoeHB_
it feels too far away from the basic protocol, requiring users to use specific addresses for specific scenarios
-
UkoeHB_
a scoping problem, if you will
-
knaccc
i think i get the gist of what you mean. i see this more as just the tiniest of changes, where the change subaddress will be set to subaddress index -1 instead of subaddress index 0
-
knaccc
i'm assuming that 0 is the default change subaddress if none is specially given
-
knaccc
i'm not sure if that assumption is correct for the monero wallet
-
knaccc
i also can't think of any use cases we'd want to preserve when it comes to directing change to particular subaddresses rather than to particular accounts
-
knaccc
if when an outgoing tx is made, if outputs received to any subaddress in an account can be spent, i don't see any advantage to directing change to any particular subaddress within the account
-
knaccc
and given that we're not showing balances per-subaddress in most wallets, i don't see how it's useful to send change to a particular subaddress
-
UkoeHB_
I see what you mean, that seems a reasonable assumption. The risk with change outputs all going to the same place is when you spend them they can create heuristically significant ring loops on-chain. However, if subaddress accounts are considered separate behavioral units then that situation isn't affected by the change subaddress designation.
-
knaccc
right, *if*
-
knaccc
but we decided not to consider subaddresses within accounts as separate behavioral units
-
UkoeHB_
I mean the account itself as a unit
-
knaccc
ok i'd better clarify something just in case it wasn't clear:
-
knaccc
i didn't mean that an entire wallet would have all change sent to a particular change address
-
knaccc
i meant that for each account, there would be a change subaddress of index -1
-
knaccc
so you still have account segregation
-
UkoeHB_
Yeah I noticed that after what you said 10mins ago :p
-
knaccc
ah ok cool :)
-
knaccc
btw with the auditor framework, i guess the advantage is that you prevent the auditor from seeing future txs, but the disadvantage is that the auditee could decide to not declare 10% of the incoming txs to the auditor, and siphon off those funds to a personal account, and the auditor would be none the wiser?
-
UkoeHB_
so making a change assumption and implementing Janus would require widespread consensus about the account model
-
knaccc
right, yes wallets would have to agree
-
UkoeHB_
otherwise wallets wouldn't be interchangeable for users since Janus might get flagged in different ways
-
UkoeHB_
although I think spend enabled wallets should try to use key images to identify change outs just in case
-
knaccc
yeah if wallets for some reasons wanted to work in a different way, they could ignore the janus stuff and do things however they wanted, and it woulnd't affect anyone else
-
UkoeHB_
with the audit framework you make an inproof on all on-chain outputs
-
UkoeHB_
so none can slip through the cracks
-
knaccc
oh, so you can't just neglect to tell the auditor about certain inbound txs?
-
UkoeHB_
right
-
knaccc
ok thanks, i'll read it again, i didn't realize that
-
UkoeHB_
from a maintainability standpoint then, change assumption would be the most expensive
-
UkoeHB_
Updated main tradeoffs to consider:
-
UkoeHB_
1. Janus base key: +32 bytes on average, requires private spend key, not compatible with TxTangle
-
UkoeHB_
2. 48-byte Schnorr (w/ change out assumption): +48 bytes on average, view-only compatible, change assumption entails code maintainability costs and extra logic for identifying change outputs
-
UkoeHB_
3. 48-byte Schnorr (w/o change out assumption): +96 bytes on average, view-only compatible, no concern about change outputs
-
UkoeHB_
notes: 48-byte Schnorr is TxTangle compatible; no compromises are made on scanning time for any solution
-
knaccc
"and extra logic for identifying change outputs" <- other than just ensuring that the subaddress lookup table is generated from -1 onwards rather than from 0 onwards, what logic are you referring to?
-
UkoeHB_
well logic for spend wallets vs view-only if necessary, or logic to deal with new subaddress account schemes that might crop up
-
UkoeHB_
the other solutions, once implemented, would never need to be touched again, but the change out assumption _may_ need to get touched again
-
knaccc
what would be different with spend vs view-only?
-
UkoeHB_
a spend wallet can use key images to identify change outs
-
UkoeHB_
I guess it's 'possibly* extra logic' not guaranteed lol
-
knaccc
to be explicit: i think you're saying that if you know a change output was an output you spent yourself, you can trust it as not being a janus attack
-
UkoeHB_
right
-
knaccc
and that that test should happen regardless of whether there is a 48-byte schnorr or not
-
knaccc
i agree, i like the double check
-
knaccc
although i can imagine that is annoying for the wallet implementers
-
UkoeHB_
it's the way Janus base key method would use to identify change outs
-
UkoeHB_
since that must be spend key enabled
-
UkoeHB_
anyway
-
knaccc
since the schnorr can be checked immediately, and the key image check is something that is delayed to when key images are available for view-only wallets
-
UkoeHB_
right, it seems like a question that has no perfect/ideal answer
-
UkoeHB_
hence, the risk of maintenance and logic costs
-
knaccc
can you be explicit abotu what you mean about maintenance?
-
UkoeHB_
for example, let's say a spend wallet was implemented and used key images to identify change outs since that is most simple (or seems that way to the implementer), then they want to make it view-only capable and now have to make all new logic around identifying change outs
-
knaccc
ok i see what you mean
-
UkoeHB_
or a new kind of subaddress account scheme appears, and old wallets have to add logic to harmonize with tx made with that new scheme
-
knaccc
ooh new subaddress schemes, you're talking :)
-
knaccc
now* you're talking :)
-
UkoeHB_
the wallet ecosystem is fairly simple right now, but if Monero adoption expands too much who knows what people will do with it
-
UkoeHB_
another point against Janus base method: multisig groups can't perform Janus tests on change outs until they have computed key images for spent outs, which may be problematic for subcoalitions who did not originally make the relevant tx, since they need to collaborate with an M-size group to construct key images
-
UkoeHB_
s/perform Janus tests on/identify
-
monerobux
UkoeHB_ meant to say: another point against Janus base method: multisig groups can't identify change outs until they have computed key images for spent outs, which may be problematic for subcoalitions who did not originally make the relevant tx, since they need to collaborate with an M-size group to construct key images
-
knaccc
ooh interesting point
-
UkoeHB_
knaccc: I updated intro part 2, and proposal part 2, would you mind taking a look? anything I should add/change?
-
sarang
In your new issue?
-
UkoeHB_
yes
-
UkoeHB_
Im on the fence about which solution is best. Janus base has limitation but is small and I invented so Im biased, +48 it bugs me the idea of loose ends we can't completely tie down, and +96 might be too big.
-
knaccc
UkoeHB_ nice, thanks for writing it up
-
knaccc
couple of quick things:
-
knaccc
1. "Although, with the 48-byte Schnorr proof method there is a niche case where if both recipients are normal addresses then a 2-out tx with 1 tx pub key can work" <- it only works if the normal address recipient does not also use subaddresses, and the sender cannot know whether this is the case
-
knaccc
2. Am I correct in saying that the janus base key would require 2 txpubkeys on a 2-out tx, meaning that for the vast majority of txs (which are 2-out with one change output) the storage comparison is +64 bytes for janus base key vs +48 bytes for schnorr, since the janus base key method requires that extra txpubkey?
-
knaccc
3. that since the janus base key method requires a txpubkey per output on a 2-out tx, there are 2 variable base scalarmults for janus base key scanning s 1 variable base scalarmult required for schnorr48? so schnorr48 is twice as quick for scanning?
-
knaccc
s/s 1/vs 1
-
monerobux
knaccc meant to say: 3. that since the janus base key method requires a txpubkey per output on a 2-out tx, there are 2 variable base scalarmults for janus base key scanning vs 1 variable base scalarmult required for schnorr48? so schnorr48 is twice as quick for scanning?
-
UkoeHB_
1. two normal non-change addresses would work if you used two Schnorr proofs, one for each shared secret using the same tx pub key
-
UkoeHB_
2. with Janus base key you can also make the change out assumption, in which case only one tx pub key is necessary (constructed based on the non-change output's address)
-
UkoeHB_
3. yes if you don't make the change out assumption, Janus base key method would affect scan times
-
UkoeHB_
edited to clarify about the niche case a little
-
knaccc
1. ah sorry, i only now understood the point you were making
-
knaccc
and 2/3: ah, ok i get it, thanks
-
knaccc
the reason i had view-wallet compatibility as a primary goal was that if i were designing a system, i'd use a view-wallet for notifying me of all incoming funds and for then notifying people of successful receipt
-
knaccc
and so i wouldn't want to have to have a full-wallet to monitor incoming transactions in order to be janus-proof
-
UkoeHB_
that's a fair objective
-
knaccc
not sure if this is insane or not: you can brute force random values of alpha until the first byte of the challenge is the same as the byte that you'd otherwise have to store separately in the tx :)
-
knaccc
so a 1-byte saving per output, in exchange for an extra quarter second to generate the transaction :)
-
UkoeHB_
idk about the security implications
-
UkoeHB_
120-bit security vs 128-bit
-
UkoeHB_
why not just make the challenge hash smaller
-
knaccc
hah excellent point
-
knaccc
yeah it's a silly idea
-
knaccc
going a little too far.
-
UkoeHB_
ok I think we could do it in 80 bytes lol, a 48 byte Schnorr proof for non-change output, then 32 bytes to encode the tx private key for the change output
-
UkoeHB_
actually it would have to be 32 bytes to encode the tx author's view key, since the details around how tx pub keys are currently constructed for 2-outs precludes the tx private key being useful for this purpose (ztm2 pg 40 footnote 16)
-
UkoeHB_
it also means the 96+ version wouldn't work, i.e. 1 tx pub key but 2 schnorr proofs
-
UkoeHB_
basically you'd encode the view key with the view key, so no information leak
-
UkoeHB_
oh I wonder.. maybe you'd only need to record 16 bytes of the view key, so 64 bytes; sarang what do you think?
-
sarang
Sorry, have not been following conversation lately due to other work
-
sarang
What's up
-
UkoeHB_
so, we want a way to identify an owned output is a change output, in the name of optimizing potential Janus solutions
-
sarang
roger
-
UkoeHB_
one possibility I just thought of, would be to add an encoded scalar in chain data, e.g. the private view key Diffie-Hellman encoded with a value produced by the private view key
-
UkoeHB_
could you Diffie-Hellman just the first 16 bytes without risk?
-
sarang
Can you write out a pseudoformula for exactly what you mean, for clarity?
-
UkoeHB_
on it
-
UkoeHB_
-
UkoeHB_
H_16 is a hash function that outputs 16 bytes, which we would also use for the 48-byte Schnorr proof
-
UkoeHB_
we could alternatively key prefix with the one-time address of the change output if they were enforced to be unique like key images (they aren't currently as Isthmus pointed out)
-
UkoeHB_
that may be more compatible with how scanning works
-
sarang
OK, so the use of a truncated hash does decrease the collision resistance
-
sarang
However, I don't think that's a problem in this case
-
sarang
Since effectively an adversary would need second-preimage resistance on another private key
-
sarang
Ah, not even that
-
sarang
Standard preimage resistance
-
knaccc
interesting idea. i'm still not really sure why setting the change index to -1 is so important to avoid
-
knaccc
it just seems so simple to tell wallets to send change to subaddress -1 instead of subaddress 0
-
UkoeHB_
idk it bugs me somehow
-
UkoeHB_
anyway Ill present the different ideas and let people decide
-
UkoeHB_
using a designated change address doesn't bug me, just making it part of the basic consensus does
-
knaccc
it can't be part of consensus
-
knaccc
consensus can't detect if the correct change subaddress was used
-
UkoeHB_
well whatever the right word is, basic requirements for universal compatibility
-
knaccc
even then, failure to send change to -1 only affects janus-protection of the wallet of the person that decides to use that non-standard wallet
-
» sarang returns to coding Triptych batching
-
knaccc
hah
-
sarang
Here's a question related to batching for ya
-
sarang
Imagine you have a 2-input transaction, which is very common
-
sarang
Right now, you pick separate rings for each input and build a separate MLSAG (or CLSAG, same deal) signature on each
-
sarang
Triptych still requires a signature per input
-
sarang
But imagine that we've chosen to use 64-rings or something
-
sarang
and that you decide to use the _same_ ring for both signatures
-
sarang
Meaning both true spends are within that common ring
-
sarang
This lets you get all sorts of speedups in verification, but at the cost of changing the ring distribution somewhat
-
sarang
How good or bad is this, based on the ring size?
-
knaccc
sounds perfectly fine to me
-
sarang
You can already use cross-ring correlations to try to identify spends
-
sarang
e.g. if both spends come from the same very old block
-
knaccc
does it also save on having to create pseudo-outs when there are multiple inputs?
-
sarang
But it changes two separate 1-of-N signatures to effectively a 2-of-N
-
knaccc
i don't see how the cross-ring correlation issue is any different whether you have 2 rings or one
-
sarang
knaccc: you still use pseudo-outs, just like you do with CLSAG
-
sarang
Arcturus (the modification to Triptych) lets you get rid of them
-
sarang
I also think the use of a common ring is not a problem in practice
-
UkoeHB_
I don't see any problems with it
-
sarang
And if binning were used, it becomes helpful
-
sarang
Since outputs from the same block/txn are likely to appear in the same bin
-
knaccc
if you were going to use two inputs each with a seperate 32-ring, i'd say that's pretty much exactly equivalent to using one 65-ring with two outputs in that ring being spent
-
knaccc
so you can use exactly the same distribution
-
knaccc
just select the inputs based on what you'd do for two rings, but put those selections into a 64-ring
-
sarang
Note that Triptych works perfectly fine if you don't do this (except verification takes a hit)
-
sarang
You could do the same thing for MLSAG/CLSAG, but wouldn't see any verification benefit
-
knaccc
verification time is the main thing we care about
-
sarang
The trick is that Triptych verification reduces to a single multiscalar multiplication, so any group element reuse lets you amortize it among anything in a batch
-
sarang
MLSAG/CLSAG don't have this property
-
sarang
Right now I'm coding such a modification to Triptych in order to get real numbers on it
-
sarang
This will provide better real-world data to augment the plots I showed at the last meeting
-
knaccc
i assume the reason that CLSAG is being released is because Triptych is a long way away?
-
knaccc
as opposed to just jumping straight to Tryiptych?
-
sarang
There are still research and engineering questions to be worked out for Triptych
-
sarang
CLSAG is effectively ready to go now
-
sarang
and provides a substantial size and time benefit
-
knaccc
what is the assumed Triptych timeline?
-
knaccc
the rough guestimate
-
sarang
I do not have one
-
knaccc
ok fair enough
-
sarang
The math hasn't been peer-reviewed
-
sarang
The questions surrounding multisig engineering are still open
-
sarang
FWIW the preprint is now submitted for review, but that'll be a while
-
sarang
The deadline hasn't hit yet
-
sarang
Peer review is a very lengthy process
-
sarang
and it can't happen in parallel
-
knaccc
makes sense
-
sarang
Anyway, just thought I'd toss out that ring question, since it's an interesting one
-
UkoeHB_
as far as heuristics/analysis go, you can already assume all ring members are part of the same ring, so actually doing it changes nothing
-
sarang
Yeah, I think my underlying question was really about how/if the distribution sampling changes, depending on how you do the selection
-
knaccc
btw is surae doing ok? not seen him around here lately
-
sarang
Surae sait that he'd be only occasionally available in channels
-
sarang
s/sait/said
-
monerobux
sarang meant to say: Surae said that he'd be only occasionally available in channels
-
knaccc
so he can concentrate?
-
sarang
He's not currently under any community funding, but I know he's still been doing some research
-
sarang
(I don't want to speak for him, of course)
-
knaccc
as long as he's healthy
-
knaccc
how come he didn't put in further CCS funding requests?
-
sarang
He wanted to be able to devote time to personal and family matters
-
sarang
And I'm sure the general upheaval caused by the health pandemic did not help
-
knaccc
ouch, i hope he's ok
-
sarang
If you like, I can reach out via separate channels and see if he has anything he'd like me to pass on to this channel
-
knaccc
it'd be nice to know he's ok
-
UkoeHB_
updated with the change_tag idea; I initially thought the proposal was going to be good-to-go from the getgo, but here we are lol
-
sarang
Such is research
-
knaccc
the secret is to propose things so complicated that no one can bikeshed it :)
-
sarang
-
monerobux
[WIKIPEDIA] Hofstadter's law | "Hofstadter's law is a self-referential adage, coined by Douglas Hofstadter in his book Gödel, Escher, Bach: An Eternal Golden Braid (1979) to describe the widely experienced difficulty of accurately estimating the time it will take to complete tasks of substantial complexity:Hofstadter's Law: It always..."
-
UkoeHB_
I think there is a long road ahead before the issue gets resolved..
-
UkoeHB_
for the record, my vote is currently on the 48-byte Schnorr + 16-byte change_tag Janus mitigation; based on the limitations of the Janus base key method, sadly I must admit it looks like it will die
-
sarang
Maybe the fact that projects like Bulletproofs have basically no downsides makes it more challenging to accept that other aspects of the protocol's design absolutely do
-
UkoeHB_
would there be a reason not to go down to 8 bytes for the change_tag? it's a 2e19 domain space
-
sarang
Well, let's consider the conditions under which an adversary beats it
-
UkoeHB_
when a change_tag is included that passes validation, but in fact the user did not make the tx and the tx author did not know the private view key
-
sarang
And this occurs provided the adversary produces `y` such that `H(private_key,other_data) = y`
-
sarang
where the adversary does not know `private_key`
-
knaccc
hah yeah they'd have to flood the network with transactions like crazy to get lucky
-
UkoeHB_
right, so if H() is uniform then they must guess
-
sarang
These are effectively similar conditions to how amounts are encoded
-
sarang
but with a different risk model
-
UkoeHB_
what do you think knaccc? tastier and tastier
-
knaccc
what do i think about the change tag?
-
UkoeHB_
8 bytes!
-
knaccc
i can't see why it could possibly be worth any bytes when it's so easy to set the subaddress to -1 instead of 0
-
knaccc
perhaps you'll find a way of explaining your reluctance about that that i'll eventually understand :)
-
UkoeHB_
let me sleep on it lol
-
knaccc
here is another consideration: if you wanted to dice up an output (take a large amount output and split it up into 10 smaller outputs, so that outgoing txs aren't waiting on one another to fully confirm), then you'd have to have a change tag for every single output in a transaction
-
knaccc
so the cost is now an extra 8*num_outputs per tx, rather than just 8 bytes per tx
-
UkoeHB_
for tx with >2 outs there would be one tx pub key per output, and a separate 48-byte Schnorr for each; the change tag vs change subaddress is only relevant for 2-outs
-
knaccc
oh right, good point
-
knaccc
ok so then it's 2*8=16 bytes extra for a 2-out tx
-
UkoeHB_
wait 2*8? how?
-
knaccc
actually never mind. i was thinking that if you were simply splitting an output into two, with both outputs essentially being change outputs back to yourself, then you'd need a change tag for each
-
knaccc
but i just realised that as long as you saw that one of the two outputs had a valid change tag, you can assume the tx was created by you, so you could also trust the other of the 2 change outputs
-
UkoeHB_
yeah that would work
-
UkoeHB_
although the logic would be: first check the Schnorr proof, then if it fails check the change_tag
-
knaccc
oh lol good point, you could decide to always use a schnorr proof to apply to one ouf the 2 outputs, and a change_tag to apply to the other of the two :)
-
UkoeHB_
right, that's how tx are made now anyway afaik
-
knaccc
yeah
-
knaccc
another insane idea: if the private keys or all txpubkeys in a tx are determinstically created from a single source of randomness r, and if r was created deterministically as a hash of (private view key || lexicographically sorted key images declared in the transaction), then you could know when you were the one that created the transaction
-
knaccc
so now you can trust the change output if your recreation of the deterministic txpubkey matches
-
knaccc
s/or all/of all
-
monerobux
knaccc meant to say: another insane idea: if the private keys of all txpubkeys in a tx are determinstically created from a single source of randomness r, and if r was created deterministically as a hash of (private view key || lexicographically sorted key images declared in the transaction), then you could know when you were the one that created the transaction
-
UkoeHB_
the problem is tx pub keys are made weird sometimes with change outputs
-
UkoeHB_
so knowing the tx private key isnt enough
-
knaccc
good point
-
knaccc
but then that means you can't do the test on your change output txpubkey, but you can do the test on the other txpubkeys
-
knaccc
and that's enough
-
knaccc
that works in all situations
-
knaccc
as long as a single txpubkey can be shown to have been created with knowledge of the private view key, that proves you sent the tx
-
knaccc
oh wait i'm talking all sorts of nonsense
-
knaccc
yeah this doesn't work if the non-change outputs are destined for subaddresses
-
knaccc
because you'd need to know the destinations of those outputs, and that's not possible to know when receiving change
-
UkoeHB_
yup
-
knaccc
oooh no it actually does work i think
-
knaccc
so in a 2-out tx, the txpubkey R=sD
-
knaccc
change is Q = Hs(x*R)*G + Y
-
knaccc
so if x = Hs("change" || private view key || maybe key images here too)
-
knaccc
then you can check the change was created with knowledge of the private view key
-
knaccc
oh no i'm talking nonsense again
-
knaccc
x is the private view key in that algebra
-
knaccc
nvm :)
-
knaccc
ok more insanity:
-
knaccc
change output is Q = Hs("change_output" || private view key || R)*G + Y
-
knaccc
and that means you can use the new view tag to check whether to attempt to then multiply with G to check the output
-
knaccc
so the shared secret for change outputs is Hs("change_output" || private view key || txpubkey) instead of Hs(private view key * txpubkey)
-
knaccc
and that change output is ultra fast to calculate since there is no variable base scalarmult
-
knaccc
it does mean that when the view tag matches, you're now doing two scalarmultbases (one for the regular shared secret and one for the change output shared secret) to detect an incoming output
-
knaccc
but thanks to the view tag, that's only in a small number of cases
-
UkoeHB_
hmmm
-
UkoeHB_
seems reasonable
-
knaccc
and obviously you'd probably want to concatenate in the output index too
-
UkoeHB_
I like it! will update the issue again
-
UkoeHB_
it would also let us deprecate a bunch of complex logic in construct_tx_with_tx_key() and its friends
-
knaccc
lolll i'm surprised this isn't making your eyes bleed, or that it isn't causing mooo to chime in with threats of physical violence :)
-
knaccc
what logic are you talking about deprecating?
-
UkoeHB_
-
UkoeHB_
although.. that kind of fundamental change would probably affect LOTS of code
-
knaccc
yeah that's why i was surprised you didn't immediately hate it :)
-
knaccc
i guess it depends on how the code is written
-
UkoeHB_
it had to percolate a bit
-
knaccc
adding an extra entry to the subaddress table for -1 and then using that subaddress change sounds 2 orders of magnitude easier than messing with the shared secret derivation
-
knaccc
s/subaddress change/subaddress for change
-
monerobux
knaccc meant to say: adding an extra entry to the subaddress table for -1 and then using that subaddress for change sounds 2 orders of magnitude easier than messing with the shared secret derivation