Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions wolfcrypt/src/sp_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -9561,7 +9561,8 @@ static int _sp_mul(const sp_int* a, const sp_int* b, sp_int* r)
#endif

#ifndef WOLFSSL_SP_SMALL
#if !defined(WOLFSSL_HAVE_SP_ECC) && defined(HAVE_ECC)
#if defined(HAVE_ECC) && (!defined(WOLFSSL_HAVE_SP_ECC) || \
defined(WOLFSSL_SP_MATH_ALL))
#if (SP_WORD_SIZE == 64 && SP_INT_BITS >= 256)
#ifndef SQR_MUL_ASM
/* Multiply a by b and store in r: r = a * b
Expand Down Expand Up @@ -10257,7 +10258,7 @@ static int _sp_mul_12(const sp_int* a, const sp_int* b, sp_int* r)
}
#endif /* SQR_MUL_ASM */
#endif /* SP_WORD_SIZE == 32 */
#endif /* !WOLFSSL_HAVE_SP_ECC && HAVE_ECC */
#endif /* HAVE_ECC && (!WOLFSSL_HAVE_SP_ECC || WOLFSSL_SP_MATH_ALL) */

#if defined(SQR_MUL_ASM) && (defined(WOLFSSL_SP_INT_LARGE_COMBA) || \
(!defined(WOLFSSL_SP_MATH) && defined(WOLFCRYPT_HAVE_SAKKE) && \
Expand Down Expand Up @@ -12203,7 +12204,8 @@ int sp_mul(const sp_int* a, const sp_int* b, sp_int* r)
}
else
#ifndef WOLFSSL_SP_SMALL
#if !defined(WOLFSSL_HAVE_SP_ECC) && defined(HAVE_ECC)
#if defined(HAVE_ECC) && (!defined(WOLFSSL_HAVE_SP_ECC) || \
defined(WOLFSSL_SP_MATH_ALL))
#if (SP_WORD_SIZE == 64 && SP_INT_BITS >= 256)
if ((a->used == 4) && (b->used == 4)) {
err = _sp_mul_4(a, b, r);
Expand Down Expand Up @@ -12234,7 +12236,7 @@ int sp_mul(const sp_int* a, const sp_int* b, sp_int* r)
else
#endif /* SQR_MUL_ASM */
#endif /* SP_WORD_SIZE == 32 */
#endif /* !WOLFSSL_HAVE_SP_ECC && HAVE_ECC */
#endif /* HAVE_ECC && (!WOLFSSL_HAVE_SP_ECC || WOLFSSL_SP_MATH_ALL) */
#if defined(SQR_MUL_ASM) && (defined(WOLFSSL_SP_INT_LARGE_COMBA) || \
(!defined(WOLFSSL_SP_MATH) && defined(WOLFCRYPT_HAVE_SAKKE) && \
(SP_WORD_SIZE == 64)))
Expand Down Expand Up @@ -15324,7 +15326,8 @@ static int _sp_sqr(const sp_int* a, sp_int* r)
#endif /* !WOLFSSL_SP_MATH || !WOLFSSL_SP_SMALL */

#ifndef WOLFSSL_SP_SMALL
#if !defined(WOLFSSL_HAVE_SP_ECC) && defined(HAVE_ECC)
#if defined(HAVE_ECC) && (!defined(WOLFSSL_HAVE_SP_ECC) || \
defined(WOLFSSL_SP_MATH_ALL))
#if (SP_WORD_SIZE == 64 && SP_INT_BITS >= 256)
#ifndef SQR_MUL_ASM
/* Square a and store in r. r = a * a
Expand Down Expand Up @@ -15928,7 +15931,7 @@ static int _sp_sqr_12(const sp_int* a, sp_int* r)
}
#endif /* SQR_MUL_ASM */
#endif /* SP_WORD_SIZE == 32 */
#endif /* !WOLFSSL_HAVE_SP_ECC && HAVE_ECC */
#endif /* HAVE_ECC && (!WOLFSSL_HAVE_SP_ECC || WOLFSSL_SP_MATH_ALL) */

#if defined(SQR_MUL_ASM) && (defined(WOLFSSL_SP_INT_LARGE_COMBA) || \
(!defined(WOLFSSL_SP_MATH) && defined(WOLFCRYPT_HAVE_SAKKE) && \
Expand Down Expand Up @@ -17428,7 +17431,8 @@ int sp_sqr(const sp_int* a, sp_int* r)
}
else
#ifndef WOLFSSL_SP_SMALL
#if !defined(WOLFSSL_HAVE_SP_ECC) && defined(HAVE_ECC)
#if defined(HAVE_ECC) && (!defined(WOLFSSL_HAVE_SP_ECC) || \
defined(WOLFSSL_SP_MATH_ALL))
#if (SP_WORD_SIZE == 64 && SP_INT_BITS >= 256)
if (a->used == 4) {
err = _sp_sqr_4(a, r);
Expand Down Expand Up @@ -17459,7 +17463,7 @@ int sp_sqr(const sp_int* a, sp_int* r)
else
#endif /* SQR_MUL_ASM */
#endif /* SP_WORD_SIZE == 32 */
#endif /* !WOLFSSL_HAVE_SP_ECC && HAVE_ECC */
#endif /* HAVE_ECC && (!WOLFSSL_HAVE_SP_ECC || WOLFSSL_SP_MATH_ALL) */
#if defined(SQR_MUL_ASM) && (defined(WOLFSSL_SP_INT_LARGE_COMBA) || \
(!defined(WOLFSSL_SP_MATH) && defined(WOLFCRYPT_HAVE_SAKKE) && \
(SP_WORD_SIZE == 64)))
Expand Down
Loading