Skip to content

Commit 3ac5f9c

Browse files
author
Jan Bobolz
authored
Merge pull request #146 from cryptimeleon/secp256k1hash
Added HashInto classes for secp256k1
2 parents f96b89f + b07a479 commit 3ac5f9c

7 files changed

Lines changed: 34 additions & 5 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
group = 'org.cryptimeleon'
99
archivesBaseName = project.name
1010
boolean isRelease = project.hasProperty("release")
11-
version = '3.0.1' + (isRelease ? "" : "-SNAPSHOT")
11+
version = '3.0.2' + (isRelease ? "" : "-SNAPSHOT")
1212

1313
sourceCompatibility = 1.8
1414
targetCompatibility = 1.8

src/main/java/org/cryptimeleon/math/random/RandomGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static BigInteger getRandomNonZeroNumber(BigInteger exclusiveUpperBound)
6363
}
6464

6565
/**
66-
* Generates a random integer k with \(0 \leq k < 2^{\text{bitlength}}-1\).
66+
* Generates a random integer k with \(0 \leq k &lt; 2^{\text{bitlength}}-1\).
6767
*/
6868
public static BigInteger getRandomNumberOfBitlength(int bitlength) {
6969
return impl.getRandomNumberOfBitlength(bitlength);

src/main/java/org/cryptimeleon/math/structures/groups/debug/DebugBilinearGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public int getExponentiationWindowSize() {
350350
* of the exponentiation algorithm, we do not recommend setting this too high as the cost of computing the
351351
* whole window quickly exceeds its performance benefits during the actual exponentiation.
352352
* <p>
353-
* If you want to change the number of cached precomputations, use {@link this#setPrecomputationWindowSize(int)}.
353+
* If you want to change the number of cached precomputations, use {@link #setPrecomputationWindowSize(int)}.
354354
*/
355355
public void setExponentiationWindowSize(int exponentiationWindowSize) {
356356
g1.setExponentiationWindowSize(exponentiationWindowSize);

src/main/java/org/cryptimeleon/math/structures/groups/debug/DebugGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ public int getExponentiationWindowSize() {
616616
* of the exponentiation algorithm, we do not recommend setting this too high as the cost of computing the
617617
* whole window quickly exceeds its performance benefits during the actual exponentiation.
618618
* <p>
619-
* If you want to change the number of cached precomputations, use {@link this#setPrecomputationWindowSize(int)}.
619+
* If you want to change the number of cached precomputations, use {@link #setPrecomputationWindowSize(int)}.
620620
*/
621621
public void setExponentiationWindowSize(int exponentiationWindowSize) {
622622
groupTotal.setExponentiationWindowSize(exponentiationWindowSize);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.cryptimeleon.math.structures.groups.elliptic.nopairing;
2+
3+
import org.cryptimeleon.math.serialization.Representation;
4+
import org.cryptimeleon.math.structures.groups.lazy.HashIntoLazyGroup;
5+
6+
public class HashIntoSecp256k1 extends HashIntoLazyGroup {
7+
public HashIntoSecp256k1() {
8+
super(new Secp256k1Impl.HashIntoSecp256k1(), new Secp256k1());
9+
}
10+
11+
public HashIntoSecp256k1(Representation repr) {
12+
super(repr);
13+
}
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.cryptimeleon.math.structures.groups.elliptic.nopairing;
2+
3+
import org.cryptimeleon.math.serialization.Representation;
4+
import org.cryptimeleon.math.structures.groups.basic.HashIntoBasicGroup;
5+
import org.cryptimeleon.math.structures.groups.lazy.HashIntoLazyGroup;
6+
7+
public class HashIntoSecp256k1Basic extends HashIntoBasicGroup {
8+
public HashIntoSecp256k1Basic() {
9+
super(new Secp256k1Impl.HashIntoSecp256k1(), new Secp256k1Basic());
10+
}
11+
12+
public HashIntoSecp256k1Basic(Representation repr) {
13+
super(repr);
14+
}
15+
}

src/main/java/org/cryptimeleon/math/structures/groups/lazy/LazyGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public int getExponentiationWindowSize() {
225225
* of the exponentiation algorithm, we do not recommend setting this too high as the cost of computing the
226226
* whole window quickly exceeds its performance benefits during the actual exponentiation.
227227
* <p>
228-
* If you want to change the number of cached precomputations, use {@link this#setPrecomputationWindowSize(int)}.
228+
* If you want to change the number of cached precomputations, use {@link #setPrecomputationWindowSize(int)}.
229229
*/
230230
public void setExponentiationWindowSize(int exponentiationWindowSize) {
231231
this.exponentiationWindowSize = exponentiationWindowSize;

0 commit comments

Comments
 (0)