Giter Club home page Giter Club logo

fresco's People

Contributors

abspoel avatar basitkhurram avatar dependabot[bot] avatar elfprince13 avatar enricobacis avatar eorloff avatar gugi264 avatar guutboy avatar jesperbc avatar jonas-lj avatar jot2re avatar markspanbroek avatar michaelstausholm avatar mvoetmann avatar n1v0lg avatar no-longer-human avatar pffrandsen avatar quackzar avatar rdragos avatar rubensayshi avatar tpj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fresco's Issues

BGW Size should vary with modulus

In ShamirShare we have the line:
public static final int size = 12;

This should not be final, nor public, but set whenever the modulus is set.

PreprocessedExpPipeFactory with BGW Protocol

I try to run code CompareTest with BGW protocol but there was an error

Error while doing MPC: dk.alexandra.fresco.suite.bgw.BgwFactory cannot be cast to dk.alexandra.fresco.lib.math.integer.exp.PreprocessedExpPipeFactory
java.lang.ClassCastException: dk.alexandra.fresco.suite.bgw.BgwFactory cannot be cast to dk.alexandra.fresco.lib.math.integer.exp.PreprocessedExpPipeFactory
        at org.customcode.compare.CompareDemo.prepareApplication(CompareDemo.java:75)
        at dk.alexandra.fresco.framework.sce.SCEImpl.evalApplication(SCEImpl.java:250)
        at dk.alexandra.fresco.framework.sce.SCEImpl.runApplication(SCEImpl.java:242)
        at org.customcode.compare.CompareDemo.compareDemoMain(CompareDemo.java:164)
        at org.customcode.compare.App.main(App.java:9)

Test KryoNetwork

Various exceptions thrown are not tested.
Private class Registrator is not tested, probably this class should just be a private method.

Also encrypting traffic using AES is not tested, these parts should simply be deleted. We will handle secure channels at a later stage.

Where is the documentation for Fresco?

Hello,

I cannot find any documentation for fresco. I am looking for documentation that describe the secure functionalities of fresco and what classes they are implemented in. I cannot seem to find it in the website. Can someone please point me towards a source? For example, I am trying to find a class that securely converts a boolean value to an integer.

Adopt common code-style

We have adopted the google java code style. The old code should be moved to this style and the new style should be enforced in new pull requests.

Record/Log performance metrics

Record and log performance metrics, to help benchmark and optimize the framework and implemented protocols. Currently only limited metrics are being recorded and mainly when using the sequential evaluation strategy.

Useful metrics could include

  • Timing of protocol execution
  • Number of executions of key protocols (multiplication, comparison, etc.)
  • Total communication amount
  • Communication pr. protocol batch/round (e.g., max/min/mean/avg)
  • Number of communication round/batches
  • Number of native protocols pr batch (e.g., max/min/mean/avg)
  • Perhaps some protocol suite specific metrics such as spdz MacChecks?

Delete the AES class

It is completely not tested and never used. It would be preferable if we just use something standard for secure channels like TLS. We will look into this in a later release.

Improve logging

  • Remove current Reporter and use java.util.logging instead
  • Reduce SCAPI output

Test fails except when run in isolation

The test dk.alexandra.fresco.suite.spdz.TestSpdzLPSolver3Parties.java fails when run with other tests, e.g. when running

mvn test

or

mvn test -Dtest=dk.alexandra.fresco.suite.spdz.*

The exception trace is as follows. Note that thread 1+2 fail in SpdzNativeProtocol.sendBroadcastValidation while thread 3 fails in SpdzMultGate.evaluate. There seems to be some weird dependency between the tests?

[2015-12-02 22:00:25 +0100] (285) SEVERE: TestThread(3) threw exception during test:
java.lang.ClassCastException: [B cannot be cast to [Ljava.math.BigInteger;
    at dk.alexandra.fresco.suite.spdz.gates.SpdzMultGate.evaluate(SpdzMultGate.java:140)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.processBatch(SequentialEvaluator.java:159)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.doOneRound(SequentialEvaluator.java:116)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.eval(SequentialEvaluator.java:127)
    at dk.alexandra.fresco.framework.sce.SCEImpl.evalApplication(SCEImpl.java:229)
    at dk.alexandra.fresco.framework.sce.SCEImpl.runApplication(SCEImpl.java:224)
    at dk.alexandra.fresco.lib.arithmetic.LPSolverTests$TestLPSolver$1.test(LPSolverTests.java:138)
    at dk.alexandra.fresco.framework.TestThreadRunner$TestThread.runTest(TestThreadRunner.java:86)
    at dk.alexandra.fresco.framework.TestThreadRunner$TestThread.run(TestThreadRunner.java:74)

[2015-12-02 22:00:25 +0100] (283) SEVERE: TestThread(1) threw exception during test:
java.lang.ClassCastException: [Ljava.math.BigInteger; cannot be cast to [B
    at dk.alexandra.fresco.suite.spdz.gates.SpdzNativeProtocol.receiveBroadcastValidation(SpdzNativeProtocol.java:63)
    at dk.alexandra.fresco.suite.spdz.gates.SpdzCommitGate.evaluate(SpdzCommitGate.java:89)
    at dk.alexandra.fresco.suite.spdz.evaluation.strategy.SpdzProtocolSuite.MACCheck(SpdzProtocolSuite.java:195)
    at dk.alexandra.fresco.suite.spdz.evaluation.strategy.SpdzProtocolSuite.synchronize(SpdzProtocolSuite.java:163)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.doOneRound(SequentialEvaluator.java:117)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.eval(SequentialEvaluator.java:127)
    at dk.alexandra.fresco.framework.sce.SCEImpl.evalApplication(SCEImpl.java:229)
    at dk.alexandra.fresco.framework.sce.SCEImpl.runApplication(SCEImpl.java:224)
    at dk.alexandra.fresco.lib.arithmetic.LPSolverTests$TestLPSolver$1.test(LPSolverTests.java:138)
    at dk.alexandra.fresco.framework.TestThreadRunner$TestThread.runTest(TestThreadRunner.java:86)
    at dk.alexandra.fresco.framework.TestThreadRunner$TestThread.run(TestThreadRunner.java:74)

[2015-12-02 22:00:25 +0100] (284) SEVERE: TestThread(2) threw exception during test:
java.lang.ClassCastException: [Ljava.math.BigInteger; cannot be cast to [B
    at dk.alexandra.fresco.suite.spdz.gates.SpdzNativeProtocol.receiveBroadcastValidation(SpdzNativeProtocol.java:63)
    at dk.alexandra.fresco.suite.spdz.gates.SpdzCommitGate.evaluate(SpdzCommitGate.java:89)
    at dk.alexandra.fresco.suite.spdz.evaluation.strategy.SpdzProtocolSuite.MACCheck(SpdzProtocolSuite.java:195)
    at dk.alexandra.fresco.suite.spdz.evaluation.strategy.SpdzProtocolSuite.synchronize(SpdzProtocolSuite.java:163)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.doOneRound(SequentialEvaluator.java:117)
    at dk.alexandra.fresco.framework.sce.evaluator.SequentialEvaluator.eval(SequentialEvaluator.java:127)
    at dk.alexandra.fresco.framework.sce.SCEImpl.evalApplication(SCEImpl.java:229)
    at dk.alexandra.fresco.framework.sce.SCEImpl.runApplication(SCEImpl.java:224)
    at dk.alexandra.fresco.lib.arithmetic.LPSolverTests$TestLPSolver$1.test(LPSolverTests.java:138)
    at dk.alexandra.fresco.framework.TestThreadRunner$TestThread.runTest(TestThreadRunner.java:86)
    at dk.alexandra.fresco.framework.TestThreadRunner$TestThread.run(TestThreadRunner.java:74)

BatchedStrategy does not work

The BatchedStrategy helper only works in the rare situations where protocols send messages in a well aligned way. Otherwise messages sent from one protocol is not guaranteed to be received by the corresponding protocol.

How to run SPDZ applications

Hi guys,

I was playing around with FRESCO and trying to run an application using the SPDZ backend. My command lines are:

java -jar lp.jar -i1 -p1:localhost:9292 -p2:localhost:9994 -s spdz
java -jar lp.jar -i2 -p1:localhost:9292 -p2:localhost:9994 -s spdz

However, it gives the following exception:

Exception in thread "main" java.lang.NullPointerException
at dk.alexandra.fresco.suite.spdz.storage.DataSupplierImpl.getSSK(DataSupplierImpl.java:138)
at dk.alexandra.fresco.suite.spdz.storage.SpdzStorageImpl.getSSK(SpdzStorageImpl.java:112)
at dk.alexandra.fresco.suite.spdz.evaluation.strategy.SpdzProtocolSuite.init(SpdzProtocolSuite.java:133)
at dk.alexandra.fresco.framework.sce.SCEImpl.setup(SCEImpl.java:169)
at dk.alexandra.fresco.framework.sce.SCEImpl.runApplication(SCEImpl.java:232)
at LPTest.main(LPTest.java:67)

Debugging says that indeed, the storage is set to NULL. But how can I change this?

Add Javadoc

Add javadoc documentation. The goal would be to have every public interface, class and method should be documented. Central classes having higher priority.

Sending large amounts of data makes system block

When sending large amounts of data over a single channel seems to make the send method block. This can be seen by running the "test_Lots_Of_Mults_Sequential_Batched" with SPDZ (which is ignored now because it make the tests hang.). In this test we try to communicate 4096 shares in between rounds (i.e., we fill up a batch with multiplication gates). I am note sure exactly where the problem lies, but I suspect a problem in the Scapi networking stuff?

Cannot Property Run Quick Start Example

Hello, I am trying to run the quick start code here:

http://fresco.readthedocs.io/en/latest/quickstart.html

However, when I compile the file with this:

$ javac -cp target/fresco-0.2.0-SNAPSHOT-jar-with-dependencies.jar tmp/AESDemo.java

I get a lot of errors like this:

error: package dk.alexandra.fresco.framework does not exist

I made sure to run everything from the directory that contains target folder and the tmp folder (as described in the tutorial). What am I doing wrong here? Thank you for your help!

Extract peer ID's from solution to the DEA problem

The current DEA solver only finds the DEA score. We would like to also find the ids of the peers relative to which the score was found. We also would like to find the value associated with those ids in the DEA solution.

Remove the ProtocolFactories

The old ProtocolFactories remain only to support old code using them. Once we have updated this code to use the ProtocolBuilders instead we should get rid of the ProtocolFactories entirely, so that only the ProtocolBuilders are used.

This depends on first solving #130 #110 and possibly #111.

Implement proper SPDZ preprocessing

Implement a SPDZ preprocessing protocol, I suggest the MASCOT protocol. Consider making the preprocessing method swappable so we could also use the Bristol implementation.

Task list:

  • MASCOT protocol
  • OT-extension (KOS15)
  • Base-OT

crash when noOfVmThreads isn't set in properties, and evaluator is set to Parallel

If you are experiencing this problem, make sure that noOfVmThreads is set in your configuration file, and make sure that it is spelled and capitalised correctly.

This combination of settings crashes FRESCO with an unhelpful exception message. Stack trace:

[2016-06-20 18:46:16 +0200] (1) WARNING: Reporter already initialized
NetworkConfigurationImpl [myId=1, parties={1=Party(1, localhost:9001), 2=Party(2, localhost:9002), 3=Party(3, localhost:9003)}, logLevel=INFO]
Exception in thread "main" java.lang.NegativeArraySizeException
    at edu.biu.scapi.comm.multiPartyComm.SocketMultipartyCommunicationSetup.createChannels(SocketMultipartyCommunicationSetup.java:241)
    at edu.biu.scapi.comm.multiPartyComm.SocketMultipartyCommunicationSetup.establishConnections(SocketMultipartyCommunicationSetup.java:195)
    at edu.biu.scapi.comm.multiPartyComm.SocketMultipartyCommunicationSetup.prepareForCommunication(SocketMultipartyCommunicationSetup.java:116)
    at dk.alexandra.fresco.framework.network.ScapiNetworkImpl.connect(ScapiNetworkImpl.java:143)
    at dk.alexandra.fresco.framework.sce.resources.ResourcePoolImpl.initializeNetwork(ResourcePoolImpl.java:108)
    at dk.alexandra.fresco.framework.sce.SCEImpl.setup(SCEImpl.java:154)
    at dk.alexandra.fresco.framework.sce.SCEImpl.runApplication(SCEImpl.java:211)
    at com.tophwells.keycutter.SecurePointAddition.main(SecurePointAddition.java:74)

The configuration file I used was:

myId = 1
party1 = localhost,9001
party2 = localhost,9002
party3 = localhost,9003
protocolSuite = bgw
evaluator = PARALLEL
storage = IN_MEMORY
noOfThreads = 2
//noOfVmThreads = 2

The default value of noOfVmThreads is -1, and it silently uses this default if it's not set in the configuration file. Since this value is never checked, it goes straight through to the network code, where it crashes the program when it attempts to create an array of -1 connections to each other player.

We should add a check for this, but I'm not sure where the most natural place is.

Move the SCAPI network out of the core framework

The current SCAPI Network implementation is not very efficient and represents a rather large dependency. Move it out of the core framework and switch to the Kryonet implementation as the default implementation.

Change SPDZ modulus

I'm trying to run "test_LPSolver_2_Parallel_batched_dummy" inside TestSpdzLPSolver2Parties with different modulus values to see how the precision of fixed point arithmetic varies.

I've changed the "getModulus" function inside spdz/storage/DummyDataSupplierImpl.java to return a different prime but when I run the test again Fresco crashes. I guess that I should also change the data from the other functions like getSSK but I do not know what to put in there.

Can you shed some light on what those constants mean?

BGW suite: invalid results on even #participants

Hi all,

I'm using Fresco as a SMC provider for my Master's Thesis and really like it!

Using the BGW protocol, an odd amount of participants [3, 5, 7, 9, 11, ...] produces a correct result when calculating a sum on all secret values of all participating nodes.
However, the same with an even amount of participants [2, 4, 6, ...] outputs an invalid result, e.g. 618970019642690137449562105.
Prime modulus was: 618970019642690137449562111.
--> The difference is the correct result in that case.

Do you have any idea or is there a limitation of BGW?
In case you're interested, the distributed sum is the application I used:
https://github.com/grandcat/fresco/blob/protocol_evaluation/src/main/java/dk/alexandra/fresco/demo/DistSum.java#L207-L270

Thank you :)

Leading blank line in pom.xml causes Maven to fail on some systems

I'm using Maven 3.3.9 on Windows 8. The error message is:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\Users\Toph\Documents\FRESCO\pom.xml: processing instruction can not have PITarget with reserveld xml name (position: START_DOCUMENT seen \r\n<?xml ... @2:7)  @ line 2, column 7
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project  (C:\Users\Toph\Documents\FRESCO\pom.xml) has 1 error
[ERROR]     Non-parseable POM C:\Users\Toph\Documents\FRESCO\pom.xml: processing instruction can not have PITarget with reserveld xml name (position: START_DOCUMENT seen \r\n<?xml ... @2:7)  @ line 2, column 7 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

Removing the first blank line from pom.xml fixes the problem. Pull request to follow.

I couldn't find any reference to this problem on Maven's site, but this issue on a different project shows someone else with the same problem.

Refactor preprocessed factory methods

Factories should never return SInt's, but rather return protocols that takes SInt containers.
Amongst these:

  • PreprocessedNumericBitFactory
  • PreprocessedExpPipeFactory

Improve test coverage

The goal is 100% test coverage of the framework with prioritizing projects in the following order:

  • Core
  • Suite
  • Demo
  • Tools

Test DummyBooleanCloseProtocol

Not tested when sender is not also this party (this is because the DummyBoolean suite is only tested with one party).

Make Kryonet work on windows

There is currently some bug that makes the Kryonet network implementation fail on windows. Fix this and make the Kryonet network the default network implementation.

Merge Network interfaces

Currently SCENetwork, SCENetworkSupplier and Network interfaces are all offer very similar functionality. We want to merge these making it easier to implement new networks.

File-based storage option

Currently, the SCE provides a key/value store to suites. This is fine for some suites, but others rely on massive data to be preprocessed. For these a key value store is not optimal, because it is a random-access thing. We should therefore also support some kind of streamed storage, where reading and writing is on a readNext and writeNext basis. One sequential store per thread, perhaps. This can be efficiently implemented by a file stream.

mvn test crash in spdz.TestSpdzLPBuildingBlocks

I keep receiving this error: java.lang.OutOfMemoryError: GC overhead limit exceeded
Also I get an error in spdz.TestSpdzLPSolver2Parties: "File with filename 'spdz/SPDZ_1_2_0_EXP' not found."

Do these tests work on your build?
Thanks.

Deterministic tests for SDPZ and other suites

In order to write suite-specific unit tests for functionality such as closing, i.e., secret-sharing, we need to be able to fix the randomness used by the suite. Currently, there is no direct way to do that since the use of SecureRandom is hard-coded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.