Remove the unused |Ni| member of |BN_MONT_CTX|.

Change-Id: I0a542c48c7adae28f05778d6c34c9b6836fc3449
Reviewed-on: https://boringssl-review.googlesource.com/6480
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
Brian Smith 2015-11-11 18:36:23 -10:00 committed by Adam Langley
parent ce7ae6fa27
commit 8bde5d2e51
2 changed files with 2 additions and 8 deletions

View File

@ -134,7 +134,6 @@ BN_MONT_CTX *BN_MONT_CTX_new(void) {
memset(ret, 0, sizeof(BN_MONT_CTX));
BN_init(&ret->RR);
BN_init(&ret->N);
BN_init(&ret->Ni);
return ret;
}
@ -146,7 +145,6 @@ void BN_MONT_CTX_free(BN_MONT_CTX *mont) {
BN_free(&mont->RR);
BN_free(&mont->N);
BN_free(&mont->Ni);
OPENSSL_free(mont);
}
@ -156,8 +154,7 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, const BN_MONT_CTX *from) {
}
if (!BN_copy(&to->RR, &from->RR) ||
!BN_copy(&to->N, &from->N) ||
!BN_copy(&to->Ni, &from->Ni)) {
!BN_copy(&to->N, &from->N)) {
return NULL;
}
to->ri = from->ri;

View File

@ -836,10 +836,7 @@ struct bignum_st {
struct bn_mont_ctx_st {
BIGNUM RR; /* used to convert to montgomery form */
BIGNUM N; /* The modulus */
BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
* (Ni is only stored for bignum algorithm) */
BN_ULONG n0[2]; /* least significant word(s) of Ni;
(type changed with 0.9.9, was "BN_ULONG n0;" before) */
BN_ULONG n0[2]; /* least significant words of (R*Ri-1)/N */
int ri; /* number of bits in R */
};