nrfxlib API 2.8.99
Loading...
Searching...
No Matches
dhm_alt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef MBEDTLS_DHM_ALT_H
8#define MBEDTLS_DHM_ALT_H
9
10
11#if defined(MBEDTLS_DHM_ALT)
12
13
14#if defined(MBEDTLS_CONFIG_FILE)
15#include MBEDTLS_CONFIG_FILE
16#endif
17
18#include <stddef.h>
19
20/*
21 * DHM Error codes
22 */
23#define MBEDTLS_ERR_DHM_BAD_INPUT_DATA -0x3080
24#define MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -0x3100
25#define MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -0x3180
26#define MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -0x3200
27#define MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280
28#define MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -0x3300
29#define MBEDTLS_ERR_DHM_INVALID_FORMAT -0x3380
30#define MBEDTLS_ERR_DHM_ALLOC_FAILED -0x3400
31#define MBEDTLS_ERR_DHM_FILE_IO_ERROR -0x3480
32#define MBEDTLS_ERR_DHM_HW_ACCEL_FAILED -0x3500
33#define MBEDTLS_ERR_DHM_SET_GROUP_FAILED -0x3580
35#ifdef __cplusplus
36extern "C" {
37#endif
38
42typedef struct
43{
44 size_t len;
45 mbedtls_mpi P;
46 mbedtls_mpi G;
47 mbedtls_mpi X;
48 mbedtls_mpi GX;
49 mbedtls_mpi GY;
50 mbedtls_mpi K;
51 mbedtls_mpi RP;
52 mbedtls_mpi Vi;
53 mbedtls_mpi Vf;
54 mbedtls_mpi pX;
55}
56mbedtls_dhm_context;
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* MBEDTLS_DHM_ALT - use alternative code */
63#endif /* MBEDTLS_DHM_ALT_H - include only once */