This program can find two prime numbers from a set of given prime numbers, from which a private key can be generated that matches a given public key. Afterwards, the private key can be used to decrypt a cipher.
The special feature is that this is done in a distributed manner. This means that the program can run on several hosts simultaneously to find a solution.
- The same program is executed on all hosts.
- Within the process, a distinction is made between masters and slaves.
- The master is the process that tells the other processes (slaves) what their task is. In addition, information about the master is distributed, which is needed should a slave take over the role of the master in the future.
- Slaves provide workers that process the task assigned by the master. If a master fails, a slave becomes the master.
- The process that is the master also hosts a slave unless otherwise specified.
- To give a task into the distributed system, there is a client software.
The master must be started first. After that, slaves and clients can connect.
Requirements:
- On each server, the firewall is opened for port
2504
and2505
or as specified in--intra-port
and--client-port
for incoming TCP traffic.
In the following, the following preconditions are assumed:
- The ip of the host that the master is running on is
192.168.42.100
- The ip of the host that a slave is running on is
192.168.42.200
- Master and Slaves are on the same network:
192.168.42.0/24
No arguments are required to start a master, since the default master address ist localhost
.
The following arguments are recommended to use:
--master-address
: Use a non-localhost address, that is used by a NIC on the host
java -jar optimus-prime-rsa-v1.0-server.jar --master-address 192.168.42.100
The following arguments are required:
--master-address
: Specify the master address. Hint: This has to be an address not associated to any NIC on the host.
java -jar optimus-prime-rsa-v1.0-server.jar --master-address 192.168.42.100
Key | Description | Master-Only | Default | Required |
---|---|---|---|---|
--master-address |
defines the ip-address of the current master | false |
localhost |
false |
--master-checks-per-slice-per-worker |
defines the number of checks per slice per worker | true |
150000 |
false |
--intra-port |
defines the TCP port to use for communication between server | false |
2504 |
false |
--client-port |
defines the TCP port to use for communication with the client | false |
2505 |
false |
--workers |
defines the number of the threads that are used to crack the key | false |
<threads> - 1 |
false |
--max-slaves |
defines how many slaves can connect to the master | true |
1000 |
false |
The master must be started first. After that a client can connect.
In the following, the following preconditions are assumed:
- The master is running
- The ip of the host that the master is running on is
192.168.42.100
- Client and master are on the same network:
192.168.42.0/24
The following arguments are required:
--ip-address
: Specify an ip-address of a server of the distributed system--pub-key-rsa
: Specify the public key as BigInt--cipher
: The cipher to crack
The following arguments are recommended to use:
--primes
: Specify the primes list to use
java -jar optimus-prime-rsa-v1.0-client.jar \
--ip-address 192.168.42.100 \
--pub-key-rsa 237023640130486964288372516117459992717 \
--cipher a9fc180908ad5f60556fa42b3f76e30f48bcddfad906f312b6ca429f25cebbd0 \
--primes 10000
Key | Description | Default | Required |
---|---|---|---|
--ip-address |
ip-address of a random server | true |
|
--port |
defines the TCP port to use for communication with the system | 2505 |
false |
--pub-key-rsa |
defines the public-key to crack | true |
|
--cipher |
defines encrypted payload to decrypt | true |
|
--primes |
defines the prime list to use (100, 1000, 10000, 100000 or custom file) | 100 |
false |
- set
--workers
to0
on the master to use it for communication only.