Tabnine Logo
Mascot.getTriples
Code IndexAdd Tabnine to your IDE (free)

How to use
getTriples
method
in
dk.alexandra.fresco.tools.mascot.Mascot

Best Java code snippets using dk.alexandra.fresco.tools.mascot.Mascot.getTriples (Showing top 2 results out of 315)

origin: aicis/fresco

@Override
public SpdzTriple getNextTriple() {
 ensureInitialized();
 if (triples.isEmpty()) {
  logger.trace("Getting another triple batch");
  triples.addAll(mascot.getTriples(batchSize));
  logger.trace("Got another triple batch");
 }
 MultiplicationTriple triple = triples.pop();
 return MascotFormatConverter.toSpdzTriple(triple);
}
origin: aicis/fresco

@Test
public void testFirstTriples() throws Exception {
 List<Map<Integer, RotList>> seedOts = setupOts();
 Map<Integer, FieldElement> perPartyMacKeyShares = setupMacKeyShares();
 List<Callable<List<MultiplicationTriple>>> mascotCreators = new ArrayList<>();
 for (int i = 0; i < iterations; i++) {
  @SuppressWarnings("resource")
  NetManager normalManager = new NetManager(ports);
  for (int myId = 1; myId <= noOfParties; myId++) {
   int finalMyId = myId;
   int finalInstanceId = i;
   FieldElement randomSsk = perPartyMacKeyShares.get(finalMyId);
   Map<Integer, RotList> seedOt = seedOts.get(finalMyId - 1);
   mascotCreators.add(() -> {
    Mascot mascot = new Mascot(
      new MascotResourcePoolImpl(finalMyId, noOfParties, finalInstanceId,
        getDrbg(), seedOt, mascotSecurityParameters, definition),
      normalManager.createExtraNetwork(finalMyId), randomSsk);
    return mascot.getTriples(16);
   });
  }
 }
 invoke(mascotCreators);
}
dk.alexandra.fresco.tools.mascotMascotgetTriples

Javadoc

Generates a batch of multiplication triples.

Popular methods of Mascot

  • <init>
    Creates new Mascot.
  • getRandomElements
    Creates random authenticated elements.
  • getInputMasks
    Generates random input masks.
  • getRandomBits
    Generates random bits (as authenticated elements).
  • input
    Runs the input functionality on a batch of field elements. Allows a party to turn unauthenticated,

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now