def _genCListParams(self, schemaId, c2: NonRevocationClaim) -> NonRevocProofXList: group = cmod.PairingGroup( PAIRING_GROUP) # super singular curve, 1024 bits rho = group.random(cmod.ZR) r = group.random(cmod.ZR) rPrime = group.random(cmod.ZR) rPrimePrime = group.random(cmod.ZR) rPrimePrimePrime = group.random(cmod.ZR) o = group.random(cmod.ZR) oPrime = group.random(cmod.ZR) m = rho * c2.c mPrime = r * rPrimePrime t = o * c2.c tPrime = oPrime * rPrimePrime m2 = group.init(cmod.ZR, int(c2.m2)) return NonRevocProofXList(rho=rho, r=r, rPrime=rPrime, rPrimePrime=rPrimePrime, rPrimePrimePrime=rPrimePrimePrime, o=o, oPrime=oPrime, m=m, mPrime=mPrime, t=t, tPrime=tPrime, m2=m2, s=c2.v, c=c2.c)
async def finalizeProof(self, schemaId, cH, initProof: NonRevocInitProof) -> NonRevocProof: if not initProof: return None group = cmod.PairingGroup( PAIRING_GROUP) # super singular curve, 1024 bits chNum_z = int_to_ZR(cH, group) XList = NonRevocProofXList.fromList([ x - chNum_z * y for x, y in zip(initProof.TauListParams.asList(), initProof.CListParams.asList()) ]) return NonRevocProof(XList, initProof.CList)
def _genTauListParams(self, schemaId) -> NonRevocProofXList: group = cmod.PairingGroup( PAIRING_GROUP) # super singular curve, 1024 bits return NonRevocProofXList(group=group)