mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-03 13:39:53 +00:00
Keep only the most compact version of the curve25519 code and remove the remaining unused code for easier compilation. Do the minimal changes to make it compile in the EC code base, there should be no real functional changes. Re-use the wording from BoringSSL include/openssl/curve25519.h for the header. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:62991 TEST=run x25519 on host (ie 'make run-x25519') and the STM32L4 target: make BOARD=eve_fp PROJECT=x25519 TEST_BUILD=y ./util/flash_ec --board=eve_fp --image=build/eve_fp/x25519.bin execute 'runtest' in the console. Change-Id: I13dbe453eff39b461effb1b3ffa549afc1749fef Reviewed-on: https://chromium-review.googlesource.com/444187 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Adam Langley <agl@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_STDINT_H__
|
|
#define __CROS_EC_STDINT_H__
|
|
|
|
typedef unsigned char uint8_t;
|
|
typedef signed char int8_t;
|
|
|
|
typedef unsigned short uint16_t;
|
|
typedef signed short int16_t;
|
|
|
|
typedef unsigned int uint32_t;
|
|
typedef signed int int32_t;
|
|
|
|
typedef unsigned long long uint64_t;
|
|
typedef signed long long int64_t;
|
|
|
|
typedef int intptr_t;
|
|
typedef unsigned int uintptr_t;
|
|
|
|
typedef uint8_t uint_least8_t;
|
|
|
|
#ifndef UINT8_MAX
|
|
#define UINT8_MAX (255U)
|
|
#endif
|
|
#ifndef INT8_MAX
|
|
#define INT8_MAX (127U)
|
|
#endif
|
|
|
|
#ifndef UINT16_MAX
|
|
#define UINT16_MAX (65535U)
|
|
#endif
|
|
#ifndef INT16_MAX
|
|
#define INT16_MAX (32767U)
|
|
#endif
|
|
|
|
#ifndef UINT32_MAX
|
|
#define UINT32_MAX (4294967295U)
|
|
#endif
|
|
#ifndef INT32_MAX
|
|
#define INT32_MAX (2147483647U)
|
|
#endif
|
|
|
|
#ifndef UINT64_C
|
|
#define UINT64_C(c) c ## ULL
|
|
#endif
|
|
#ifndef INT64_C
|
|
#define INT64_C(c) c ## LL
|
|
#endif
|
|
|
|
#endif /* __CROS_EC_STDINT_H__ */
|