-
UkoeHB
Meeting 3hr
-
jeffro256[m]
<kayabanerve[m]> "Uhhhhh I think you can just..." <- Not sure this is the best solution in this scenario since everyone is always losing their wallet / deleting cache . You need some form of consistent persistence IIUC
-
kayabanerve[m]
jeffro256: I was referring to within a TX, similar to how we bind the shared key to an output index, before I understood the context
-
jeffro256[m]
Oh okay 👍🏻
-
UkoeHB
8662, 8920 ready for review
-
UkoeHB
sorry wrong channel
-
kayabanerve[m]
👋
-
UkoeHB
-
UkoeHB
1. greetings
-
UkoeHB
hello
-
sgp[m]
hello
-
vtnerd_
hi
-
rbrunner
Hello
-
jberman[m]
hello
-
UkoeHB
2. updates, what's everyone working on?
-
kayabanerve[m]
My update is simply my announcement of my work on BP+ + curve trees.
-
vtnerd_
me: p2p encryption. annoying as assumed to get into existing code, but its moving along
-
UkoeHB
me: just did monerokon. In light of kayabanerve[m]'s progress on full-chain membership proofs, I have decided to implement this crypto interface for ed25519
UkoeHB/monero #7 which is a first step to migrating the library to a new curve if necessary. After that I plan to take a 2 month hiatus from Monero work.
-
kayabanerve[m]
I'm unsure if we need such an interface.
-
kayabanerve[m]
My work on BP+ included the range proofs. Accordingly, we could keep Monero's range proofs limited to Ed25519.
-
UkoeHB
the interface makes it easier to swap between curves
-
jberman[m]
Past few weeks I worked a bit on optimization of kayabanerve 's impl + preparing for monerokon + spent some time on monero-serai. Planning to continue with full chain membership impl work, Seraphis wallet work (the production wallet scanner is still a WIP), and some monero-serai work
-
UkoeHB
kayabanerve[m]: the squashed enote model requires commitments and addresses to be on the same curve
-
kayabanerve[m]
Sure, yet if we can commit to a curve swap now, the only proofs which would be variadic would be the range proofs. The fact we have an alt impl of those ready, on each curve, voids their need to be variadic.
-
kayabanerve[m]
... eh. I have other commentary but none worth doing. I'll drop this, sorry for taking a moment of time away.
-
UkoeHB
using a curve abstraction makes it much easier to do perf comparisons and isolates crypto backend dependencies
-
kayabanerve[m]
And lets us continue development on Ed25519 now while the new curves aren't ready, which is why I realized my commentary was void, yep
-
UkoeHB
3. discussion, any research topics we should discuss today?
-
kayabanerve[m]
I wanted to inquire what info the developer community wants from me re: my work, and get a commitment to deploying Seraphis under a curve cycle, or at least, get the ball rolling on a commitment.
-
kayabanerve[m]
koe's willingness to abstract the curve sounds like it satisfies my #2 for now.
-
kayabanerve[m]
Though we need someone to actually implement the new curve. Ideally, I think @tevador, yet I'm unsure their availability/willingness.
-
UkoeHB
We either need a C interface for your library (in which case the path to deterministic builds needs to be established) or a migration to C/C++.
-
kayabanerve[m]
Sorry, for my work in total or for the curve impl I technically threw togeher
-
kayabanerve[m]
Eventually, it in total, of course. I'm just unsure the immediate discussion
-
rbrunner
I remember that at one time we had a very lively discussion in the "No Wallet Left Behind" room about interfacing with Rust
-
kayabanerve[m]
Rust can do deterministic builds. I'd prefer to keep the proof in Rust for several reasons, yet the curve and the tree itself would be natural to have in C++. We can rewrite it in C++14, yet it'll reduce the quality (and not just due to my Rust shilling) IMO.
-
rbrunner
which then at one point was dropped
-
rbrunner
Anybody remember why that was so?
-
UkoeHB
The first step is to actually integrate your work so we can evaluate it in context. That requires a C/C++ API for the curve pair and for the membership proof,.
-
rbrunner
Disappointing speed results from the crypto library in Rust that was a candidate?
-
kayabanerve[m]
I do not have a valid implementation of the curve pair. I've tested off of pasta.
-
UkoeHB
even an invalid implementation cannot be used/tested/trialed without a usable API
-
kayabanerve[m]
Hence my prior comment on needing someone to "actually implement" (though shipping pasta wouldn't be the end of the world).
-
kayabanerve[m]
Sure. So immediately, a C++ API to the membership proof. Should be feasible enough.
-
kayabanerve[m]
jberman: Any interest?
-
jberman[m]
Yep, I can take that
-
rbrunner
Does this membership proof interface with the blockchain file?
-
rbrunner
Write into it, read out of it?
-
UkoeHB
rbrunner: no
-
UkoeHB
not directly anyway
-
kayabanerve[m]
It needs the tree root and a series of generators to verify.
-
kayabanerve[m]
To prove, it needs information about the tree.
-
kayabanerve[m]
At the end of a block, we need to append to the tree.
-
rbrunner
So managing the tree will be a quite big new mass of code on the C++ side?
-
kayabanerve[m]
Eh. At end of block, take all new enotes, call append.
-
kayabanerve[m]
Then that outputs a new tree root. We check all proofs specify a valid tree root.
-
kayabanerve[m]
If we re-org, the tree needs to revert, invalidate re-orged out roots, and move on from there.
-
kayabanerve[m]
Ideally, we bind to the tree root in the header (possibly by modifying the TX merkle root to be H(TX merkle root, new tree root)), but that's not necessary. It just makes wallets a bit more secure (as nodes can't provide old tree roots if headers are checked)
-
kayabanerve[m]
The tree itself is a pretty standard merkle tree. I have an impl in Rust to build it, with batched addition. It does need to be DB-backed and support reversions though.
-
kayabanerve[m]
I believe it'd be best to rewrite in C++, the pointers in Rust would be a tad annoying and require being RC'd for safety, but it could go either way.
-
UkoeHB
is your merkle tree hash-based or addition-based?
-
kayabanerve[m]
Hash, yet Pedersen hash.
-
kayabanerve[m]
It isn't Blake2b(elem0, elem1). It's elem0 * G0 + elem1 * G1 + elem2 * G2 + elem3 * G3 for tree width
-
kayabanerve[m]
(instead of each node having 2-children, nodes have a large amount of children for perf reasons)
-
UkoeHB
ok
-
jberman[m]
I can take on implementing the tree in C++ too
-
rbrunner
Looks like you are already booked and busy at least until coming Christmas ...
-
jberman[m]
I'm thinking like Seraphis atm, we could keep everything in memory and first get to constructing and verifying txs all in memory from C++ (interfacing into the rust code). Then move to db work
-
kayabanerve[m]
rbrunner: Would you like to take up the tree? It's only a few hundred lines right now
-
UkoeHB
most of the work is managing merkle tree data flow through the library
-
kayabanerve[m]
We do have a few other developers interested in contributing, and a fully specced out issue board
-
rbrunner
New devs that did not yet work for Monero then?
-
rbrunner
Because this sure starts to sound a bit like "imperial overstretch" to me otherwise ...
-
kayabanerve[m]
(though that doesn't yet cover integration into Monero)
-
kayabanerve[m]
Seraphis can launch without curve trees, solely the curve cycle, as a compromise. I'm not in favor of it, but it's the effective bare minimum and should quash complaints about amount of dev work required.
-
rbrunner
I see. Still this very sexy new work with curve trees, Rust and whatnot seems to have quite a lure.
-
kayabanerve[m]
Though unless curve trees becomes what's blocking Seraphis, I will remain not recommending it. Only once it's shown that Seraphis is held back by CT, and we agree unacceptably long, will I switch. AFAIK, Seraphis itself is in the air on its timeline, lacking academia and auditing. Accordingly... I don't see CT as the issue right now.
-
kayabanerve[m]
(I, of course, expect some delay in moving from Grootle to CT. I just don't think it's years, or a delay worth giving up on launching with CT for. Until we have a quantization showing it is...)
-
UkoeHB
The first milestone is running perf tests in the monero code base for the new proof. After that it will be relatively easy to integrate into seraphis if appropriate.
-
rbrunner
Right now I think in smaller and more immediate terms. jberman is the dev with most experience about the existing Monero codebase right now in the wallet group
-
UkoeHB
And if we don't want to integrate, then there is no 'rewind cost' at that point.
-
UkoeHB
rbrunner: this work is necessary to properly evaluate if seraphis needs to be launched on a new elliptic curve (with or without full-chain proofs at launch)
-
kayabanerve[m]
So immediately, abstracting the curve backend and a C FFI. We also need a proper impl of one of tevador's curve...
-
kayabanerve[m]
s/curve/curves/
-
rbrunner
Like a proof of concept, in a way. Working towards that
-
jberman[m]
Adding to that^ to make the decision that Seraphis should indeed switch to a curve cycle, we'd need the protocol underlying the curve tree work approach fully vetted and understood. So whatever moves us closer toward that direction is the direction to head imo
-
kayabanerve[m]
To be clear
-
kayabanerve[m]
If we do not launch Seraphis with a curve cycle, we will either have to redo the migration, or will permanently have 2x bigger proofs, if not worse.
-
rbrunner
Dev resource allocation will be much fun for years to come :)
-
kayabanerve[m]
tevador has submitted curves with theoretic performance equivalent to Ed25519. I do not understand any proposed future without a curve cycle.
-
kayabanerve[m]
(though to be fair, those 2x bigger proofs would only be under this schema, which is currently the only known one sufficiently performant)
-
kayabanerve[m]
This also ignores all the other benefits of curve cycles which go beyond CT to better fundamental proofs and scaling in general.
-
kayabanerve[m]
If we move to Halo, a discussion for years from now, one reliant on a curve cycle, we could have every proof in a block combined into just one proof at the bottom. Each TX would only be hundreds of bytes on-chain, and verification time would greatly increase.
-
rbrunner
I acknowledge all that, and basically agree. We just can't clone ourselves 5 times to get all the dev capacity that we would ideally need,
-
rbrunner
and that should also go in somewhere into these brainstormings.
-
kayabanerve[m]
I am now officially requesting all devs focus on cloning tech so we can clone ourselves to get all the dev capacity we need /s
-
rbrunner
Yeah :)
-
hyc
just don't forget to turn off the Evil bit in your clones
-
UkoeHB
ok any final comments or topics before we close out the meeting?
-
kayabanerve[m]
I have the path forward I was hoping for :) Thanks
-
sech1
If you want to unleash someone on some unoptimizer C/C++, I could take a look
-
sech1
*unoptimized
-
UkoeHB
I'll call it here, thanks for attending everyone
-
UkoeHB
sech1: it's in rust right now
-
kayabanerve[m]
I'll still take the hands on optimizing though
-
kayabanerve[m]
:p
-
rbrunner
I think we should also watch a bit what people over at other coins will do. Maybe there will be ways to cooperate on some points.
-
rbrunner
We had people from at least 3 coins at the table in our little improvised curve tree conference in Prague
-
kayabanerve[m]
Correct. While Zano did not volunteer any work, Firo does want to collaborate.
-
kayabanerve[m]
*That is not to say they aren't worth talking with or they aren't so interested. Solely a comment on current expectations.
-
jberman[m]
Action item proposal: start getting the ball rolling on formalizing security proofs for Seraphis as a composition, so not the exact membership/range proofs. And include the ownership proof
-
jberman[m]
This seems like something we're going to need no matter what
-
jberman[m]
UkoeHB: thoughts on this/us starting the process of finding people to take this on?
-
UkoeHB
by all means, go for it :)
-
jberman[m]
Sounds good :) Could start by testing the waters with our usual suspects (veorq's company, Cypher Stack)
-
UkoeHB
kayabanerve[m]: what's the paper with that cross-chain proof you want to use for commitment migration?
-
kayabanerve[m]
-
UkoeHB
thanks
-
UkoeHB
Are you looking at <=256 bit curves? I'm trying to think how multisigs could be migrated across curves... it looks like the paper has a solution for arbitrary key transmission (section 5) but it does add complexity.
-
kayabanerve[m]
UkoeHB: 1) Yes 2) Were we not planning to recreate keys for Seraphis multisig?
-
kayabanerve[m]
Also 3) I don't believe key shares can bee moved while still being consistent to some larger key.
-
UkoeHB
Multisigs need migration since we can’t assume existing groups can perform a new account gen ceremony. For example, we can’t require all Rino users to replace their backup keys.
-
kayabanerve[m]
... hot take, yes, we can.
-
kayabanerve[m]
I don't see how Monero has promised every key will always be valid. If we're throwing out addresses, IMO, it's fine to throw out seeds if the old seed can always access funds for as long as funds are contained it, barring a break in crypto.
-
kayabanerve[m]
Especially if the seeds which are made invalid are as infrequent as multisig.
-
kayabanerve[m]
Regardless, for Monero, I'd have to review if the ECDH keys can be moved.
-
kayabanerve[m]
The issue is the various combinations of the shares sum to each other mod the curve modulus. If we change the modulus... I'm pretty sure each share recombination fundamentally changes.
-
kayabanerve[m]
If all you care about is the backup keys still pointing to the new wallet, we may be able to devise a new key gen which is deterministic to the existing key?
-
kayabanerve[m]
... right. If each participant's public keys are still known (the ones the multisig was created with), we can port those secret keys and redo the ECDH protocol from there. It'd only lose a bit of security.
-
kayabanerve[m]
If the participant created public key is no longer accessible, in whatever was backed up, we'd have to reduce them to one of their shares (and I'm unsure what the safety is on that re: bias).
-
kayabanerve[m]
Could chuck in a ZK proof to hash their secret shares to a new item, just would be expensive and annoying.
-
UkoeHB
It is only necessary to transmit keyshares to the new curve, the aggregate key does not need to be DL equivalent with the original.
-
kayabanerve[m]
The issue is that each potential re-combination will yield K1 or the original curve, yet yield Kn on the new curves, where n is the combination index AFAIK
-
kayabanerve[m]
All Kn are equivalent over the original curve's modulus, yet not over the new curve's.
-
kayabanerve[m]
So for the original curve, they yield K1, for the new curve, they yield inconsisent garbage.