mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 13:30:48 +02:00
wolfcrypt/src/ge_operations.c and wolfssl/wolfcrypt/ge_operations.h: when ge_tobytes_nct and ge_tobytes have identical definitions, map the former to the latter using a macro and omit the latter definition, to avoid problematic R_ARM_THM_JUMP11 tail call.
This commit is contained in:
@@ -10176,12 +10176,8 @@ void ge_tobytes(unsigned char *s,const ge_p2 *h)
|
||||
s[31] ^= (unsigned char)((unsigned char)fe_isnegative(x) << 7);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ED25519_VERIFY
|
||||
#ifndef CURVED25519_ASM_64BIT
|
||||
#define fe_invert_nct fe_invert
|
||||
#endif
|
||||
|
||||
/* ge tobytes */
|
||||
#if defined(HAVE_ED25519_VERIFY) && defined(CURVED25519_ASM_64BIT)
|
||||
/* ge tobytes_nct */
|
||||
void ge_tobytes_nct(unsigned char *s,const ge_p2 *h)
|
||||
{
|
||||
ge recip;
|
||||
@@ -10194,7 +10190,7 @@ void ge_tobytes_nct(unsigned char *s,const ge_p2 *h)
|
||||
fe_tobytes(s,y);
|
||||
s[31] ^= (unsigned char)((unsigned char)fe_isnegative(x) << 7);
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_ED25519_VERIFY && CURVED25519_ASM_64BIT */
|
||||
|
||||
#endif /* !ED25519_SMALL */
|
||||
|
||||
|
||||
@@ -85,11 +85,13 @@ WOLFSSL_LOCAL void sc_reduce(byte* s);
|
||||
WOLFSSL_LOCAL void sc_muladd(byte* s, const byte* a, const byte* b,
|
||||
const byte* c);
|
||||
WOLFSSL_LOCAL void ge_tobytes(unsigned char *s,const ge_p2 *h);
|
||||
#ifndef ED25519_SMALL
|
||||
#ifdef HAVE_ED25519_VERIFY
|
||||
#if !defined(ED25519_SMALL) && defined(CURVED25519_ASM_64BIT)
|
||||
WOLFSSL_LOCAL void ge_tobytes_nct(unsigned char *s,const ge_p2 *h);
|
||||
#else
|
||||
#define ge_tobytes_nct ge_tobytes
|
||||
#endif
|
||||
#endif /* HAVE_ED25519_VERIFY */
|
||||
#ifndef GE_P3_TOBYTES_IMPL
|
||||
#define ge_p3_tobytes(s, h) ge_tobytes((s), (const ge_p2 *)(h))
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user