Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
This repository was archived by the owner on May 13, 2025. It is now read-only.

What if I want to perform a two-party calculation in a situation where three-party communication has already been established? It looks like you can only restart the service #409

@mingo0117

Description

@mingo0117

For help: I have initialized a three-party computing environment by setting environment variables (os.environ and crypten.init()),parameters just like:

alice:
{
    "WORLD_SIZE": "3",
    "RANK": "0",  
    "RENDEZVOUS": "env://",
    "MASTER_ADDR": "192.168.173.173",
    "MASTER_PORT": "9003"
}
bob:
{
    "WORLD_SIZE": "3",
    "RANK": "1",  
    "RENDEZVOUS": "env://",
    "MASTER_ADDR": "192.168.173.173",
    "MASTER_PORT": "9003"
}
carol
{
    "WORLD_SIZE": "3",
    "RANK": "2",  
    "RENDEZVOUS": "env://",
    "MASTER_ADDR": "192.168.173.173",
    "MASTER_PORT": "9003"
}

It works. But now I want to use only Alice and Bob for the two-party operation, and it is clear that the original environment variables are no longer applicable. So what's the solution, other than restarting the service? I've tried crypten.uninit(), set two-party environment variables, just like:

alice:
{
    "WORLD_SIZE": "2",
    "RANK": "0",  
    "RENDEZVOUS": "env://",
    "MASTER_ADDR": "192.168.173.173",
    "MASTER_PORT": "9004"
}
bob:
{
    "WORLD_SIZE": "2",
    "RANK": "1",  
    "RENDEZVOUS": "env://",
    "MASTER_ADDR": "192.168.173.173",
    "MASTER_PORT": "9004"
}

and crypten.init(), but it still doesn't work (crypten.init() blocks).

Thx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions