aicis / fresco Goto Github PK
View Code? Open in Web Editor NEWA FRamework for Efficient Secure COmputation
License: Other
A FRamework for Efficient Secure COmputation
License: Other
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.
Some simple conditions not tested in methods preprocessedValues() and bristol() respectively.
BGW only works if the id's of the parties are consecutive.
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)
The current implementation of https://github.com/aicis/fresco/blob/develop/core/src/main/java/dk/alexandra/fresco/framework/builder/BuildStep.java#L42 (whileLoop) repeats the first iteration twice with the same IterationState object. The expected behavior is that each iteration is only performed once.
Amongst these:
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.
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.
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 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
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.
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)
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.
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?
Make TinyTables compatible with the new structure similar to the SPDZ protocol suite
Add javadoc documentation. The goal would be to have every public interface, class and method should be documented. Central classes having higher priority.
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?
Update the Tools project to be compatible with the new framework design, or scrap the tools if they are no longer used.
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!
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.
I have noticed the presence of the classes DivisionFactory and DivisionFactoryImpl. However DivisionProtocolBuilder. I was wondering whether or not this is normal, and whether or not is it possible to have either fixed or floating point arithmetic on Fresco
Make sure the mac check protocol of spdz is used correctly
The Javadoc of ComparisonProtocolFactory.getGreaterThanProtocol() specifies that it should return 1 when x1 >= x2, and 0 otherwise. It appears to be doing the exact opposite.
The randomBit method is never tested.
The tests needs to be updated to be compatible with the new framework design. I.e., they should all use the new style of protocol creation using the ProtocolBuilders instead of the old ProtocolFactories.
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:
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.
The current documentation is terribly out of date. Update it to be consistent with the current 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.
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?
There are some protocols that didn't make it in before the refactoring and thus use old conventions. These protocols include oblivious shuffle, aggregation, and joins and need to be ported into the post-refactor Fresco.
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 :)
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.
Factories should never return SInt's, but rather return protocols that takes SInt containers.
Amongst these:
The goal is 100% test coverage of the framework with prioritizing projects in the following order:
Not tested when sender is not also this party (this is because the DummyBoolean suite is only tested with one party).
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.
Currently SCENetwork, SCENetworkSupplier and Network interfaces are all offer very similar functionality. We want to merge these making it easier to implement new networks.
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.
default implementation of createComparison is never tested.
The Demo's in the demo project are not up to date with the recent framework updates. This should be fixed.
EDIT: This includes using the new style of protocol creation using the ProtocolBuilder instead of the old ProtocolFactories.
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.
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.
There is an issue where the threadpools used for parallel evaluators are not closed properly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.