Home
last modified time | relevance | path

Searched refs:bnN (Results 1 – 5 of 5) sorted by relevance

/external/tpm2/
DCpriECC.c156 BIGNUM *bnN; in EccCurveInit() local
170 bnN = BN_CTX_get(context); in EccCurveInit()
180 BnFrom2B(bnN, curveData->n); in EccCurveInit()
187 && EC_GROUP_set_generator(group, P, bnN, bnH) in EccCurveInit()
800 BIGNUM *bnN; in SignEcdsa() local
815 bnN = BN_CTX_get(context); in SignEcdsa()
825 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in SignEcdsa()
862 BN_mod(bnR, bnR, bnN, context); in SignEcdsa()
871 if( BN_mod_inverse(bnIk, bnK, bnN, context) != NULL) in SignEcdsa()
907 if( !BN_mod_mul(bnD, bnR, bnD, bnN, context) in SignEcdsa()
[all …]
DMathFunctions.c283 BIGNUM *bnN; in _math__Div() local
294 bnN = BN_CTX_get(context); in _math__Div()
300 || BN_bin2bn(n->buffer, n->size, bnN) == NULL in _math__Div()
307 if (BN_div(bnQ, bnR, bnN, bnD, context) != 1) in _math__Div()
452 BIGNUM *bnN; in _math__ModExp() local
461 bnN = BN_CTX_get(context); in _math__ModExp()
463 if(bnN == NULL) in _math__ModExp()
468 || BN_bin2bn(n, nSize, bnN) == NULL) in _math__ModExp()
472 if(BN_ucmp(bnM, bnN) >= 0) in _math__ModExp()
478 if(!(BN_mod_exp(bnC, bnM, bnE, bnN, context))) in _math__ModExp()
DCpriRSA.c39 BIGNUM *bnN; in RsaPrivateExponent() local
54 bnN = BN_CTX_get(context); in RsaPrivateExponent()
63 if( BN_bin2bn(key->publicKey->buffer, key->publicKey->size, bnN) == 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()
85 if( BN_copy(bnPhi, bnN) == NULL in RsaPrivateExponent()
144 BIGNUM *bnN; in _cpri__TestKeyRSA() local
165 bnN = BN_CTX_get(context); // public modulus (n) in _cpri__TestKeyRSA()
187 if(BN_mul(bnN, bnP, bnQ, context) != 1) in _cpri__TestKeyRSA()
191 if(BN_num_bits(bnN) != (publicKey->size * 8)) in _cpri__TestKeyRSA()
[all …]
DRSAKeySieve.c454 BIGNUM *bnN, // IN/OUT: number to sieve in PrimeSieve() argument
473 pAssert(field != NULL && bnN != NULL); in PrimeSieve()
481 adjust = BN_mod_word(bnN,105); in PrimeSieve()
490 BN_sub_word(bnN, adjust); in PrimeSieve()
524 composite = BN_mod_word(bnN, composite); in PrimeSieve()
805 BIGNUM *bnN; in _cpri__GenerateKeyRSA() local
827 bnN = BN_CTX_get(context); in _cpri__GenerateKeyRSA()
828 if(bnN == NULL) in _cpri__GenerateKeyRSA()
887 if( BN_mul(bnN, bnP, bnQ, context) != 1 in _cpri__GenerateKeyRSA()
888 || BN_num_bits(bnN) != keySizeInBits) in _cpri__GenerateKeyRSA()
[all …]
Dpart4.txt25859 201 BIGNUM *bnN;
25876 213 bnN = BN_CTX_get(context);
25883 220 || BN_bin2bn(n->buffer, n->size, bnN) == NULL
25892 229 if (BN_div(bnQ, bnR, bnN, bnD, context) != 1)
26054 340 BIGNUM *bnN;
26064 350 bnN = BN_CTX_get(context);
26067 353 if(bnN == NULL)
26078 359 || BN_bin2bn(n, nSize, bnN) == NULL)
26083 364 if(BN_ucmp(bnM, bnN) >= 0)
26089 370 if(!(BN_mod_exp(bnC, bnM, bnE, bnN, context)))
[all …]