Skip to content

Commit

Permalink
Make fiat 128-bit typedefs work with older gcc
Browse files Browse the repository at this point in the history
Use the int128_t and uint128_t types defined by edwards25519.c, rather
than [un]signed __int128 which does not compile with gcc 4.4.
Reported by Norm Green.

ticket: 8888
tags: pullup
target_version: 1.18-next
target_version: 1.17-next
  • Loading branch information
greghudson committed Mar 26, 2020
1 parent f128684 commit dd5d6e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/plugins/preauth/spake/edwards25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
* generation. The fiat_25519_selectznz and fiat_25519_carry_scmul_121666
* functions were removed from both branches as they are not used here (the
* former because it is not used by the BoringSSL code and the latter because
* it is only used by the X25519 code).
* it is only used by the X25519 code). The fiat_25519_int128 and
* fiat_25519_uint128 typedefs were adjusted to work with older versions of
* gcc.
*
* - fe_cmov() has the initial "Silence an unused function warning" part
* removed, as we removed fiat_25519_selectznz instead.
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/preauth/spake/edwards25519_fiat.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <stdint.h>
typedef unsigned char fiat_25519_uint1;
typedef signed char fiat_25519_int1;
typedef signed __int128 fiat_25519_int128;
typedef unsigned __int128 fiat_25519_uint128;
typedef int128_t fiat_25519_int128;
typedef uint128_t fiat_25519_uint128;


/*
Expand Down

0 comments on commit dd5d6e5

Please sign in to comment.