@Test void testSignatureVerifyForSomeRealValues() { String signingRoot = "0x95b8e2ba063ab62f68ebe7db0a9669ab9e7906aa4e060e1cc0b67b294ce8c5e4"; String sig = "0xab51f352e90509ca5085ec43af9ad3ea4ae42bf30c91af7dcdc113ef79cfc8601b756f18d8cf634436d8b6b0095fc5680066f382eb3728a7090c55c9afb66e8f94b44d2682db8ef5de4b89928d1744824df174e0c800b9e934b0ad14e6388163"; String pk = "0xb5e8f551c28abd6ef8253581ffad0834bfd8fafa9948d09b337c9c5f21d6e7fd6065a1ee35ac5146ac17344f97490301"; Bytes msg = Bytes.fromHexString(signingRoot); BLSSignature signature = BLSSignature.fromBytesCompressed(Bytes.fromHexString(sig)); BLSPublicKey publicKey = BLSPublicKey.fromBytesCompressed(Bytes48.fromHexString(pk)); boolean res = BLS.verify(publicKey, msg, signature); assertTrue(res); }
public static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature) { if (BLSConstants.VERIFICATION_DISABLED) { LOG.warn("Skipping bls verification."); return true; } return signature.getSignature().verify(publicKey.getPublicKey(), message); }
BLS { public static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature) { if (BLSConstants.VERIFICATION_DISABLED) { LOG.warn("Skipping bls verification."); return true; } return signature.getSignature().verify(publicKey.getPublicKey(), message); } }
BLS { public static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature) { if (BLSConstants.VERIFICATION_DISABLED) { LOG.warn("Skipping bls verification."); return true; } return signature.getSignature().verify(publicKey.getPublicKey(), message); }  }
BLS { public static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature) { if (BLSConstants.VERIFICATION_DISABLED) { LOG.warn("Skipping bls verification."); return true; } return signature.getSignature().verify(publicKey.getPublicKey(), message); }  static void setBlsImplementation(BLS12381 blsImpl); static void resetBlsImplementation(); static BLSSignature sign(BLSSecretKey secretKey, Bytes message); static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature); static BLSSignature aggregate(List<BLSSignature> signatures); static boolean aggregateVerify(
      List<BLSPublicKey> publicKeys, List<Bytes> messages, BLSSignature signature); static boolean fastAggregateVerify(
      List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys, List<Bytes> messages, List<BLSSignature> signatures); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys,
      List<Bytes> messages,
      List<BLSSignature> signatures,
      boolean doublePairing,
      boolean parallel); static BatchSemiAggregate prepareBatchVerify(
      int index, List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static BatchSemiAggregate prepareBatchVerify2(
      int index,
      List<BLSPublicKey> publicKeys1,
      Bytes message1,
      BLSSignature signature1,
      List<BLSPublicKey> publicKeys2,
      Bytes message2,
      BLSSignature signature2); static boolean completeBatchVerify(List<BatchSemiAggregate> preparedSignatures); static BLSSignature sign(BLSSecretKey secretKey, Bytes message, Bytes dst); static boolean verify(
      BLSPublicKey publicKey, Bytes message, BLSSignature signature, Bytes dst); }
BLS { public static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature) { if (BLSConstants.VERIFICATION_DISABLED) { LOG.warn("Skipping bls verification."); return true; } return signature.getSignature().verify(publicKey.getPublicKey(), message); }  static void setBlsImplementation(BLS12381 blsImpl); static void resetBlsImplementation(); static BLSSignature sign(BLSSecretKey secretKey, Bytes message); static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature); static BLSSignature aggregate(List<BLSSignature> signatures); static boolean aggregateVerify(
      List<BLSPublicKey> publicKeys, List<Bytes> messages, BLSSignature signature); static boolean fastAggregateVerify(
      List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys, List<Bytes> messages, List<BLSSignature> signatures); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys,
      List<Bytes> messages,
      List<BLSSignature> signatures,
      boolean doublePairing,
      boolean parallel); static BatchSemiAggregate prepareBatchVerify(
      int index, List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static BatchSemiAggregate prepareBatchVerify2(
      int index,
      List<BLSPublicKey> publicKeys1,
      Bytes message1,
      BLSSignature signature1,
      List<BLSPublicKey> publicKeys2,
      Bytes message2,
      BLSSignature signature2); static boolean completeBatchVerify(List<BatchSemiAggregate> preparedSignatures); static BLSSignature sign(BLSSecretKey secretKey, Bytes message, Bytes dst); static boolean verify(
      BLSPublicKey publicKey, Bytes message, BLSSignature signature, Bytes dst);  }