SyMPC icon indicating copy to clipboard operation
SyMPC copied to clipboard

Move the operations implementation in a DefaultProtcol class

Open gmuraru opened this issue 3 years ago • 2 comments

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.

gmuraru avatar Jun 05 '21 14:06 gmuraru

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 avatar Jul 13 '21 20:07 danielorihuela

@danielorihuela Sure Daniel, you can reach out to me on OM Slack channel. My username is kamathhrishi.

kamathhrishi avatar Jul 14 '21 02:07 kamathhrishi