-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make threshold encryption optional. #209
Comments
I started looking at this today. So far I've mostly gotten the configuration sorted out, including dynamically changing the encryption schedule (I probably need to commit some analog to What I'm having a little trouble identifying is how to handle My current plan - which is not necessarily the best idea, it just might touch the least amount of stuff - is to just directly |
Thank you for working on this issue!
I don't think so: Changing the encryption schedule doesn't need a new set of keys or any other renegotiation apart from the vote itself, so that part can be skipped.
That would only insert our proposal locally; we also need to send it to the other nodes. That happens automatically inside of
The main part that's relevant to this issue is the "Algorithm HoneyBadgerBFT" box on page 6. Note that in the code, we call ACS
There are some subtle differences between the code and the paper, so in the end it's most important to understand the |
I'll have to coordinate with him, particularly around Sorry, I wasn't clear: I know inserting into Do values in a I'll try to take some notes on what I had trouble understanding and follow up later once I actually do understand it. :) |
Exactly: Unfortunately currently Then, in non-encryption rounds, we should skip encryption and decryption and just serialize the
No, they don't. They are just dropped if they're not included in the set. |
I'm sorry about lack of time :( I made this commit on my fork pacoferre@cce8a35 and then an embarrasing fix :) pacoferre@26a0197 @logannc, don't know if you could use, perhaps you have done almost the same. Few days ago I spent a little time re-reading documentation, but no more advance :( |
This has been implemented in #288. |
Threshold encryption of batches adds a round of messages (although this could be partly ameliorated with #170) and is very CPU intensive (see amiller/HoneyBadgerBFT#9).
We could add a parameter to enable encryption only in a certain percentage of rounds, or "every n-th" round. In DHB we could even make that dynamic (#103), so that the network can adapt if censorship is suspected.
Implementation
As a first step, a new
encryption_schedule
configuration option should be added to[Dynamic]HoneyBadger[Builder]
. I'd suggest an enum with variantsAlways
,Never
andEveryNthEpoch(n)
; or should it be a tuple instead that specifies how many encrypted epochs, followed by how many unencrypted ones?HoneyBadger
then needs to decide, based on the epoch number, whether to encrypt or not, and initializeEpochState
accordingly.EpochState
needs to be updated to be able to skip the encryption and decryption steps.Let's also extend the simulation example to make the new parameter configurable there, and test whether it actually improves performance.
The second step would be to make it dynamic: We'd probably want a new
Change
variantEncryptionSchedule
. It would allow validators to vote for encryption schedule changes in the same way they vote for adding or removing validators.Once such a change has a majority, no key generation needs to be initialized. We'd just restart
HoneyBadger
with the new parameter.The text was updated successfully, but these errors were encountered: