Skip to content

Commit

Permalink
Start making debug group package-private
Browse files Browse the repository at this point in the history
  • Loading branch information
rheitjoh committed Apr 23, 2021
1 parent 5e17145 commit 857c472
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @see DebugBilinearGroup
*/
public class DebugBilinearGroupImpl implements BilinearGroupImpl {
class DebugBilinearGroupImpl implements BilinearGroupImpl {

/**
* The security level offered by this bilinear group in number of bits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* (multiplication in Zn).
* It is insecure since DLOG is trivial in Zn.
*/
public class DebugBilinearMapImpl implements BilinearMapImpl {
class DebugBilinearMapImpl implements BilinearMapImpl {
/**
* The groups underlying the bilinear group.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @see DebugGroupElement
* @see DebugGroupImpl
*/
public class DebugGroupElementImpl implements GroupElementImpl {
class DebugGroupElementImpl implements GroupElementImpl {
/**
* The underlying Zn element that realizes the actual group operations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Zn-based group that supports counting group operations, inversions, squarings and exponentiations as well as
* number of terms in each multi-exponentiation.
*/
public class DebugGroupImpl implements GroupImpl {
class DebugGroupImpl implements GroupImpl {

/**
* Name of this group. Group elements between {@code CountingGroupElementImpl} instances only allow for group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* Implements an isomorphism between two {@link DebugGroupImpl}s.
*/
public class DebugIsomorphismImpl implements GroupHomomorphismImpl {
class DebugIsomorphismImpl implements GroupHomomorphismImpl {
@Represented
private DebugGroupImpl src;
@Represented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Allows hashing a byte array to a {@link DebugGroupImpl} via {@link HashIntoZn}.
*/
public class HashIntoDebugGroupImpl implements HashIntoGroupImpl {
class HashIntoDebugGroupImpl implements HashIntoGroupImpl {
protected DebugGroupImpl group;
protected HashIntoZn hash;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import org.cryptimeleon.math.serialization.standalone.StandaloneReprSubTest;
import org.cryptimeleon.math.structures.groups.RingAdditiveGroupImpl;
import org.cryptimeleon.math.structures.groups.RingUnitGroupImpl;
import org.cryptimeleon.math.structures.groups.basic.BasicBilinearGroup;
import org.cryptimeleon.math.structures.groups.cartesian.ProductGroup;
import org.cryptimeleon.math.structures.groups.debug.DebugBilinearGroup;
import org.cryptimeleon.math.structures.groups.debug.DebugBilinearGroupImpl;
import org.cryptimeleon.math.structures.groups.elliptic.BilinearGroup;
import org.cryptimeleon.math.structures.groups.elliptic.BilinearGroupImpl;
import org.cryptimeleon.math.structures.groups.elliptic.type1.supersingular.SupersingularBasicBilinearGroup;
import org.cryptimeleon.math.structures.groups.elliptic.type1.supersingular.SupersingularBilinearGroup;
import org.cryptimeleon.math.structures.groups.elliptic.type3.bn.BarretoNaehrigBasicBilinearGroup;
import org.cryptimeleon.math.structures.groups.elliptic.type3.bn.BarretoNaehrigBilinearGroup;
import org.cryptimeleon.math.structures.groups.lazy.LazyBilinearGroup;
import org.cryptimeleon.math.structures.groups.sn.Sn;
import org.cryptimeleon.math.structures.rings.cartesian.ProductRing;
import org.cryptimeleon.math.structures.rings.extfield.ExtensionField;
Expand Down Expand Up @@ -63,25 +62,27 @@ public void testBilinearGroupImpl(BilinearGroupImpl bilGroup) {
}

public void testBarretoNaehrig() {
testBilinearGroup(new BarretoNaehrigBasicBilinearGroup(80));
testBilinearGroup(new BarretoNaehrigBilinearGroup(80));
//testBilinearGroupImpl(new BarretoNaehrigBilinearGroupImpl(80));
}

public void testSupersingular() {
//testBilinearGroupImpl(new SupersingularTateGroupImpl(80));
testBilinearGroup(new SupersingularBasicBilinearGroup(80));
testBilinearGroup(new SupersingularBilinearGroup(80));
}

public void testLazyAndBasicGroup() {
BilinearGroupImpl debugGroupImpl = new DebugBilinearGroupImpl(128, BilinearGroup.Type.TYPE_1);
// BilinearGroupImpl debugGroupImpl = new DebugBilinearGroupImpl(128, BilinearGroup.Type.TYPE_1);

testBilinearGroup(new LazyBilinearGroup(debugGroupImpl));
testBilinearGroup(new BasicBilinearGroup(debugGroupImpl));
// testBilinearGroup(new LazyBilinearGroup(debugGroupImpl));
// testBilinearGroup(new BasicBilinearGroup(debugGroupImpl));
}

public void testCountingGroup() {
public void testDebugGroup() {
testBilinearGroup(new DebugBilinearGroup(128, BilinearGroup.Type.TYPE_1));
testBilinearGroupImpl(new DebugBilinearGroupImpl(128, BilinearGroup.Type.TYPE_1));
//testBilinearGroupImpl(new DebugBilinearGroupImpl(128, BilinearGroup.Type.TYPE_1));
}

public void testExtensionField() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import org.cryptimeleon.math.structures.groups.Group;
import org.cryptimeleon.math.structures.groups.GroupElement;
import org.cryptimeleon.math.structures.groups.debug.DebugGroupImpl;
import org.cryptimeleon.math.serialization.RepresentableRepresentation;
import org.cryptimeleon.math.serialization.Representation;
import org.cryptimeleon.math.structures.groups.basic.BasicGroup;
import org.cryptimeleon.math.structures.groups.debug.DebugGroupImpl;
import org.cryptimeleon.math.structures.groups.lazy.LazyGroup;
import org.cryptimeleon.math.structures.rings.zn.Zn;
import org.junit.Test;
Expand Down

0 comments on commit 857c472

Please sign in to comment.