8000 GitHub - wyy1991/Cardinality2_java: Another way to get the number of joined sets among several nodes.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wyy1991/Cardinality2_java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact: yuye.wang@yale.edu Date: Jan 2014

This project lets more than 2 peers to get the number of lines that are same within all their files, while keeping each of their files private and secured.

TCP is used for connection between nodes. Murmurhash is used for hash each line of file. PohligHellma crypto system is used for its communitive encryption property.

How to run:

  1. The the files we are going to read in is in src folder, like "A.txt" Go to bin folder were .class files exist. Open terminal.

  2. Open one server node: java Cardinality2 server Open 3 or more nodes: java Cardinality2, you will read the nodes' IP address and the assigned node name "A","B","C", etc.

  3. For each node enter the ip address of its previous node (in form X.X.X.X:XXXX, use ":" to separate ip and port, no space allowed). For example, if node A's next node is node B. Enter A's ip address in node B's terminal window. When a node got connected with both previous and next node. It should show message saying both node connected. Make sure one node only connect to one next node. Error will happen if two node try to connect to one, or one node is connected to it self. A big loop of nodes should form.

  4. Connect each node with server: At the server side, input each node's address, line by line. Both side should say connected if success. Enter "end", for ending the server connection, and the server will calculate and distribute public key and bigB_N to all nodes. (Note, the socket is still open, though it will not be used.)

  5. For each node, enter "s" to start computing and sending encrypted and shuffled file to the next node. And all node should process the encryption process, and finally receive the final encrypted file from this single node. Do "s" for all node. All nodes should receive the encrypted file of all other nodes now.

  6. For each node, press "c" to start to compute the number of intersection lines among all files. The final value should be shown. All nodes should get the same value in the same round.

  7. Enter "q" to exit.

About

Another way to get the number of joined sets among several nodes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0