Searched refs:bnP (Results 1 – 5 of 5) sorted by relevance
/external/tpm2/ |
D | RSAKeySieve.c | 563 BIGNUM *bnP, // IN/OUT: The candidate to filter in PrimeSelectWithSieve() argument 578 UINT32 rounds = MillerRabinRounds(BN_num_bits(bnP)); in PrimeSelectWithSieve() 584 primes = BN_num_bits(bnP); in PrimeSelectWithSieve() 606 first = bnP->d[0] | 0x80000000; in PrimeSelectWithSieve() 608 bnP->d[0] &= ~((UINT32)(fieldSize-3)); in PrimeSelectWithSieve() 609 pAssert(BN_is_bit_set(bnP, 0)); in PrimeSelectWithSieve() 610 bnP->d[0] &= (UINT32_MAX << (FIELD_POWER + 1)) + 1; in PrimeSelectWithSieve() 611 ones = PrimeSieve(bnP, fieldSize, field, primes); in PrimeSelectWithSieve() 628 BN_add_word(bnP, chosen * 2); in PrimeSelectWithSieve() 630 if(MillerRabin(bnP, rounds, ktx, context)) in PrimeSelectWithSieve() [all …]
|
D | CpriRSA.c | 40 BIGNUM *bnP; in RsaPrivateExponent() local 55 bnP = BN_CTX_get(context); in RsaPrivateExponent() 64 || BN_bin2bn(key->privateKey->buffer, key->privateKey->size, bnP) == NULL) in RsaPrivateExponent() 70 if(BN_num_bits(bnP) < BN_num_bits(bnN)/2) in RsaPrivateExponent() 76 if (BN_div(bnQ, bnQr, bnN, bnP, context) != 1) in RsaPrivateExponent() 79 if(BN_num_bytes(bnQr) != 0 || BN_num_bits(bnQ) != BN_num_bits(bnP)) in RsaPrivateExponent() 86 || !BN_sub(bnPhi, bnPhi, bnP) in RsaPrivateExponent() 145 BIGNUM *bnP; in _cpri__TestKeyRSA() local 166 bnP = BN_CTX_get(context); // prime1 (p) in _cpri__TestKeyRSA() 172 if(BN_bin2bn(prime1->buffer, prime1->size, bnP) == NULL) in _cpri__TestKeyRSA() [all …]
|
D | MathFunctions.c | 218 BIGNUM *bnP; in _math__Mul() local 234 bnP = BN_CTX_get(context); in _math__Mul() 235 if (bnP == NULL) in _math__Mul() 243 if (BN_mul(bnP, bnA, bnB, context) != 1) in _math__Mul() 247 retVal = BN_num_bytes(bnP); in _math__Mul() 250 BN_bn2bin(bnP, &p[aSize + bSize - retVal]); in _math__Mul() 256 BN_bn2bin(bnP, p); in _math__Mul()
|
D | CpriECC.c | 151 BIGNUM *bnP; in EccCurveInit() local 165 bnP = BN_CTX_get(context); in EccCurveInit() 175 BnFrom2B(bnP, curveData->p); in EccCurveInit() 184 ok = ( (group = EC_GROUP_new_curve_GFp(bnP, bnA, bnB, groupContext)) != NULL in EccCurveInit() 597 BIGNUM *bnP; in _cpri__EccIsPointOnCurve() local 610 bnP = BN_CTX_get(context); in _cpri__EccIsPointOnCurve() 611 if(bnP == NULL) in _cpri__EccIsPointOnCurve() 616 || !BN_bin2bn(curveData->p->buffer, curveData->p->size, bnP) in _cpri__EccIsPointOnCurve() 625 if( !BN_mod_mul(bnA, bnA, bnX, bnP, context) in _cpri__EccIsPointOnCurve() 628 || !BN_mod_add(bnA, bnA, bnB, bnP, context) in _cpri__EccIsPointOnCurve() [all …]
|
D | part4.txt | 25784 144 BIGNUM *bnP; 25806 160 bnP = BN_CTX_get(context); 25807 161 if (bnP == NULL) 25817 171 if (BN_mul(bnP, bnA, bnB, context) != 1) 25822 176 retVal = BN_num_bytes(bnP); 25825 179 BN_bn2bin(bnP, &p[aSize + bSize - retVal]); 25831 185 BN_bn2bin(bnP, p); 28866 12 BIGNUM *bnP; 28889 30 bnP = BN_CTX_get(context); 28901 42 || BN_bin2bn(key->privateKey->buffer, key->privateKey->size, bnP) == NULL) [all …]
|