-
Notifications
You must be signed in to change notification settings - Fork 5
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
Delegated re-encryption requests to allow for better availability checking #17
Comments
Thanks Isaac! The idea is interesting, and as you said, it could be complex to be implemented and definitely will change the architecture of the NuCypher network. I have few comments/questions:
|
I think both approaches have advantages and disadvantages, but I would innitially target a direct connection between edge Ursulas and inner Ursulas. Moreover, those roles don't need to be static, Ursulas could take turns and the shape of the network could change every period so that all nodes in the networks contributed equally. That comes from @cygnusv and I think might be worth considering.
Yes, you are completely right. We could take a look at the Distrubuted Key Generation mechanism used by the league of entropy to see if we could adapt it to this scenario. The publicly selected challenger Ursulas would need to engage in a fair protocol to randomly select the target Ursulas.
That is the most challenging part as in any reputation system. We could opt for implementing mechanisms that disincentivize nodes producing fake information. We could also rely on another Decentralized network for monitoring, channeling all requests and responses between Ursulas through this network so that everything is logged and variable without the need of centralized monitor. |
Yup, I was not advocating for a a centralized approach. I just wanted to highlight the fact that having a decentralized monitoring approach (to avoid driving the NuCypher network toward centralization) will be a challenging issue as well. |
Another question that crossed my mind now. If we are saying that gateway Ursulas that will challenge other Ursulas will be selected at random, this means that each gateway Ursula must have a policy (or set of policies) that involve all other Ursulas in the network so she can issue challenge requests, right? Also, who will pay for these policies? the gateway Ursulas? this means that they should be refunded for that, and possibly, get rewarded for performing the routing and challenging tasks (and agreeing on the report status later on as well), what do you think? |
Well, that's not quite right. Gateways will be impersonating legit Bobs in the system, in some sense hijacking existing policies. However, there is no harm to actual Bobs as the fragments are only useful to Bob, who has the corresponding private key. The challenges for this gateways are, on the one hand to know which policies are hold by which Ursulas and on the other hand to recognize whether the fragments are correct or just random data.
In case we want Gateway ursulas to also impersonate Alicies, they would need to create fake policies, so we need to face this problem anyway. In my opinion the challenging ursulas should receive a higher reward that should at least cover the cost of the fake policies issued. |
One interesting thought here related to the above questions and the challenge mechanism in general: We can have a side chain with the gateway Ursulas as the miners who maintain this chain (add blocks to it, verify records, agree on its status, etc.). During every period, i.e., block generation time, gateway Ursulas will broadcast their findings regarding responsive/irresponsive Ursulas that they challenged. These finding are published in a block after being verified and validated (like running some consistency checks to make sure that gateway Ursulas are not lying and that they were indeed selected to do the challenge task, etc., still we need to specific what exactly that means). Then, using a Byzantine agreement-like consensus protocol, a set of gateway Ursulas are elected at random to add a new block to the side chain. Their task is to form a block, validate it, and agree on adding it to the side chain. The NuCypher main network relies on the information on the side chain to punish misbehaving Ursulas accordingly (by slashing part of their deposit). Again, we still need to figure out tons of details here, but this is kind of high level structure of the idea. |
Right, we do not require Bob to sign the requests or Ursula to check that indeed Bob is the one who issued the request, at least until now. Yeah, this works under the current network model. |
The challenging Ursulas can be seen as the validators of a side chain where verified work is registered. We could opt for having two separate roles in the NuCypher network, workers and validators or have all nodes alternate roles when selected as validators. The side chain will also provide some transparency on the performance of the nodes in the network. There are many advantages of maintaining this side chain but there is also an overhead that we might need to consider, also depending on what and how many consistency checks will validators run. Random sampling will make validation faster but we need to find a compromise in the number of validators selected for each period. Also, we need to ensure that all ursulas have some minimum number of policies even if they are fake ... As you said, tons of details are still to figure out. |
My 2 cents:
|
Three issues with this approach:
Based on our discussions on Discord, this is not a practical threat. To perform this attack, a working Ursula is online either way, and she is just trying to proceed with the pessimistic part of the protocol, which is more dangerous for her. So for a rational Ursula such an attack is not appealing.
This can be handled by requiring Bob to do some PoW in order to accept his complaint.
Impersonation can be solved by requiring Bob to sign his requests, or at least sign the complaints for now. There could be other solutions to this problem as well. |
Current mechanism for checking Ursulas availability is only based on checking that they are online but not on whether they are effectively following the protocol, i.e. providing the re-encryption service under the terms of the policies deployed in the network.
There should be some mechanism in place to assure nodes are indeed following the protocol. Ideally, the mechanisms should be decentralized, where peers agree on the performance of other peers. I like the idea of setting up a reputation system, but I am not sure whether reputation should be measured from outside clients: Alices and Bobs; or from other peers: i.e. other Ursulas, or even both of them. Anyway, it is not straight forward to implement a fair decentralized reputation system.
In my opinion Ursulas should play an active role on testing other Ursulas performance. Apart from being required to respond to Alice and Bob requests, they should also be in charge of challenging other Ursulas. That will increase Ursulas workload but will also provide a decentralized mechanism to evaluate Ursulas’ performance.
Whereas posing as an Alice is fairly simple, Ursulas will only need some allowance to create random policies, it is not clear how an Ursula can act as Bob in order to ask for re-encryptions. To begin with, the challenging Ursula should know where the re-encryption key fragments are, but I think this information in currently only known by Alice and the actual Bob. In order to avoid that limitation, we could make this information public, but that might produce some collateral effects.
My proposal is based on allowing for delegated requests between Ursulas. In this case Bobs won’t be in charge of contacting the right Ursulas, i.e. the ones with their fragments, they will instead contact any Ursula in the network based on parameters such closeness, latency or maybe lower fees. This Ursula will act as a gateway for Bob and will be in charge of finding the right Ursulas and collecting the cFrags to finally pass them to Bob. In this way, Ursulas would have to answers other Ursulas requests regularly without knowing whether it is an availability challenge or a real request originating from the actual Bob. This will allow Bob and Alice to run off chain, they don´t need to learn anything from the Nucypher Network if they use a gateway Urusla.
Ursulas would be able to assess whether:
Under some circumstances, the gateway Ursula could even combine cFrags and pass the capsule directly to Bob. If we try to implement that, when reconstructing the capsule, the gateway Ursula could check if there was a problem with any of the shares in order to identify a misbehaving Ursula, i.e. an Ursula that is providing faulty re-encryption for active policies. This is something that will need some changes in the protocol and may have some implications in the security model.
All this information could be reported to the network or stored on-chain in order to have some metrics on individual Ursulas performance. Of course, there is also the problem of falsely reporting a bad Ursula. In order to mitigate that, there should be some kind of consensus by a group of Ursulas before reporting bad behavior.
If we opt for this challenging mechanism, it is important that challengers and the targets are selected randomly using some fair and secure mechanism. An interesting approach would be to use the random beacons to select the sample (https://www.cloudflare.com/leagueofentropy/ or https://csrc.nist.gov/projects/interoperable-randomness-beacons). That would assure that all Ursulas contribute to the resilience of the network equally and that we got enough "opinions" on every Ursula in order to reach an agreement. Assuming M as a security level, for every period each target Ursula should be challenged by M randomly selected challenging Ursulas. As M grows, we get more confidence on the reports but we also get a greater load on the Nucypher network …
All these ideas will have a significant impact the network architecture, even in the token economy that might not be worth the effort. I understand it would be difficult to implement them, but I hope this issue serves as a basis for good discussions on how to improve the mechanisms to check Ursula availability and improve the nucypher network in general.
The text was updated successfully, but these errors were encountered: