SyMPC
SyMPC copied to clipboard
Move the operations implementation in a DefaultProtcol class
Description
As we would (possibly) have more protocols that a user could choose from, we would want to also have a DefaultProtocol
in case the protocol specified by the user does not have the operation implemented.
This would work like this:
def mul (self, y) -> MPCTensor:
mul_protocol = getattr(self.session.protocol.mul, None)
if mul_protocol: # look for the operation in the protocol the user specified
return mul_protocol(self, y)
return DefaultProtocol.mul(self, y)
:arrow_up: this would keep the MPCTensor
class more clean.
Are you interested in working on this improvement yourself?
- Yes, I am.
Additional Context
This would help us split the logic of the implementation for various operations and keep them in a protocol base class.
I am interested in better understanding how SyMPC works, I would like to work on that issue. I am not sure of how to do it, so I welcome anyone that wants to help me.
@danielorihuela Sure Daniel, you can reach out to me on OM Slack channel. My username is kamathhrishi.