Skip to content

Commit e332543

Browse files
committed
feat: Better support for pairing-friendly curves.
1 parent 30390ac commit e332543

13 files changed

+128
-68
lines changed

src/main/java/com/danubetech/keyformats/JWK_to_PrivateKey.java

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ public static Object JWK_to_anyPrivateKey(JWK jsonWebKey) {
2424
return JWK_to_RSAPrivateKey(jsonWebKey);
2525
else if (keyType == KeyTypeName.secp256k1)
2626
return JWK_to_secp256k1PrivateKey(jsonWebKey);
27-
else if (keyType == KeyTypeName.BLS12381_G1)
28-
return JWK_to_BLS12381_G1PrivateKey(jsonWebKey);
29-
else if (keyType == KeyTypeName.BLS12381_G2)
30-
return JWK_to_BLS12381_G2PrivateKey(jsonWebKey);
27+
else if (keyType == KeyTypeName.Bls12381G1)
28+
return JWK_to_Bls12381G1PrivateKey(jsonWebKey);
29+
else if (keyType == KeyTypeName.Bls12381G2)
30+
return JWK_to_Bls12381G2PrivateKey(jsonWebKey);
31+
else if (keyType == KeyTypeName.Bls48581G1)
32+
return JWK_to_Bls12381G1PrivateKey(jsonWebKey);
33+
else if (keyType == KeyTypeName.Bls48581G2)
34+
return JWK_to_Bls12381G2PrivateKey(jsonWebKey);
3135
else if (keyType == KeyTypeName.Ed25519)
3236
return JWK_to_Ed25519PrivateKeyBytes(jsonWebKey);
3337
else if (keyType == KeyTypeName.X25519)
@@ -72,34 +76,66 @@ public static byte[] JWK_to_secp256k1PrivateKeyBytes(JWK jsonWebKey) {
7276
return jsonWebKey.getDdecoded();
7377
}
7478

75-
public static KeyPair JWK_to_BLS12381_G1PrivateKey(JWK jsonWebKey) {
79+
public static KeyPair JWK_to_Bls12381G1PrivateKey(JWK jsonWebKey) {
7680

77-
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
78-
if (! Curve.BLS12381_G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
81+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
82+
if (! Curve.Bls12381G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
7983

8084
return new KeyPair(jsonWebKey.getXdecoded(), jsonWebKey.getDdecoded());
8185
}
8286

83-
public static byte[] JWK_to_BLS12381_G1PrivateKeyBytes(JWK jsonWebKey) {
87+
public static byte[] JWK_to_Bls12381G1PrivateKeyBytes(JWK jsonWebKey) {
8488

85-
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
86-
if (! Curve.BLS12381_G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
89+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
90+
if (! Curve.Bls12381G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
8791

8892
return jsonWebKey.getDdecoded();
8993
}
9094

91-
public static KeyPair JWK_to_BLS12381_G2PrivateKey(JWK jsonWebKey) {
95+
public static KeyPair JWK_to_Bls12381G2PrivateKey(JWK jsonWebKey) {
9296

93-
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
94-
if (! Curve.BLS12381_G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
97+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
98+
if (! Curve.Bls12381G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
9599

96100
return new KeyPair(jsonWebKey.getXdecoded(), jsonWebKey.getDdecoded());
97101
}
98102

99-
public static byte[] JWK_to_BLS12381_G2PrivateKeyBytes(JWK jsonWebKey) {
103+
public static byte[] JWK_to_Bls12381G2PrivateKeyBytes(JWK jsonWebKey) {
100104

101-
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
102-
if (! Curve.BLS12381_G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
105+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
106+
if (! Curve.Bls12381G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
107+
108+
return jsonWebKey.getDdecoded();
109+
}
110+
111+
public static KeyPair JWK_to_Bls48581G1PrivateKey(JWK jsonWebKey) {
112+
113+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
114+
if (! Curve.Bls48581G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
115+
116+
return new KeyPair(jsonWebKey.getXdecoded(), jsonWebKey.getDdecoded());
117+
}
118+
119+
public static byte[] JWK_to_Bls48581G1PrivateKeyBytes(JWK jsonWebKey) {
120+
121+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
122+
if (! Curve.Bls48581G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
123+
124+
return jsonWebKey.getDdecoded();
125+
}
126+
127+
public static KeyPair JWK_to_Bls48581G2PrivateKey(JWK jsonWebKey) {
128+
129+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
130+
if (! Curve.Bls48581G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
131+
132+
return new KeyPair(jsonWebKey.getXdecoded(), jsonWebKey.getDdecoded());
133+
}
134+
135+
public static byte[] JWK_to_Bls48581G2PrivateKeyBytes(JWK jsonWebKey) {
136+
137+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
138+
if (! Curve.Bls48581G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
103139

104140
return jsonWebKey.getDdecoded();
105141
}

src/main/java/com/danubetech/keyformats/JWK_to_PublicKey.java

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ public static Object JWK_to_anyPublicKey(JWK jsonWebKey) {
3030
return JWK_to_RSAPublicKey(jsonWebKey);
3131
else if (keyType == KeyTypeName.secp256k1)
3232
return JWK_to_secp256k1PublicKey(jsonWebKey);
33-
else if (keyType == KeyTypeName.BLS12381_G1)
34-
return JWK_to_BLS12381_G2PublicKeyBytes(jsonWebKey);
35-
else if (keyType == KeyTypeName.BLS12381_G2)
36-
return JWK_to_BLS12381_G2PublicKeyBytes(jsonWebKey);
33+
else if (keyType == KeyTypeName.Bls12381G1)
34+
return JWK_to_Bls12381G1PublicKeyBytes(jsonWebKey);
35+
else if (keyType == KeyTypeName.Bls12381G2)
36+
return JWK_to_Bls12381G2PublicKeyBytes(jsonWebKey);
37+
else if (keyType == KeyTypeName.Bls48581G1)
38+
return JWK_to_Bls48581G1PublicKeyBytes(jsonWebKey);
39+
else if (keyType == KeyTypeName.Bls48581G2)
40+
return JWK_to_Bls48581G2PublicKeyBytes(jsonWebKey);
3741
else if (keyType == KeyTypeName.Ed25519)
3842
return JWK_to_Ed25519PublicKeyBytes(jsonWebKey);
3943
else if (keyType == KeyTypeName.X25519)
@@ -88,18 +92,34 @@ public static byte[] JWK_to_secp256k1PublicKeyBytes(JWK jsonWebKey) {
8892
return publicKeyBytes;
8993
}
9094

91-
public static byte[] JWK_to_BLS12381_G1PublicKeyBytes(JWK jsonWebKey) {
95+
public static byte[] JWK_to_Bls12381G1PublicKeyBytes(JWK jsonWebKey) {
9296

93-
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
94-
if (! Curve.BLS12381_G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
97+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
98+
if (! Curve.Bls12381G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
9599

96100
return jsonWebKey.getXdecoded();
97101
}
98102

99-
public static byte[] JWK_to_BLS12381_G2PublicKeyBytes(JWK jsonWebKey) {
103+
public static byte[] JWK_to_Bls12381G2PublicKeyBytes(JWK jsonWebKey) {
100104

101-
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
102-
if (! Curve.BLS12381_G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
105+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
106+
if (! Curve.Bls12381G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
107+
108+
return jsonWebKey.getXdecoded();
109+
}
110+
111+
public static byte[] JWK_to_Bls48581G1PublicKeyBytes(JWK jsonWebKey) {
112+
113+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
114+
if (! Curve.Bls48581G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
115+
116+
return jsonWebKey.getXdecoded();
117+
}
118+
119+
public static byte[] JWK_to_Bls48581G2PublicKeyBytes(JWK jsonWebKey) {
120+
121+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
122+
if (! Curve.Bls48581G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
103123

104124
return jsonWebKey.getXdecoded();
105125
}

src/main/java/com/danubetech/keyformats/PrivateKey_to_JWK.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ public static JWK secp256k1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, String
6868
return secp256k1PrivateKey_to_JWK(privateKey, kid, use);
6969
}
7070

71-
public static JWK BLS12381_G1PrivateKey_to_JWK(KeyPair privateKey, String kid, String use) {
71+
public static JWK Bls12381G1PrivateKey_to_JWK(KeyPair privateKey, String kid, String use) {
7272

7373
byte[] publicKeyBytes = privateKey.publicKey;
7474
byte[] privateKeyBytes = privateKey.secretKey;
7575

7676
JWK jsonWebKey = new JWK();
77-
jsonWebKey.setKty(KeyType.EC);
78-
jsonWebKey.setCrv(Curve.BLS12381_G1);
77+
jsonWebKey.setKty(KeyType.OKP);
78+
jsonWebKey.setCrv(Curve.Bls12381G1);
7979
jsonWebKey.setKid(kid);
8080
jsonWebKey.setUse(use);
8181
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
@@ -84,21 +84,21 @@ public static JWK BLS12381_G1PrivateKey_to_JWK(KeyPair privateKey, String kid, S
8484
return jsonWebKey;
8585
}
8686

87-
public static JWK BLS12381_G1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
87+
public static JWK Bls12381G1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
8888

8989
KeyPair privateKey = new KeyPair(publicKeyBytes, privateKeyBytes);
9090

91-
return BLS12381_G1PrivateKey_to_JWK(privateKey, kid, use);
91+
return Bls12381G1PrivateKey_to_JWK(privateKey, kid, use);
9292
}
9393

94-
public static JWK BLS12381_G2PrivateKey_to_JWK(KeyPair privateKey, String kid, String use) {
94+
public static JWK Bls12381G2PrivateKey_to_JWK(KeyPair privateKey, String kid, String use) {
9595

9696
byte[] publicKeyBytes = privateKey.publicKey;
9797
byte[] privateKeyBytes = privateKey.secretKey;
9898

9999
JWK jsonWebKey = new JWK();
100-
jsonWebKey.setKty(KeyType.EC);
101-
jsonWebKey.setCrv(Curve.BLS12381_G2);
100+
jsonWebKey.setKty(KeyType.OKP);
101+
jsonWebKey.setCrv(Curve.Bls12381G2);
102102
jsonWebKey.setKid(kid);
103103
jsonWebKey.setUse(use);
104104
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
@@ -107,11 +107,11 @@ public static JWK BLS12381_G2PrivateKey_to_JWK(KeyPair privateKey, String kid, S
107107
return jsonWebKey;
108108
}
109109

110-
public static JWK BLS12381_G2PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
110+
public static JWK Bls12381G2PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
111111

112112
KeyPair privateKey = new KeyPair(publicKeyBytes, privateKeyBytes);
113113

114-
return BLS12381_G2PrivateKey_to_JWK(privateKey, kid, use);
114+
return Bls12381G2PrivateKey_to_JWK(privateKey, kid, use);
115115
}
116116

117117
public static JWK Ed25519PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {

src/main/java/com/danubetech/keyformats/PublicKey_to_JWK.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,46 +62,46 @@ public static JWK secp256k1PublicKeyBytes_to_JWK(byte[] publicKeyBytes, String k
6262
return secp256k1PublicKey_to_JWK(publicKey, kid, use);
6363
}
6464

65-
public static JWK BLS12381_G1PublicKey_to_JWK(KeyPair publicKey, String kid, String use) {
65+
public static JWK Bls12381G1PublicKey_to_JWK(KeyPair publicKey, String kid, String use) {
6666

6767
byte[] publicKeyBytes = publicKey.publicKey;
6868

6969
JWK jsonWebKey = new JWK();
70-
jsonWebKey.setKty(KeyType.EC);
71-
jsonWebKey.setCrv(Curve.BLS12381_G1);
70+
jsonWebKey.setKty(KeyType.OKP);
71+
jsonWebKey.setCrv(Curve.Bls12381G1);
7272
jsonWebKey.setKid(kid);
7373
jsonWebKey.setUse(use);
7474
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
7575

7676
return jsonWebKey;
7777
}
7878

79-
public static JWK BLS12381_G1PublicKeyBytes_to_JWK(byte[] publicKeyBytes, String kid, String use) {
79+
public static JWK Bls12381G1PublicKeyBytes_to_JWK(byte[] publicKeyBytes, String kid, String use) {
8080

8181
KeyPair publicKey = new KeyPair(publicKeyBytes, null);
8282

83-
return BLS12381_G1PublicKey_to_JWK(publicKey, kid, use);
83+
return Bls12381G1PublicKey_to_JWK(publicKey, kid, use);
8484
}
8585

86-
public static JWK BLS12381_G2PublicKey_to_JWK(KeyPair publicKey, String kid, String use) {
86+
public static JWK Bls12381G2PublicKey_to_JWK(KeyPair publicKey, String kid, String use) {
8787

8888
byte[] publicKeyBytes = publicKey.publicKey;
8989

9090
JWK jsonWebKey = new JWK();
91-
jsonWebKey.setKty(KeyType.EC);
92-
jsonWebKey.setCrv(Curve.BLS12381_G2);
91+
jsonWebKey.setKty(KeyType.OKP);
92+
jsonWebKey.setCrv(Curve.Bls12381G2);
9393
jsonWebKey.setKid(kid);
9494
jsonWebKey.setUse(use);
9595
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
9696

9797
return jsonWebKey;
9898
}
9999

100-
public static JWK BLS12381_G2PublicKeyBytes_to_JWK(byte[] publicKeyBytes, String kid, String use) {
100+
public static JWK Bls12381G2PublicKeyBytes_to_JWK(byte[] publicKeyBytes, String kid, String use) {
101101

102102
KeyPair publicKey = new KeyPair(publicKeyBytes, null);
103103

104-
return BLS12381_G2PublicKey_to_JWK(publicKey, kid, use);
104+
return Bls12381G2PublicKey_to_JWK(publicKey, kid, use);
105105
}
106106

107107
public static JWK Ed25519PublicKeyBytes_to_JWK(byte[] publicKeyBytes, String kid, String use) {

src/main/java/com/danubetech/keyformats/crypto/PrivateKeySignerFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ public static PrivateKeySigner<?> privateKeySignerForKey(KeyTypeName keyTypeName
2323
} else if (KeyTypeName.secp256k1.equals(keyTypeName)) {
2424

2525
if (JWSAlgorithm.ES256K.equals(algorithm)) return new secp256k1_ES256K_PrivateKeySigner((ECKey) privateKey);
26-
} else if (KeyTypeName.BLS12381_G1.equals(keyTypeName)) {
26+
} else if (KeyTypeName.Bls12381G1.equals(keyTypeName)) {
2727

28-
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new BLS12381_G1_BBSPlus_PrivateKeySigner((KeyPair) privateKey);
29-
} else if (KeyTypeName.BLS12381_G2.equals(keyTypeName)) {
28+
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new Bls12381G1_BBSPlus_PrivateKeySigner((KeyPair) privateKey);
29+
} else if (KeyTypeName.Bls12381G2.equals(keyTypeName)) {
3030

31-
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new BLS12381_G2_BBSPlus_PrivateKeySigner((KeyPair) privateKey);
31+
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new Bls12381G2_BBSPlus_PrivateKeySigner((KeyPair) privateKey);
3232
} else if (KeyTypeName.Ed25519.equals(keyTypeName)) {
3333

3434
if (JWSAlgorithm.EdDSA.equals(algorithm)) return new Ed25519_EdDSA_PrivateKeySigner((byte[]) privateKey);

src/main/java/com/danubetech/keyformats/crypto/PublicKeyVerifierFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ public static PublicKeyVerifier<?> publicKeyVerifierForKey(KeyTypeName keyTypeNa
2222
} else if (KeyTypeName.secp256k1.equals(keyTypeName)) {
2323

2424
if (JWSAlgorithm.ES256K.equals(algorithm)) return new secp256k1_ES256K_PublicKeyVerifier((ECKey) publicKey);
25-
} else if (KeyTypeName.BLS12381_G1.equals(keyTypeName)) {
25+
} else if (KeyTypeName.Bls12381G1.equals(keyTypeName)) {
2626

27-
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new BLS12381_G1_BBSPlus_PublicKeyVerifier((ECKey) publicKey);
28-
} else if (KeyTypeName.BLS12381_G2.equals(keyTypeName)) {
27+
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new Bls12381G1_BBSPlus_PublicKeyVerifier((ECKey) publicKey);
28+
} else if (KeyTypeName.Bls12381G2.equals(keyTypeName)) {
2929

30-
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new BLS12381_G2_BBSPlus_PublicKeyVerifier((ECKey) publicKey);
30+
if (JWSAlgorithm.BBSPlus.equals(algorithm)) return new Bls12381G2_BBSPlus_PublicKeyVerifier((ECKey) publicKey);
3131
} else if (KeyTypeName.Ed25519.equals(keyTypeName)) {
3232

3333
if (JWSAlgorithm.EdDSA.equals(algorithm)) return new Ed25519_EdDSA_PublicKeyVerifier((byte[]) publicKey);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import java.security.GeneralSecurityException;
99

10-
public class BLS12381_G1_BBSPlus_PrivateKeySigner extends PrivateKeySigner<KeyPair> {
10+
public class Bls12381G1_BBSPlus_PrivateKeySigner extends PrivateKeySigner<KeyPair> {
1111

12-
public BLS12381_G1_BBSPlus_PrivateKeySigner(KeyPair privateKey) {
12+
public Bls12381G1_BBSPlus_PrivateKeySigner(KeyPair privateKey) {
1313

1414
super(privateKey, JWSAlgorithm.BBSPlus);
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import java.security.GeneralSecurityException;
99

10-
public class BLS12381_G1_BBSPlus_PublicKeyVerifier extends PublicKeyVerifier<ECKey> {
10+
public class Bls12381G1_BBSPlus_PublicKeyVerifier extends PublicKeyVerifier<ECKey> {
1111

12-
public BLS12381_G1_BBSPlus_PublicKeyVerifier(ECKey publicKey) {
12+
public Bls12381G1_BBSPlus_PublicKeyVerifier(ECKey publicKey) {
1313

1414
super(publicKey, JWSAlgorithm.BBSPlus);
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import java.security.GeneralSecurityException;
99

10-
public class BLS12381_G2_BBSPlus_PrivateKeySigner extends PrivateKeySigner<KeyPair> {
10+
public class Bls12381G2_BBSPlus_PrivateKeySigner extends PrivateKeySigner<KeyPair> {
1111

12-
public BLS12381_G2_BBSPlus_PrivateKeySigner(KeyPair privateKey) {
12+
public Bls12381G2_BBSPlus_PrivateKeySigner(KeyPair privateKey) {
1313

1414
super(privateKey, JWSAlgorithm.BBSPlus);
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import java.security.GeneralSecurityException;
99

10-
public class BLS12381_G2_BBSPlus_PublicKeyVerifier extends PublicKeyVerifier<ECKey> {
10+
public class Bls12381G2_BBSPlus_PublicKeyVerifier extends PublicKeyVerifier<ECKey> {
1111

12-
public BLS12381_G2_BBSPlus_PublicKeyVerifier(ECKey publicKey) {
12+
public Bls12381G2_BBSPlus_PublicKeyVerifier(ECKey publicKey) {
1313

1414
super(publicKey, JWSAlgorithm.BBSPlus);
1515
}

0 commit comments

Comments
 (0)