-
TheCharlatan
atoc from what I can see the dalek libraries seem to lake of the interfaces to implement point hash properly, which is a pity, because with everyhting else it is very easy to use. I was able to implement LSAG for example within a couple of hours. I'm also working towards adding signing to monero-rs, but am trying to bundle and wrap crypto-ops.c instead.
-
TheCharlatan
s/lake of/lack/ - lol
-
atoc
TheCharlatan here are some repos sarang shared with me:
github.com/crate-crypto
-
sarang
How have you found the monero-rs work, TheCharlatan?
-
sarang
I'm trying to get better at Rust :)
-
atoc
-
atoc
I saw some other resources too, but Derek Banas is good at doing quick language tuts (typically under an hour)
-
atoc
although I would skip to 20 mins as the first 20 mins of that is pretty basic
-
koe
fun fact: you can have multiple cli wallets open concurrently
-
TheCharlatan
atoc afaik the point hash algorithm is not the same. Their MLSAG implementation uses Ristretto's hash from bytes:
github.com/crate-crypto/MLSAG/blob/master/src/transcript.rs#L57 , which is not the same as monero's.
-
TheCharlatan
sarang, don't have an opinion on it yet.
-
koe
thinking about escrowed marketplaces.. the transaction graph is a quite troublesome heuristic. I imagine nearly every single marketplace trade looks like: buyer_wallet -> [multisig_wallet, change to buyer_wallet] -> [vendor_wallet, change to buyer_wallet]. There is change in both instances since a buyer will have to over-fill the multisig wallet to
-
koe
compensate for fees and so on. If those change outputs then get spent together or close together in the buyer's transaction tree.. very obvious spend-loop will reveal real spends with high probability.
-
koe
miners, pool, escrowed marketplaces, and exchanges, all have bad heuristics
-
moneromooo
We could do a coinjoin style system. However, we hit a roadblock in that participants have to know more about each other's inputs than we're comfortable with. If you can find a way out, then this would blunt this heuristic a fair bit.
-
koe
I think it can be done without conveying any information
-
koe
basically all youre doing is taking a number of transactions and merging them into one; all that's required to hide this fact from observers is sharing some secret scalars amongst participants, which are used to mix up the commitment masks
-
moneromooo
I noticed you said "sharing some secret scalars amongst participants" :)
-
moneromooo
That seems to contradict "without conveying any information".
-
koe
they are just masks that get added or subtracted to the commitments
-
koe
conveys barely any info how about that lol
-
koe
basically it indicates which input signatures and outputs belong to each participant, that's it
-
koe
and it's only known amongst the participants
-
moneromooo
Well, that's bad, no ?
-
moneromooo
It means it gives an incentive to some creepy spy to join coinjoin groups.
-
moneromooo
And they get lots of info about real spends.
-
koe
dont bitcoin coinjoin participants already get the same info?
-
moneromooo
I don't know.
-
moneromooo
Well, they do, since they don't have ring signatures.
-
koe
there may be a way to use shared secrets so only if all other participants are malicious does the honest signer's inputs and outputs get revealed
-
koe
but if all are malicious, it's obvious anyway regardless of method
-
moneromooo
That could be enough...
-
moneromooo
If you're interested about this, there's a lot of chat about this from... I dunno, a year ago ?
-
moneromooo
I had a mostly working PoC, but I abandoned it due to this flaw.
-
koe
I can do a short writeup about my thoughts
-
moneromooo
sarang has some witty name for it IIRC, which should help grep logs if one remembers what it was...
-
moneromooo
It would be a most excellent find :)
-
» moneromooo afk
-
sarang
mojoin
-
sarang
-
sarang
The idea was to simplify things a bit by assuming limited information is passed to a designated dealer about the input/output mappings
-
sarang
It hasn't been formalized beyond that brief informal writeup
-
sarang
MLSAGs can be easily replaced with CLSAGs for this purpose
-
koe
ah trusted dealer problem, didn't think that far ahead damn
-
sarang
The dealer doesn't learn anything about signing indices though
-
koe
since you clearly own X inputs and outputs, so how the hell do you send them to others without revealing the quantity?
-
koe
another way might be arbitrary sub-coalition trees, so only pairs or small clusters of participants know the input/output groupings
-
sarang
At any rate, we never determined a way to keep everything secret from all players without some trust designation
-
sarang
koe: also note that the range proof needs to be produced collaboratively as an aggregate to avoid distinguishability
-
sarang
and that carries particular trust requirements as well
-
sarang
This is worked into the mojoin idea
-
koe
could you do some kind of 'bounce around the circle', incrementally building up the inputs and outputs but making it difficult for any small coalition to figure out the groupings?
-
koe
or maybe an n-way encryption channel that participants may anonymously submit info to? e.g. signing with a ring signature and encrypting with n-way shared secret
-
koe
obviously idk about bulletproofs, maybe there are more strict requirements
-
koe
you can hide the commitment groupings by having shared secrets between each pair of participants, then one in each pair 'adds' fractions of the share key to all their commitments, and the other in the pair 'subtracts' fractions from all their commitments
-
koe
so there is obviously a setup phase where the total # of participants are known, and each participant must create a share secret with the other and decide who will add and who will subtract
-
koe
and then the group of participants set up a non-linkable ring signature based n-way encrypted channel, and randomly submit their pieces of the transaction
-
koe
im reminded of PyBitmessage where messages are sent to a message board, and reverse traceability is hard
-
koe
the biggest problem is it could be quite slow
-
koe
if any participant is not online
-
koe
and linkable ring sigs can be used to sign components where each participant is expected to contribute a piece, perhaps the base transaction private key (to be used for all address in normal case, or Janus mitigation + subaddresses in the special case with individuals contributing the other transaction pub keys for their respective outputs)
-
koe
there would be some leakage if subaddresses are used, since any participant can test rKs for suspected recipient address (unavoidable given efficient janus method)
-
koe
ok that's enough out of me, lmk if anyone thinks this is workable (e.g. bulletproofs ??)
-
TheCharlatan
atoc there is also
github.com/cryptonote-rust/raw-crypto . However I am having a hard time trusting some of the things the author did to export it all from the monero source tree; for example some bound checks are missing now.
-
sarang
Redid the mojoin description in Markdown for easier GitHub viewing:
github.com/SarangNoether/skunkworks/blob/mojoin/mojoin.md
-
koe
hey wouldn't it be simpler to just to a range proof on the sum of output amounts instead of each one?
-
sarang
You need to know that each output is guaranteed not to be big enough to overflow
-
sarang
But to answer your question, yes, it would be simpler :)
-
koe
wouldn't it be implied? since it takes like 2^72 outputs to overflow
-
sarang
If they're of the expected amount size
-
sarang
That's the point of the proofs
-
sarang
to assure that this is in fact the case
-
koe
what am I thinking youre right
-
sarang
If one output is enormous and another is small, the sum could overflow and appear small but reasonably valid
-
sarang
but then you've broken it
-
sarang
For non-join operations, aggregate rangeproofs are super small and fast anyway
-
koe
yeah that's the whole point of range proofs from the beginning lmao.. my brain likes to jump places without looking
-
sarang
And FWIW there _is_ an MPC for Bulletproofs, but it comes with particular requirements
-
koe
anyway, is possible or not possible to collaborate on a bulletproof range proof?
-
sarang
One nice thing about the MoJoin dealer trust is that it falls into place with the Bulletproofs trust requirements
-
sarang
Yes
-
koe
yes to both? impossible!
-
sarang
?
-
sarang
oh, heh
-
sarang
Yes, it is possible to jointly construct an aggregate rangeproof without revealing private commitment data
-
koe
is that not enough for the n-way channel proposal?
-
sarang
The proof appears identical to one aggregated by only a single player
-
sarang
It takes 3 rounds and you either need full communication between all players, or dealer trust and 1-to-n communication rounds
-
sarang
I haven't found an exploit that could arise if the dealer is malicious, though
-
koe
I was thinking, you can mask how many players there are by imagining each output has its own identity
-
sarang
But the SHVZK assumption requires it for the proofs to work
-
koe
so the addition of a dealer just speeds things up?
-
sarang
Allows for simplified communication, yes
-
sarang
With no trust, it's n-to-n comms for each round
-
sarang
With trust, it's 1-to-n comms
-
koe
Ok good to know
-
sarang
One player can do the final inner product compression with no trust requirements at the end
-
sarang
The n-to-n is so each player can separately compute the F-S challenges using everyone's partial proof data
-
sarang
If you can trust the dealer to compute the challenge correctly, the dealer can just send the challenges to everyone
-
sarang
but then players can't check them
-
koe
I think dealer based mojoin is somewhat dead in the water even with the benefits, due to trust requirement. Which is evidenced by the concept getting stuck 1 year ago
-
sarang
So you lose the assumption of honest verifier
-
sarang
IIRC the original concept leaked some particular commitment data
-
sarang
Not sure exactly
-
sarang
This has the advantage of leaking only the mappings, but nothing within particular rings
-
koe
ok, Ill do a writeup with all my thoughts and indicate the dealer vs n-way approaches
-
sarang
Yeah, I'd love to hear other ideas
-
koe
will incorporate your doc suggestions as well
-
sarang
Not sure if you were here earlier, but I re-formatted that writeup in markdown
-
sarang
it rendered poorly in github
-
koe
the monerologs.net has it
-
sarang
No other changes
-
sarang
cool
-
Isthmus
What’s the limit on number of inputs? I’ve seen 1000+ before IIRC, could I make 10000-in/2-out?
-
Isthmus
Block size is limit to get on chain
-
Isthmus
But what about relay/mempool?
-
koe
Well realistically how many can you fit in a tx? It's like 700 bytes per input, and 2-in2-out is 2500 bytes, and tx max weight is 299400 bytes.
-
koe
~426
-
koe
No 800 bytes per input, ~326 max inputs
-
koe
373*
-
koe
wait max tx changed, now 149400 bytes, so 185 inputs
-
Isthmus
Consensus enforced max tx size?
-
moneromooo
~Half the block size max.
-
koe
It's half the default penalty free zone