blob: 8a764bbf2c45a2c58a93c99e8882502b2609c186 [file] [log] [blame]
Christoph M. Wintersteiger6e0cac12019-02-22 17:02:12 +00001/*
2 * Interface to code from Project Everest
3 *
4 * Copyright 2016-2018 INRIA and Microsoft Corporation
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * This file is part of mbed TLS (https://tls.mbed.org)
20 */
21
22#if !defined(MBEDTLS_CONFIG_FILE)
23#include "mbedtls/config.h"
24#else
25#include MBEDTLS_CONFIG_FILE
26#endif
27
28#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
29
30#if defined(__SIZEOF_INT128__) && (__SIZEOF_INT128__ == 16)
31#define MBEDTLS_HAVE_INT128
32#endif
33
34#if defined(MBEDTLS_HAVE_INT128)
35#include "Hacl_Curve25519.c"
36#else
37#define KRML_VERIFIED_UINT128
38#include "kremlib/FStar_UInt128_extracted.c"
39#include "legacy/Hacl_Curve25519.c"
40#endif
41
42#include "kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c"
43
44#endif /* defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED) */