incubator-milagro-crypto-c icon indicating copy to clipboard operation
incubator-milagro-crypto-c copied to clipboard

Python wrappers

Open GuillaumeCisco opened this issue 5 years ago • 13 comments

Hello there.

I'm trying to implement some idemix support for the fabric hyperledger tool. Main thread here: https://lists.hyperledger.org/g/fabric/message/6625

I wonder if all the python wrappers are available for the milagro crypto c libreary. For exemple. I need to translate this: go implementation:

// RandModOrder returns a random element in 0, ..., GroupOrder-1
func RandModOrder(rng *amcl.RAND) *FP256BN.BIG {
   // curve order q
   q := FP256BN.NewBIGints(FP256BN.CURVE_Order)

   // Take random element in Zq
   return FP256BN.Randomnum(q, rng)
}

or java implementation

public static BIG randModOrder(RAND rng) {
    BIG q = new BIG(ROM.CURVE_Order);

    // Takes random element in this Zq.
    return BIG.randomnum(q, rng);
}

to python code. Is this achievable right now?

Thanks,

GuillaumeCisco avatar Aug 14 '19 08:08 GuillaumeCisco