]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
bn: Remove the BN_SQR_COMBA cpp define
authorGleb Popov <6yearold@gmail.com>
Fri, 9 Jan 2026 14:13:32 +0000 (17:13 +0300)
committerTomas Mraz <tomas@openssl.org>
Mon, 12 Jan 2026 18:44:10 +0000 (19:44 +0100)
Just like in previous commit, this define does not represent a toggleable
feature, but is entirely dependent on the OPENSSL_SMALL_FOOTPRINT define.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 12 18:44:25 2026
(Merged from https://github.com/openssl/openssl/pull/29204)

crypto/bn/bn_local.h
crypto/bn/bn_sqr.c

index 61f45ecf9a062b5803ccdbf1c636ab6f32f68205..7a4d9e7a088469453445d2f23013dfe734dbd01d 100644 (file)
@@ -53,7 +53,6 @@
 #endif
 
 #ifndef OPENSSL_SMALL_FOOTPRINT
-#define BN_SQR_COMBA
 #define BN_RECURSION
 #endif
 
index 34b33a30a3bdf560073107d6f915d147ec6b001e..4d420fa14a10adc0dcd55e43da7bae658b7a9440 100644 (file)
@@ -50,14 +50,14 @@ int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
         goto err;
 
     if (al == 4) {
-#ifndef BN_SQR_COMBA
+#ifdef OPENSSL_SMALL_FOOTPRINT
         BN_ULONG t[8];
         bn_sqr_normal(rr->d, a->d, 4, t);
 #else
         bn_sqr_comba4(rr->d, a->d);
 #endif
     } else if (al == 8) {
-#ifndef BN_SQR_COMBA
+#ifdef OPENSSL_SMALL_FOOTPRINT
         BN_ULONG t[16];
         bn_sqr_normal(rr->d, a->d, 8, t);
 #else
@@ -160,14 +160,14 @@ void bn_sqr_recursive(BN_ULONG *r, const BN_ULONG *a, int n2, BN_ULONG *t)
     BN_ULONG ln, lo, *p;
 
     if (n2 == 4) {
-#ifndef BN_SQR_COMBA
+#ifdef OPENSSL_SMALL_FOOTPRINT
         bn_sqr_normal(r, a, 4, t);
 #else
         bn_sqr_comba4(r, a);
 #endif
         return;
     } else if (n2 == 8) {
-#ifndef BN_SQR_COMBA
+#ifdef OPENSSL_SMALL_FOOTPRINT
         bn_sqr_normal(r, a, 8, t);
 #else
         bn_sqr_comba8(r, a);