src/wcc.c.in [287:325]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OCT_joctet(&HV,&wPaG1Oct); mhashit(sha,0,&HV,&HT); OCT_empty(AESKeyOct); OCT_jbytes(AESKeyOct,HT.val,AESKEY_ZZZ); return 0; } /* Generate a random number modulus the group order */ int WCC_ZZZ_RANDOM_GENERATE(csprng *RNG,octet* S) { BIG_XXX r,s; BIG_XXX_rcopy(r,CURVE_Order_ZZZ); BIG_XXX_randomnum(s,r,RNG); BIG_XXX_toBytes(S->val,s); S->len=WCC_PGS_ZZZ; return 0; } /* Add two members from the group G1 */ int WCC_ZZZ_RECOMBINE_G1(octet *R1,octet *R2,octet *R) { ECP_ZZZ P,T; int res=0; if (!ECP_ZZZ_fromOctet(&P,R1)) res=WCC_INVALID_POINT; if (!ECP_ZZZ_fromOctet(&T,R2)) res=WCC_INVALID_POINT; if (res==0) { ECP_ZZZ_add(&P,&T); ECP_ZZZ_toOctet(R,&P,false); } return res; } /* Add two members from the group G2 */ int WCC_ZZZ_RECOMBINE_G2(octet *W1,octet *W2,octet *W) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - src/wcc256.c.in [357:395]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OCT_joctet(&HV,&wPaG1Oct); mhashit(sha,0,&HV,&HT); OCT_empty(AESKeyOct); OCT_jbytes(AESKeyOct,HT.val,AESKEY_ZZZ); return 0; } /* Generate a random number modulus the group order */ int WCC_ZZZ_RANDOM_GENERATE(csprng *RNG,octet* S) { BIG_XXX r,s; BIG_XXX_rcopy(r,CURVE_Order_ZZZ); BIG_XXX_randomnum(s,r,RNG); BIG_XXX_toBytes(S->val,s); S->len=WCC_PGS_ZZZ; return 0; } /* Add two members from the group G1 */ int WCC_ZZZ_RECOMBINE_G1(octet *R1,octet *R2,octet *R) { ECP_ZZZ P,T; int res=0; if (!ECP_ZZZ_fromOctet(&P,R1)) res=WCC_INVALID_POINT; if (!ECP_ZZZ_fromOctet(&T,R2)) res=WCC_INVALID_POINT; if (res==0) { ECP_ZZZ_add(&P,&T); ECP_ZZZ_toOctet(R,&P,false); } return res; } /* Add two members from the group G2 */ int WCC_ZZZ_RECOMBINE_G2(octet *W1,octet *W2,octet *W) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -