ECDH: Fix whitespace and permission problems
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
old mode 100755
new mode 100644
index df28699..4511e43
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -1,6 +1,6 @@
-add_subdirectory(everest)

-

-set(src_thirdparty

-  ${src_everest}

-  PARENT_SCOPE

-)

+add_subdirectory(everest)
+
+set(src_thirdparty
+  ${src_everest}
+  PARENT_SCOPE
+)
diff --git a/3rdparty/everest/CMakeLists.txt b/3rdparty/everest/CMakeLists.txt
old mode 100755
new mode 100644
index 25f50ca..84e2763
--- a/3rdparty/everest/CMakeLists.txt
+++ b/3rdparty/everest/CMakeLists.txt
@@ -1,9 +1,10 @@
-include_directories(include include/everest include/everest/kremlib)

-

-set(src_everest

-  ${CMAKE_CURRENT_SOURCE_DIR}/library/everest.c

-  ${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519.c

-  ${CMAKE_CURRENT_SOURCE_DIR}/library/x25519.c

-  ${CMAKE_CURRENT_SOURCE_DIR}/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c

-  PARENT_SCOPE

-)
\ No newline at end of file
+include_directories(include include/everest include/everest/kremlib)
+
+set(src_everest
+  ${CMAKE_CURRENT_SOURCE_DIR}/library/everest.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/library/x25519.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c
+  PARENT_SCOPE
+)
+
diff --git a/3rdparty/everest/include/everest/kremlin/internal/callconv.h b/3rdparty/everest/include/everest/kremlin/internal/callconv.h
index 24b5fff..bf631ff 100644
--- a/3rdparty/everest/include/everest/kremlin/internal/callconv.h
+++ b/3rdparty/everest/include/everest/kremlin/internal/callconv.h
@@ -24,7 +24,9 @@
 #endif
 #endif
 
-/* TODO: review these two definitions and understand why they're needed. */
+/* Since KreMLin emits the inline keyword unconditionally, we follow the
+ * guidelines at https://gcc.gnu.org/onlinedocs/gcc/Inline.html and make this
+ * __inline__ to ensure the code compiles with -std=c90 and earlier. */
 #ifdef __GNUC__
 #  define inline __inline__
 #endif
diff --git a/3rdparty/everest/include/everest/x25519.h b/3rdparty/everest/include/everest/x25519.h
old mode 100755
new mode 100644
diff --git a/include/mbedtls/ecdsa.h b/include/mbedtls/ecdsa.h
old mode 100755
new mode 100644
diff --git a/library/ecdh.c b/library/ecdh.c
old mode 100755
new mode 100644
index 58e67bf..66a2d16
--- a/library/ecdh.c
+++ b/library/ecdh.c
@@ -220,20 +220,18 @@
     switch( grp_id )
     {
 #if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
-        case MBEDTLS_ECP_DP_CURVE25519:
-        {
-            ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED;
-            ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST;
-            ctx->grp_id = grp_id;
-            return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) );
-        }
+    case MBEDTLS_ECP_DP_CURVE25519:
+        ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED;
+        ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST;
+        ctx->grp_id = grp_id;
+        return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) );
 #endif
-        default:
-            ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
-            ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
-            ctx->grp_id = grp_id;
-            ecdh_init_internal( &ctx->ctx.mbed_ecdh );
-            return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
+    default:
+        ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
+        ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
+        ctx->grp_id = grp_id;
+        ecdh_init_internal( &ctx->ctx.mbed_ecdh );
+        return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
     }
 #endif
 }
diff --git a/library/ecdsa.c b/library/ecdsa.c
old mode 100755
new mode 100644
diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c
old mode 100755
new mode 100644