Skip to content

Commit

Permalink
Release version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Lindstrøm committed Sep 30, 2020
1 parent b95d174 commit dd9639c
Show file tree
Hide file tree
Showing 54 changed files with 95 additions and 91 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>master-pom</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* <ul>
* <li>simple, binary operations (XOR, AND)
* <li>Open operations for opening a small subset of values used in the control flow (is a<b)<
* <li>Open operations for opening a small subset of values used in the control flow (is a&lt;b)&lt;
* <li>Factories for producing secret shared values
* </ul>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* <ul>
* <li>simple, numeric operations (+, -, *)
* <li>Open operations for opening a small subset of values used in the control flow (is a<b)<
* <li>Open operations for opening a small subset of values used in the control flow (is a &lt; b)&lt;
* <li>Factories for producing secret shared values
* </ul>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Network that allows sending and receiving of bytes between the parties of a MPC computation.
* Simple implementations will just transfer bytes over the wire, one message at a time, however
* arbitrary complicated buffering mechanism can be implemented.
* <br/>
* This interface includes a friendly interface for the native protocols, i.e. send/receive to all.
*/
public interface Network {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <OutputT> OutputT runApplication(Application<OutputT, BuilderT> application,
/**
* Executes an application based on the current SCEConfiguration. If the SecureComputationEngine
* is not setup before (e.g. connected to other parties etc.), the SecureComputationEngine will do
* the setup phase before running the application. <br/>
* the setup phase before running the application. <br>
* In a normal application this should be the normal way to start an application since there need
* to be allocated resources (the resource pool) and allowed for parallel work.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with the fresco default evaluators. This class makes the
* communication on the network batched and hence throttled so evaluators behave nice
* on the network.
* <br/>
* <br>
* It is important to call flush to empty all buffers after sending and before receiving data
*/
public class NetworkBatchDecorator implements Network {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ private AesCtrDrbgFactory() {
*
* @param bytes a sequence of bytes from which to derive the seed
* @return a new DRBG
* @throws NoSuchAlgorithmException if the hash algorithm {@value #HASH_ALGORITHM} is not
* available on the system
*/
public static Drbg fromDerivedSeed(final byte... bytes) {
return ExceptionConverter.safe(() -> fromRandomSeed(hash(bytes)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static BitSet intToBitSet(int i) {
}

/**
* Convert hex string to boolean array. 1 --> true, 0 --> false.
* Convert hex string to boolean array. 1 --&gt; true, 0 --&gt; false.
*/
public static Boolean[] toBoolean(String hex) throws IllegalArgumentException {
if (hex.length() % 2 != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private MathUtils() {
}

/**
* Checks whether a value is a quadratic residue, i.e., if it has a square root mod modulus. </b>
* Checks whether a value is a quadratic residue, i.e., if it has a square root mod modulus.
* Uses Euler's criterion (https://en.wikipedia.org/wiki/Euler%27s_criterion).
*
* @param value value to test (n)
Expand All @@ -26,7 +26,7 @@ public static boolean isQuadraticResidue(BigInteger value, BigInteger modulus) {
}

/**
* Find square root modulo a prime (if the square root exists). </b> Implements Tonelli–Shanks
* Find square root modulo a prime (if the square root exists). Implements Tonelli–Shanks
* algorithm (https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm). Variable names
* correspond to variable names in article.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@

import dk.alexandra.fresco.framework.ProtocolCollection;
import dk.alexandra.fresco.framework.ProtocolProducer;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;

public class ParallelProtocolProducerTest {

Expand All @@ -24,8 +27,9 @@ public void iterate() {
when(protocolProducer.hasNextProtocols()).thenReturn(false);
when(iterator.next()).thenReturn(protocolProducer);

List<ProtocolProducer> list = Arrays.asList(protocolProducer);
ParallelProtocolProducer parallelProtocolProducer =
new ParallelProtocolProducer(mock(List.class));
new ParallelProtocolProducer(list);
parallelProtocolProducer.iterate(iterator, protocolCollection);

verify(iterator, times(1)).remove();
Expand Down
4 changes: 2 additions & 2 deletions demos/aes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>demos</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>bristol</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion demos/aggregation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>demos</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion demos/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>demos</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion demos/distance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>demos</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion demos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>master-pom</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions demos/psi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>demos</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>bristol</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion demos/sum/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>dk.alexandra.fresco</groupId>
<artifactId>demos</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion lib/bristol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
<parent>
<artifactId>fresco-lib-pom</artifactId>
<groupId>dk.alexandra.fresco</groupId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public DRes<List<SBool>> AES(List<DRes<SBool>> plainText,
/**
* Computes DES on the given plaintext using the given key material.
*
* @param plaintext The secret shared plaintext. Must contain exactly 64 bits.
* @param plainText The secret shared plaintext. Must contain exactly 64 bits.
* @param keyMaterial The secret shared key material. Must contain exactly 64 bits.
* @return DES_keyMaterial(plainText) which contains exactly 64 bits.
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>fresco-lib-pom</artifactId>
<groupId>dk.alexandra.fresco</groupId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.5.13</version>
<version>3.3.3</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.math.BigInteger;

/**
* Implements a open operation on a pair of {@link DRes<SInt>}.
* Implements a open operation on a pair of {@code DRes<SInt>}.
*/
public class OpenPair implements
ComputationParallel<Pair<DRes<BigInteger>, DRes<BigInteger>>, ProtocolBuilderNumeric> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static BinaryComparison using(ProtocolBuilderBinary builder) {
*
* @param inLeft The left secret shared bit string
* @param inRight The right secret shared bit string
* @return A deferred result computing inLeft > inRight
* @return A deferred result computing inLeft &gt; inRight
*/
DRes<SBool> greaterThan(List<DRes<SBool>> inLeft, List<DRes<SBool>> inRight);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ static Comparison using(ProtocolBuilderNumeric builder) {
DRes<SInt> equals(DRes<SInt> x, DRes<SInt> y);

/**
* Computes if x1 <= x2.
* Computes if x1 &le; x2.
* @param x1 input
* @param x2 input
* @return A deferred result computing x1 <= x2. Result will be either [1] (true) or [0] (false).
* @return A deferred result computing x1 &le; x2. Result will be either [1] (true) or [0] (false).
*/
DRes<SInt> compareLEQ(DRes<SInt> x1, DRes<SInt> x2);

/**
* Compares if x1 <= x2, but with twice the possible bit-length.
* Compares if x1 &le; x2, but with twice the possible bit-length.
* Requires that the maximum bit length is set to something that can handle
* this scenario. It has to be at least less than half the modulus bit size.
*
* @param x1 input
* @param x2 input
* @return A deferred result computing x1 <= x2. Result will be either [1] (true) or [0] (false).
* @return A deferred result computing x1 &le; x2. Result will be either [1] (true) or [0] (false).
*/
DRes<SInt> compareLEQLong(DRes<SInt> x1, DRes<SInt> x2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* Represents a comparison protocol between two bitstrings. Concretely, the protocol computes the
* 'greater than' relation of strings A and B, i.e., it computes C := A > B.
* 'greater than' relation of strings A and B, i.e., it computes C := A &gt; B.
*
*/
public class BinaryGreaterThan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static AdvancedBinary using(ProtocolBuilderBinary builder) {
* Full adder which works with any number of inputs to the addition. The lefts and rights must
* have the same size. The Output is a computation which contains an array of size n, where n is
* the length of the lefts and rights inputs + 1, where the 0'th entry is the carry and the rest
* is the result. An example: lefts: 1100101 rights: 1101001 inCarry: 1 => output:11001111
* is the result. An example: lefts: 1100101 rights: 1101001 inCarry: 1 =&gt; output:11001111
*
* @param lefts The first inputs.
* @param rights The second inputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ default DRes<SInt> exp(DRes<SInt> x, long e) {
* Calculating the result of right shifting of the input by one.
*
* @param input input.
* @return A deferred result computing input >> 1
* @return A deferred result computing input &gt;&gt; 1
*/
DRes<SInt> rightShift(DRes<SInt> input);

Expand All @@ -192,7 +192,7 @@ default DRes<SInt> exp(DRes<SInt> x, long e) {
*
* @param input input.
* @param shifts Number of shifts
* @return A deferred result computing input >> shifts
* @return A deferred result computing input &gt;&gt; shifts
*/
DRes<SInt> rightShift(DRes<SInt> input, int shifts);

Expand All @@ -201,7 +201,7 @@ default DRes<SInt> exp(DRes<SInt> x, long e) {
*
* @param input input
* @return A deferred result computing<br>
* result: input >> 1<br>
* result: input &gt;&gt; 1<br>
* remainder: The <code>shifts</code> least significant bits of the input with the least
* significant having index 0.
*/
Expand All @@ -214,20 +214,20 @@ default DRes<SInt> exp(DRes<SInt> x, long e) {
* @param input input
* @param shifts Number of shifts
* @return A deferred result computing <br>
* result: input >> shifts<br>
* result: input &gt;&gt; shifts<br>
* remainder: The <code>shifts</code> least significant bits of the input with the least
* significant having index 0.
*/
DRes<RightShiftResult> rightShiftWithRemainder(DRes<SInt> input, int shifts);

/**
* Compute the truncation of a secret input. The result will in most cases be equal to <code>input
* >> shifts</code> , but may be one larger. {@link #rightShift(DRes)} gives the exact result, but
* &gt;&gt; shifts</code> , but may be one larger. {@link #rightShift(DRes)} gives the exact result, but
* is slower to compute.
*
* @param input A secret input
* @param shifts The number of shifts
* @return input >> shifts OR (input >> shifts) + 1.
* @return input &gt;&gt; shifts OR (input &gt;&gt; shifts) + 1.
*/
DRes<SInt> truncate(DRes<SInt> input, int shifts);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* Chooses left or right based on the selection bit. Equivalent to the java expression:
* <code>selector ? left : right<code>
* <code>selector ? left : right</code>
*/
public class ConditionalSelect implements Computation<SInt, ProtocolBuilderNumeric> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* This protocol is an implementation of Euclidean division on integers with a secret shared
* dividend and a known divisor. The dividend must have bit length smaller than half the
* maxBitLength (available via {@link ProtocolBuilderNumeric#getBasicNumericContext().getMaxBitLength()})
* maxBitLength (available via {@link ProtocolBuilderNumeric#getBasicNumericContext})
* in order for the division protocol to produce a precise result.
*/
public class KnownDivisor implements Computation<SInt, ProtocolBuilderNumeric> {
Expand Down
2 changes: 1 addition & 1 deletion lib/dea/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<parent>
<artifactId>fresco-lib-pom</artifactId>
<groupId>dk.alexandra.fresco</groupId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>

</project>
2 changes: 1 addition & 1 deletion lib/debug/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>fresco-lib-pom</artifactId>
<groupId>dk.alexandra.fresco</groupId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lib/fixed/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>fresco-lib-pom</artifactId>
<groupId>dk.alexandra.fresco</groupId>
<version>1.2.2-SNAPSHOT</version>
<version>1.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ static AdvancedFixedNumeric using(ProtocolBuilderNumeric builder) {
DRes<SFixed> random();

/**
* Calculate the natural logarithm of a secret value. Works best for small inputs (< 10), so
* larger inputs should be scaled is possible (note that <i>log(x * b<sup>e</sup>) = log(x) + e
* log(b)</i>).
* Calculate the natural logarithm of a secret value.
*
* @param x Secret value
* @return A deferred result computing computing log(x)
Expand Down
Loading

0 comments on commit dd9639c

Please sign in to comment.