-
Isthmus
Multisig stuff is all out-of-band, right? Anybody working on a way to [privately] [interactively] build a multisig txn on chain?
-
UkoeHB_
Doesn't make sense afaict
-
h4sh3d[m]
I've update the protocol using the common dl proof, you can find it here:
github.com/h4sh3d/xmr-btc-atomic-sw…lob/dl-proof/whitepaper/xmr-btc.pdf
-
h4sh3d[m]
This would work if Bitcoin's opcode `OP_AND` was not disabled
-
h4sh3d[m]
Maybe we can turn around the protocol and disclose the private key share on the monero side
-
h4sh3d[m]
As I mentioned before this protocol can be implemented between ETH and XMR, with ethereum capabilities
-
zkao
h4sh3d: im convinced u have to disclose the secret key on the monero side. last night i brainstormed a bit in here:
demo.codimd.org/QqrMAAIwSNy_L6xMQtJQWQ?both
-
zkao
basically an adaptor signature in monero commits to a public key that locks the swaplock in the btc side
-
sarang
moneromooo: ph4r05 noted that replacing the list of public keys in CLSAG hash inputs with a hash of the lists is better in the event that ring size scales significantly, so I might proactively change this
-
sarang
I don't expect such an increase, but it might reduce the necessary workload in the future if it were to happen
-
sarang
Any particular opinion on this?
-
sarang
It could also be worked into the prehash routine too, committing all keys as part of the signature message
-
sarang
As long as there's some commitment to keys somewhere, it should be fine
-
sarang
Hmm in fact, if the MLSAG prehash routine already includes all public keys and the commitment offset, we could remove the key data from the CLSAG signing routine altogether; it isn't clear if this is already happening
-
sarang
If it is, the key addition to the CLSAG round hashes is redundant!
-
» sarang will investigate
-
moneromooo
If it's new code anyway, might as well use the version that's an improvement, even if only slight.
-
moneromooo
Assuming it's not much more complicated than the one it replaces.
-
sarang
At worst, a single extra two-line device-specific function
-
sarang
really more for future-proofing
-
UkoeHB_
Ah yeah the message signed is 'all tx data except the signature itself'. Although it's the key offsets not keys directly
-
sarang
What should be included are the output keys, the commitment keys, and the pseudo-out commitments
-
sarang
which can be used to construct the actual keys that go into the signature
-
sarang
If that's what you mean UkoeHB_
-
sarang
CLSAG only requires the offset keys (one of which is a comm. to zero), but the transaction should include the actual keys used to construct these sets-to-zero
-
sarang
And since you can derive the sets-to-zero from the original keys and pseudo-out commitments, the latter is fine
-
UkoeHB_
The message signed by MLSAGS is all data contained in a tx (except the MLSAG themselves). Tx store 'key offsets' which are the block chain indices for all ring members. The one-time addresses for those ring members are not signed
-
sarang
That poses an interesting conundrum about the relationship between offsets and keys
-
UkoeHB_
How so?
-
sarang
If the verifier has a different chain view than the prover did, then the offsets need not correspond to the proper keys anyway
-
UkoeHB_
It's an offset since indices are stored as relative offsets or each other
-
sarang
No, I get that
-
sarang
But I mean that the verifier is obtaining one-time keys from the offsets and their view of the chain anyway
-
UkoeHB_
Well the point of a chain is consensus. If they don't have the same view it's a big problem already right?
-
sarang
Yeah, but I'm trying to think through the consequences of different views when it comes to the signature itself
-
sarang
Since the verifier has to get the keys from the offsets anyway, from its perspective there's a 1-1 correspondence between offsets and keys anyway
-
sarang
and it has no other way (besides signature success) to know if that's the same view the prover had anyway
-
UkoeHB_
Sounds right
-
sarang
Meaning that I think this means it is safe to use only the MLSAG prehash message in the CLSAG round hashes, and not the added key lists obtained from the offsets
-
sarang
Since the signature message includes commitments to the offsets for the keys
-
sarang
UkoeHB_: does this seem reasonable to you as well?
-
sarang
e.g. CLSAG round hashes change from `hash(message,list_of_keys,signature_stuff)` to `hash(message,signature_stuff)`
-
UkoeHB_
Well I don't really understand what you gain from key prefixing in the first place
-
sarang
It means the prover can't produce signature data and select keys later in an attempt to game the construction
-
sarang
Committing to them assures the verifier that the prover knew the keys it was using in advance
-
sarang
(or could break the hash function, which we assume is not possible)
-
UkoeHB_
Well sure they could in your case. Just make a signature ahead of time, then put the keys you want at those indices
-
UkoeHB_
Not trivial, not impossible
-
sarang
Right, but in this case the offsets are what are used for the lookups
-
sarang
What would be better is including the keys, so the verifier knows it has the keys that the prover used
-
sarang
but in this case, the offsets are the only things used to obtain the keys in the first place
-
sarang
So "key prefixing" now means "offset prefixing"
-
UkoeHB_
Yeah but you could make it look up a future key that hasn't been added to chain yet, then later on fill that index after your signature is done
-
sarang
and the best we can do is assume the prover can't also game the chain structure too much
-
UkoeHB_
Then publish the signature in the end
-
sarang
Right, I agree that using only offsets has downsides
-
sarang
but I want to assure that we do the best we can given the way lookups happen
-
sarang
which would be index prefixing
-
UkoeHB_
Index prefixing already happens. The question seems to be whether to remove key prefixing
-
sarang
Given that at best, indices and keys always correspond, and at worst, the prover can select a key after the fact (and that the verifier can't detect this anyway as long as lookups happen), there is no advantage to key prefixing in addition to index
-
sarang
^ is what I claim
-
sarang
But only because all verifier lookups happen by index
-
sarang
and therefore, key prefixing adds no additional security
-
UkoeHB_
I'm not sure how different that is from non-key prefixing in the normal case. Say you make a signature, no key prefixing. The verifier must learn a public key that makes the sig work, which he presumably learns from you. It would be the same if the signature included an index in its message (i = 1) and then told to find the public key in some table at that index. Which you filled in!
-
sarang
Basically. But the use of an index on the chain at least means that the prover could influence block packing
-
UkoeHB_
Well I'm trying to say that index prefixing doesn't really address the purpose of key prefixing, as I understand it
-
sarang
IMO it is an attempt at a partial incomplete solution, given the structure of the chain
-
UkoeHB_
Since key prefixing means the key was determined before the signature got made
-
sarang
Better than not including it, but not as ideal as removing index lookups altogether
-
sarang
If the prover can't directly influence block packing, then it's essentially key prefixing
-
sarang
if the prover can influence it enough, then it isn't sufficient
-
UkoeHB_
But he certainly can, or can with some probability
-
UkoeHB_
Anyone can make tx or mine blocks
-
sarang
Yes, this assumes the probability is low enough compared to the added complexity of having index prefixing
-
sarang
I am _not_ saying that index prefixing is equivalent to key prefixing in general
-
sarang
but I _am_ saying that statistically it's better than doing no prefixing
-
sarang
and since it's computationally trivial, might as well include it
-
UkoeHB_
Is there added complexity? It is directly included in the signed message already as the tx blob. More complex to remove it I think!
-
sarang
it = what?
-
sarang
the existing indexing, or the round-hash keys?
-
UkoeHB_
Key offsets (indices)
-
sarang
I think I'm being confusing here... I think that because the indexes are already included (and don't really cost much of anything), and because adding round-hash keys doesn't improve security at all, the best solution given the current setup is to remove the round-hash keys and rely instead on the prehash indices
-
sarang
So my proposal is to remove round-hash keys
-
sarang
(which has the added advantage of simplifying things for trezor/ledger, presumably)
-
UkoeHB_
Adding round-hash keys doesn't improve severity at all?
-
sarang
No
-
sarang
because they come from the index lookups anyway
-
sarang
they aren't included in the prover's committed transaction data
-
sarang
or rather, not in a way that's separately verified by the verifier
-
UkoeHB_
Hmm this goes back to my earlier argument that indices aren't equivalent to keys, since the keys can be set after the sig is done
-
sarang
Well, there are 2 possibilities
-
sarang
1. The prover cannot influence block packing
-
sarang
In this case, the indices and keys are equivalent, security-wise
-
sarang
Right?
-
UkoeHB_
Seems that way
-
sarang
2. The prover can influence what public key appears at a given index
-
sarang
In this case, it can select the index, generate the signature, and later pack a malicious public key at that index
-
UkoeHB_
Agreed
-
sarang
The verifier will use the index to look up its view of the public key at that index, and include it
-
sarang
It will find the key that the prover maliciously included
-
sarang
Hmm but this discounts that if the prover does this, the inclusion of the key in the round hash at least means that the signature fails both if the index-key combination is invalid (i.e. the block packing failed) or if the prover did not try to set the malicious key beforehand...
-
sarang
I think I get the case you mean here UkoeHB_
-
sarang
An easy fix that's trezor/ledger-friendly is to include a hash of all the pubkeys, then, in the round hash
-
sarang
Meaning they don't need to all be passed to the devices
-
sarang
This is also simpler than modifying mlsag_prehash to a new clsag_prehash
-
sarang
Really depends on whether it's assumed that the prover can influence block packing with high enough probability
-
UkoeHB_
It's definitely way higher chance than solving dlp
-
sarang
Oh, for sure
-
sarang
(we hope!)
-
UkoeHB_
Doesn't seem like it's worth taking any risks
-
sarang
From my talks with ph4r05, the current ring size means passing the keys directly to the device isn't a problem
-
sarang
but would be for much larger ring sizes
-
sarang
so doing a key hash is future-proofing, if it's needed at all (CLSAG doesn't support large ring sizes well anyway)
-
sarang
If/when the project moves to an epoch-based next-gen protocol, I think it will be important to include both epoch index references and at least truncated hashes of epoch keys
-
sarang
This would also help to mitigate possible shenanigans from malicious remote nodes, since the client could cache epoch hashes and check the keys it receives from its remote node
-
sarang
(assuming that the original sync is valid)
-
UkoeHB_
Sounds good to me 😄