Class BLS12381


  • public class BLS12381
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int G1_LEN  
      static int G2_LEN  
    • Constructor Summary

      Constructors 
      Constructor Description
      BLS12381()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] aggregateG1Values​(byte[] prevAgg, byte[] values)
      Returns aggregation of prevAgg and values.
      static byte[] g1Add​(byte[] data, boolean compressed)  
      static byte[] g1ScalarMul​(byte[] scalarBytes, byte[] data, boolean compressed)  
      static byte[] g2Add​(byte[] data, boolean compressed)  
      static byte[] g2ScalarMul​(byte[] scalarBytes, byte[] data, boolean compressed)  
      static supranational.blst.P1 identity()  
      static boolean pairingCheck​(byte[] data, boolean compressed)  
      static boolean verifyG2Signature​(byte[] pubKey, byte[] sig, byte[] msg)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BLS12381

        public BLS12381()
    • Method Detail

      • identity

        public static supranational.blst.P1 identity()
      • aggregateG1Values

        public static byte[] aggregateG1Values​(byte[] prevAgg,
                                               byte[] values)
        Returns aggregation of prevAgg and values.
        Parameters:
        prevAgg - previous aggregation. null if there is no previous aggregation.
        values - values to be aggregated.
        Returns:
        aggregated value.
      • verifyG2Signature

        public static boolean verifyG2Signature​(byte[] pubKey,
                                                byte[] sig,
                                                byte[] msg)
      • g1Add

        public static byte[] g1Add​(byte[] data,
                                   boolean compressed)
      • g2Add

        public static byte[] g2Add​(byte[] data,
                                   boolean compressed)
      • g1ScalarMul

        public static byte[] g1ScalarMul​(byte[] scalarBytes,
                                         byte[] data,
                                         boolean compressed)
      • g2ScalarMul

        public static byte[] g2ScalarMul​(byte[] scalarBytes,
                                         byte[] data,
                                         boolean compressed)
      • pairingCheck

        public static boolean pairingCheck​(byte[] data,
                                           boolean compressed)