Skip to content

Commit f143dbb

Browse files
Merge pull request #9217 from douzzer/20250918-25519-low-mem-gates
20250918-25519-low-mem-gates
2 parents 1f33b99 + d15523a commit f143dbb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

wolfcrypt/src/fe_operations.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/* Based On Daniel J Bernstein's curve25519 Public Domain ref10 work. */
2525

2626
#if defined(HAVE_CURVE25519) || defined(HAVE_ED25519)
27-
#if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL) /* run when not defined to use small memory math */
27+
#if !defined(CURVE25519_SMALL) && !defined(ED25519_SMALL)
2828

2929
#include <wolfssl/wolfcrypt/fe_operations.h>
3030

@@ -1479,5 +1479,5 @@ void fe_cmov(fe f, const fe g, int b)
14791479
}
14801480
#endif
14811481

1482-
#endif /* !CURVE25519_SMALL || !ED25519_SMALL */
1482+
#endif /* !CURVE25519_SMALL && !ED25519_SMALL */
14831483
#endif /* HAVE_CURVE25519 || HAVE_ED25519 */

wolfssl/wolfcrypt/fe_operations.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ WOLFSSL_LOCAL void fe_mul121666(fe h,fe f);
119119
WOLFSSL_LOCAL void fe_cmov(fe f, const fe g, int b);
120120
WOLFSSL_LOCAL void fe_pow22523(fe out,const fe z);
121121

122-
/* 64 type needed for SHA512 */
123-
WOLFSSL_LOCAL sword64 load_3(const unsigned char *in);
124-
WOLFSSL_LOCAL sword64 load_4(const unsigned char *in);
122+
#if !defined(CURVE25519_SMALL) && !defined(ED25519_SMALL)
123+
WOLFSSL_LOCAL sword64 load_3(const unsigned char *in);
124+
WOLFSSL_LOCAL sword64 load_4(const unsigned char *in);
125+
#endif
125126

126127
#ifdef CURVED25519_ASM
127128
WOLFSSL_LOCAL void fe_cmov_table(fe* r, fe* base, signed char b);

0 commit comments

Comments
 (0)