Jpbc的求逆元

调用Elemen类中的.invert()方法就可以了

见代码

public class temp {

    static Pairing bp = PairingFactory.getPairing("f.properties");
    static Field G1 = bp.getG1();
    /*static Field G2 = bp.getG2();
    static Field Zp = bp.getZr();
    static Field Gt=bp.getGT();*/

    public static void main(String[] args) {
        Element A=G1.newRandomElement().getImmutable();
        Element A_invert=A.invert();//求逆元
        
        }
    }

 

posted @ 2021-06-07 22:42  yikolemon  阅读(213)  评论(0)    收藏  举报