Skip to content

Commit 84aeeb6

Browse files
authored
Merge pull request #9580 from SparkiDev/curve25519_smul_improv
Curve25519 improvements
2 parents 19f7b94 + 3824122 commit 84aeeb6

File tree

9 files changed

+3147
-1790
lines changed

9 files changed

+3147
-1790
lines changed

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10317,6 +10317,12 @@ then
1031710317
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CURVE25519_USE_ED25519"
1031810318
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_CURVE25519_USE_ED25519"
1031910319
fi
10320+
if test "$ENABLED_CURVE25519" = "not-ed"
10321+
then
10322+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CURVE25519_NOT_USE_ED25519"
10323+
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_CURVE25519_NOT_USE_ED25519"
10324+
fi
10325+
1032010326
1032110327
AM_CFLAGS="$AM_CFLAGS -DHAVE_CURVE25519"
1032210328
AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_CURVE25519"

wolfcrypt/src/curve25519.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ const curve25519_set_type curve25519_sets[] = {
7575
}
7676
};
7777

78-
#if !defined(WOLFSSL_CURVE25519_USE_ED25519) || \
79-
defined(WOLFSSL_CURVE25519_BLINDING)
78+
#if (!defined(WOLFSSL_CURVE25519_USE_ED25519) && \
79+
!(defined(CURVED25519_X64) || (defined(WOLFSSL_ARMASM) && \
80+
defined(__aarch64__)))) || defined(WOLFSSL_CURVE25519_BLINDING)
8081
static const word32 kCurve25519BasePoint[CURVE25519_KEYSIZE/sizeof(word32)] = {
8182
#ifdef BIG_ENDIAN_ORDER
8283
0x09000000

wolfcrypt/src/ed25519.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ static int ed25519_verify_msg_final_with_sha(const byte* sig, word32 sigLen,
822822
if (ret != 0)
823823
return ret;
824824

825-
ge_tobytes(rcheck, &R);
825+
ge_tobytes_nct(rcheck, &R);
826826
#endif /* FREESCALE_LTC_ECC */
827827

828828
/* comparison of R created to R in sig */

0 commit comments

Comments
 (0)