Conversation
Previous version was naive thresholdizing
|
Didn't we want to do a threshold DH after all? I thought we'll end up with a protocol in which parties share secret key |
We never discussed it in detail, so I just finished what I had. Your idea sounds useful, I'll switch to it |
|
I'll rename the repo before merge. Not sure if we want to reserve a crates.io name before actually using this anywhere |
I usually do that, I've been in situation when a troll took crate name before we found time to publish it. Our repo is yet private, so the risk is smaller |
survived
left a comment
There was a problem hiding this comment.
The crate overall feels a bit too low-level. On one hand we have start_ecdh function, which uses round-based and key-share crates, and which is pretty intuitive, but on other hand, we have {partial_ecdh, aggregate} functions, which are quite difficult to use: one needs to manually extract necessary information from the key share, and figure out what piece of information to put to each argument (in my intuition, it may be very confusing for someone unfamiliar with MPC).
I'm not sure what the best way to improve. Possible approaches:
- Move low-level functions into separate module, for advanced users to find
- Annotate each function that it's low level, and that it's more difficult to use, and if you're unsure, please use
start_ecdh. - Change the functions so they do accept the key share or key info
|
The low-levelness and the missing examples come from one reason: we don't currently have a usage for this crate. I wrote both styles, intending to see how we're going to use it in signers (the first draft used high-level Moving lower-level functions into a separate module and documenting them as such seems like a good idea. |
We do! Asymmetric encryption! Large one on our roadmap |
|
Ah you mean that it's not currently used anywhere in the code yet. Yeah, that's true, when you write a code that uses the library, it's easier to polish the API. |
|
On other hand, current API is usable, so you can easily use partial_ecdh/aggregate functions in the prod code (no brainer for you, as you wrote it), and then it will stay the same for eternity 😅 I'd rather make them accept key-share, so we don't need to decompose key shares in prod code, and do complex input arguments manipulation |
|
Anyway, separating low-level function into separate module is a good first step. I will look after prod code so they don't get to be used there 😃 |
Signed-off-by: Denis Varlakov <denis@dfns.co>
Based on threshold BLS paper for MPC.
Docs may be improved I feel, but they already outnumber the code