mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Montgomery-related minor cleanups/documentation
This commit is contained in:
parent
8a2062fefe
commit
d05a474556
@ -1268,11 +1268,11 @@ if ($ranlib eq "")
|
|||||||
$cpuid_obj="" if ($processor eq "386");
|
$cpuid_obj="" if ($processor eq "386");
|
||||||
|
|
||||||
$bn_obj = $bn_asm unless $bn_obj ne "";
|
$bn_obj = $bn_asm unless $bn_obj ne "";
|
||||||
# bn86* is the only one implementing bn_*_part_words
|
# bn-586 is the only one implementing bn_*_part_words
|
||||||
$cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn(86|-586)/);
|
$cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn-586/);
|
||||||
$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /86/);
|
$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /86/);
|
||||||
|
|
||||||
$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /\-mont|mo86\-/);
|
$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /-mont/);
|
||||||
|
|
||||||
$cpuid_obj="mem_clr.o" unless ($cpuid_obj =~ /\.o$/);
|
$cpuid_obj="mem_clr.o" unless ($cpuid_obj =~ /\.o$/);
|
||||||
$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
|
$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
|
||||||
|
@ -315,7 +315,8 @@ struct bn_mont_ctx_st
|
|||||||
BIGNUM N; /* The modulus */
|
BIGNUM N; /* The modulus */
|
||||||
BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
|
BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
|
||||||
* (Ni is only stored for bignum algorithm) */
|
* (Ni is only stored for bignum algorithm) */
|
||||||
BN_ULONG n0[2];/* least significant word(s) of Ni */
|
BN_ULONG n0[2];/* least significant word(s) of Ni;
|
||||||
|
(type changed with 0.9.9, was "BN_ULONG n0;" before) */
|
||||||
int flags;
|
int flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -394,6 +394,7 @@ void BN_MONT_CTX_init(BN_MONT_CTX *ctx)
|
|||||||
BN_init(&(ctx->RR));
|
BN_init(&(ctx->RR));
|
||||||
BN_init(&(ctx->N));
|
BN_init(&(ctx->N));
|
||||||
BN_init(&(ctx->Ni));
|
BN_init(&(ctx->Ni));
|
||||||
|
ctx->n0[0] = ctx->n0[1] = 0;
|
||||||
ctx->flags=0;
|
ctx->flags=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user