|
|
|
# MPyC
|
|
|
|
[MPyC](https://mpyc.readthedocs.io/en/latest/cli.html) provides a powerful framework for building secure and privacy-preserving applications that can operate on sensitive data without revealing that data to any of the parties involved.
|
|
|
|
|
|
|
|
# SMPC Multilateration |
|
|
\ No newline at end of file |
|
|
|
- **\-P:** Use addr=host:port for each party. This option should be repeated m times, where m is the total number of parties in the protocol. The host and port values should be specified for each party, separated by a colon ( : ).
|
|
|
|
- **\-M:** Use m local parties. This option should be used if the parties are running on the local machine. If the -I option is not set, all m parties will be run.
|
|
|
|
- **\-I:** Set the index of the local party to i. The index should be an integer value between 0 and m-1, where m is the total number of parties. This option should be used if the parties are running on the local machine.
|
|
|
|
- **\-B:** Use port number b+i for party i. The base-port value should be specified, and the port number for each party will be base-port + i.
|
|
|
|
- **--SSL:** Enable SSL connections. By default, SSL connections are disabled (False). This option should be used if secure, encrypted connections are required between the parties.
|
|
|
|
|
|
|
|
The MPyC runtime allows command line arguments to be used to setup a network of parties.
|
|
|
|
# SMPC Multilateration
|
|
|
|
- **--config:** This option specifies the path to a configuration file. The file should contain settings for the receiver, database, and map modules. If this option is not provided, default values will be used.
|
|
|
|
- **--map:** This option specifies that the map module should be run. The map module displays a map with the location of the receiver and the positions of the other receivers used in the multilateration algorithm.
|
|
|
|
- **--receiver:** This option specifies that the receiver module should be run. The receiver module listens for signals from the other receivers and calculates the location of the receiver using the multilateration algorithm.
|
|
|
|
- **--nodb:** This option specifies that the database module should not be initialized. If this option is not provided, the database will be initialized and used by the map and receiver modules.
|
|
|
|
|
|
|
|
These command line options are parsed using the argparse module in Python. argparse provides a convenient way to specify and handle command line arguments in Python programs. The options are then passed to the main() function, which uses them to configure and run the appropriate modules.
|
|
|
|
|
|
|
|
# Example
|
|
|
|
|
|
|
|
```console
|
|
|
|
example@user:~$ python src/main.py -I0 -M2 -P addr=192.168.1.1:1234 -P addr=192.168.1.2:1235 --ssl --receiver --nodb
|
|
|
|
```
|
|
|
|
this command will run a receiver without storing values on the current machine (```--nodb```) and will read the default config file (```config.ini```) as ```--config``` has not been called. The program will require another party to run the same command with the ```-I1``` options to allow the use of this program.
|
|
|
|
|
|
|
|
This example will not work however, as the multilateration process requires >3 parties to opperate at a suitable level of accuracy. |
|
|
\ No newline at end of file |