Skip to content

Commit 196f154

Browse files
committed
wolfcrypt/src/curve25519.c: use endian-conditional initializer for kCurve25519BasePoint.
1 parent 136cb98 commit 196f154

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

wolfcrypt/src/curve25519.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ const curve25519_set_type curve25519_sets[] = {
5858
}
5959
};
6060

61-
static const word32 kCurve25519BasePoint[CURVE25519_KEYSIZE/sizeof(word32)] = {9};
61+
static const word32 kCurve25519BasePoint[CURVE25519_KEYSIZE/sizeof(word32)] = {
62+
#ifdef BIG_ENDIAN_ORDER
63+
0x09000000
64+
#else
65+
9
66+
#endif
67+
};
6268

6369
/* Curve25519 private key must be less than order */
6470
/* These functions clamp private k and check it */

0 commit comments

Comments
 (0)