mbedtls/3rdparty/everest
Gilles Peskine 945b23c46f Include platform.h unconditionally: automatic part
We used to include platform.h only when MBEDTLS_PLATFORM_C was enabled, and
to define ad hoc replacements for mbedtls_xxx functions on a case-by-case
basis when MBEDTLS_PLATFORM_C was disabled. The only reason for this
complication was to allow building individual source modules without copying
platform.h. This is not something we support or recommend anymore, so get
rid of the complication: include platform.h unconditionally.

There should be no change in behavior since just including the header should
not change the behavior of a program.

This commit replaces most occurrences of conditional inclusion of
platform.h, using the following code:

```
perl -i -0777 -pe 's!#if.*\n#include "mbedtls/platform.h"\n(#else.*\n(#define (mbedtls|MBEDTLS)_.*\n|#include <(stdarg|stddef|stdio|stdlib|string|time)\.h>\n)*)?#endif.*!#include "mbedtls/platform.h"!mg' $(git grep -l '#include "mbedtls/platform.h"')
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-09-15 20:33:07 +02:00
..
include/everest Fix typos in documentation and constants with typo finding tool 2022-05-18 14:15:33 -04:00
library Include platform.h unconditionally: automatic part 2022-09-15 20:33:07 +02:00
.gitignore 3rdparty: Adjust .gitignore 2019-08-19 13:37:46 +01:00
CMakeLists.txt cmake: Use GnuInstallDirs to customize install directories 2022-04-22 20:59:28 +05:30
Makefile.inc 3rdparty: Fix Everest build to not depend on build-time macros 2019-08-19 13:37:46 +01:00
README.md Redo of PR#5345. Fixed spelling and typographical errors found by CodeSpell. 2022-05-11 21:25:51 +01:00

The files in this directory stem from Project Everest and are distributed under the Apache 2.0 license.

This is a formally verified implementation of Curve25519-based handshakes. The C code is automatically derived from the (verified) original implementation in the F* language by KreMLin. In addition to the improved safety and security of the implementation, it is also significantly faster than the default implementation of Curve25519 in mbedTLS.

The caveat is that not all platforms are supported, although the version in everest/library/legacy should work on most systems. The main issue is that some platforms do not provide a 128-bit integer type and KreMLin therefore has to use additional (also verified) code to simulate them, resulting in less of a performance gain overall. Explicitly supported platforms are currently x86 and x86_64 using gcc or clang, and Visual C (2010 and later).