Lines Matching refs:kmflag
90 const SECItem *pointP, SECItem *pointQ, int kmflag, int timing)
152 CHECK_MPI_OK( mp_init(&Px, kmflag) );
153 CHECK_MPI_OK( mp_init(&Py, kmflag) );
154 CHECK_MPI_OK( mp_init(&Qx, kmflag) );
155 CHECK_MPI_OK( mp_init(&Qy, kmflag) );
156 CHECK_MPI_OK( mp_init(&Gx, kmflag) );
157 CHECK_MPI_OK( mp_init(&Gy, kmflag) );
158 CHECK_MPI_OK( mp_init(&order, kmflag) );
159 CHECK_MPI_OK( mp_init(&irreducible, kmflag) );
160 CHECK_MPI_OK( mp_init(&a, kmflag) );
161 CHECK_MPI_OK( mp_init(&b, kmflag) );
171 group = ECGroup_fromName(params->name, kmflag);
249 const unsigned char *privKeyBytes, int privKeyLen, int kmflag)
273 kmflag);
280 SECITEM_AllocItem(arena, &key->version, 1, kmflag);
292 &ecParams->fieldID.u.prime, kmflag));
295 &ecParams->fieldID.u.poly, kmflag));
301 &ecParams->curve.a, kmflag));
303 &ecParams->curve.b, kmflag));
305 &ecParams->curve.seed, kmflag));
307 &ecParams->base, kmflag));
309 &ecParams->order, kmflag));
312 &ecParams->DEREncoding, kmflag));
315 &ecParams->curveOID, kmflag));
318 SECITEM_AllocItem(arena, &key->publicValue, 2*len + 1, kmflag);
320 SECITEM_AllocItem(arena, &key->privateValue, len, kmflag);
332 CHECK_MPI_OK( mp_init(&k, kmflag) );
337 rv = ec_points_mul(ecParams, &k, NULL, NULL, &(key->publicValue), kmflag, /*timing*/ 0);
363 const unsigned char *seed, int seedlen, int kmflag)
366 rv = ec_NewKey(ecParams, privKey, seed, seedlen, kmflag);
386 const unsigned char *random, int randomlen, int kmflag)
396 CHECK_MPI_OK( mp_init(&privKeyVal, kmflag) );
397 CHECK_MPI_OK( mp_init(&order_1, kmflag) );
398 CHECK_MPI_OK( mp_init(&one, kmflag) );
403 if ((privKeyBytes = PORT_Alloc(2*len, kmflag)) == NULL) goto cleanup;
444 const unsigned char* random, int randomlen, int kmflag)
457 random, randomlen, kmflag);
460 CHECK_SEC_OK( ec_NewKey(ecParams, privKey, privKeyBytes, len, kmflag) );
481 EC_ValidatePublicKey(ECParams *ecParams, SECItem *publicValue, int kmflag)
506 CHECK_MPI_OK( mp_init(&Px, kmflag) );
507 CHECK_MPI_OK( mp_init(&Py, kmflag) );
514 group = ECGroup_fromName(ecParams->name, kmflag);
573 int kmflag)
591 if (EC_ValidatePublicKey(ecParams, publicValue, kmflag) != SECSuccess) {
598 if ((pointQ.data = PORT_Alloc(2*len + 1, kmflag)) == NULL) goto cleanup;
601 CHECK_MPI_OK( mp_init(&k, kmflag) );
608 CHECK_MPI_OK( mp_init(&cofactor, kmflag) );
615 if ((ec_points_mul(ecParams, NULL, &k, publicValue, &pointQ, kmflag, /*timing*/ 0) != SECSuccess) ||
622 SECITEM_AllocItem(NULL, derivedSecret, len, kmflag);
650 const SECItem *digest, const unsigned char *kb, const int kblen, int kmflag,
697 CHECK_MPI_OK( mp_init(&x1, kmflag) );
698 CHECK_MPI_OK( mp_init(&d, kmflag) );
699 CHECK_MPI_OK( mp_init(&k, kmflag) );
700 CHECK_MPI_OK( mp_init(&r, kmflag) );
701 CHECK_MPI_OK( mp_init(&s, kmflag) );
702 CHECK_MPI_OK( mp_init(&n, kmflag) );
726 kGpoint.data = PORT_Alloc(2*flen + 1, kmflag);
728 (ec_points_mul(ecParams, &k, NULL, NULL, &kGpoint, kmflag, timing)
850 const unsigned char* random, int randomLen, int kmflag, int timing)
864 random, randomLen, kmflag);
868 rv = ECDSA_SignDigestWithSeed(key, signature, digest, kBytes, len, kmflag, timing);
888 const SECItem *digest, int kmflag)
934 SECITEM_AllocItem(NULL, &pointC, 2*flen + 1, kmflag);
938 CHECK_MPI_OK( mp_init(&r_, kmflag) );
939 CHECK_MPI_OK( mp_init(&s_, kmflag) );
940 CHECK_MPI_OK( mp_init(&c, kmflag) );
941 CHECK_MPI_OK( mp_init(&u1, kmflag) );
942 CHECK_MPI_OK( mp_init(&u2, kmflag) );
943 CHECK_MPI_OK( mp_init(&x1, kmflag) );
944 CHECK_MPI_OK( mp_init(&v, kmflag) );
945 CHECK_MPI_OK( mp_init(&n, kmflag) );
1015 if (ec_points_mul(ecParams, &u1, &u2, &key->publicValue, &pointC, kmflag, /*timing*/ 0)