blob: 6dcfadd82cc00f77bbc43918ac009ee6a254b6b1 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file dhm.h
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00003 *
Darryl Green11999bb2018-03-13 15:22:58 +00004 * \brief This file contains Diffie-Hellman-Merkle (DHM) key exchange
Rose Zadikee963592018-04-18 09:46:12 +01005 * definitions and functions.
Rose Zadikf763f2b2018-04-17 11:00:40 +01006 *
7 * Diffie-Hellman-Merkle (DHM) key exchange is defined in
Darryl Green11999bb2018-03-13 15:22:58 +00008 * <em>RFC-2631: Diffie-Hellman Key Agreement Method</em> and
9 * <em>Public-Key Cryptography Standards (PKCS) #3: Diffie
Rose Zadikf763f2b2018-04-17 11:00:40 +010010 * Hellman Key Agreement Standard</em>.
Rose Zadik41ad0822018-01-26 10:54:57 +000011 *
12 * <em>RFC-3526: More Modular Exponential (MODP) Diffie-Hellman groups for
13 * Internet Key Exchange (IKE)</em> defines a number of standardized
14 * Diffie-Hellman groups for IKE.
15 *
16 * <em>RFC-5114: Additional Diffie-Hellman Groups for Use with IETF
17 * Standards</em> defines a number of standardized Diffie-Hellman
18 * groups that can be used.
Paul Bakker37ca75d2011-01-06 12:28:03 +000019 *
Jaeden Amero784de592018-01-26 17:52:01 +000020 * \warning The security of the DHM key exchange relies on the proper choice
21 * of prime modulus - optimally, it should be a safe prime. The usage
22 * of non-safe primes both decreases the difficulty of the underlying
23 * discrete logarithm problem and can lead to small subgroup attacks
24 * leaking private exponent bits when invalid public keys are used
25 * and not detected. This is especially relevant if the same DHM
26 * parameters are reused for multiple key exchanges as in static DHM,
27 * while the criticality of small-subgroup attacks is lower for
28 * ephemeral DHM.
29 *
30 * \warning For performance reasons, the code does neither perform primality
31 * nor safe primality tests, nor the expensive checks for invalid
32 * subgroups. Moreover, even if these were performed, non-standardized
33 * primes cannot be trusted because of the possibility of backdoors
34 * that can't be effectively checked for.
35 *
36 * \warning Diffie-Hellman-Merkle is therefore a security risk when not using
37 * standardized primes generated using a trustworthy ("nothing up
38 * my sleeve") method, such as the RFC 3526 / 7919 primes. In the TLS
39 * protocol, DH parameters need to be negotiated, so using the default
40 * primes systematically is not always an option. If possible, use
41 * Elliptic Curve Diffie-Hellman (ECDH), which has better performance,
42 * and for which the TLS protocol mandates the use of standard
43 * parameters.
44 *
Darryl Greena40a1012018-01-05 15:33:17 +000045 */
46/*
Rose Zadik41ad0822018-01-26 10:54:57 +000047 * Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
Manuel Pégourié-Gonnard37ff1402015-09-04 14:21:07 +020048 * SPDX-License-Identifier: Apache-2.0
49 *
50 * Licensed under the Apache License, Version 2.0 (the "License"); you may
51 * not use this file except in compliance with the License.
52 * You may obtain a copy of the License at
53 *
54 * http://www.apache.org/licenses/LICENSE-2.0
55 *
56 * Unless required by applicable law or agreed to in writing, software
57 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
58 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59 * See the License for the specific language governing permissions and
60 * limitations under the License.
Paul Bakkerb96f1542010-07-18 20:36:00 +000061 *
Rose Zadik41ad0822018-01-26 10:54:57 +000062 * This file is part of Mbed TLS (https://tls.mbed.org)
Paul Bakker5121ce52009-01-03 21:22:43 +000063 */
Rose Zadik41ad0822018-01-26 10:54:57 +000064
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020065#ifndef MBEDTLS_DHM_H
66#define MBEDTLS_DHM_H
Paul Bakker5121ce52009-01-03 21:22:43 +000067
Reuven Levin1f35ca92017-12-07 10:09:32 +000068#if !defined(MBEDTLS_CONFIG_FILE)
Jaeden Ameroc49fbbf2019-07-04 20:01:14 +010069#include "mbedtls/config.h"
Reuven Levin1f35ca92017-12-07 10:09:32 +000070#else
71#include MBEDTLS_CONFIG_FILE
72#endif
Jaeden Ameroc49fbbf2019-07-04 20:01:14 +010073#include "mbedtls/bignum.h"
Reuven Levin1f35ca92017-12-07 10:09:32 +000074
Paul Bakkerf3b86c12011-01-27 15:24:17 +000075/*
76 * DHM Error codes
77 */
Rose Zadik41ad0822018-01-26 10:54:57 +000078#define MBEDTLS_ERR_DHM_BAD_INPUT_DATA -0x3080 /**< Bad input parameters. */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020079#define MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -0x3100 /**< Reading of the DHM parameters failed. */
80#define MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -0x3180 /**< Making of the DHM parameters failed. */
81#define MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -0x3200 /**< Reading of the public values failed. */
82#define MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Making of the public value failed. */
83#define MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -0x3300 /**< Calculation of the DHM secret failed. */
84#define MBEDTLS_ERR_DHM_INVALID_FORMAT -0x3380 /**< The ASN.1 data is not formatted correctly. */
Manuel Pégourié-Gonnard6a8ca332015-05-28 09:33:39 +020085#define MBEDTLS_ERR_DHM_ALLOC_FAILED -0x3400 /**< Allocation of memory failed. */
Rose Zadik41ad0822018-01-26 10:54:57 +000086#define MBEDTLS_ERR_DHM_FILE_IO_ERROR -0x3480 /**< Read or write of file failed. */
Ron Eldor9924bdc2018-10-04 10:59:13 +030087
88/* MBEDTLS_ERR_DHM_HW_ACCEL_FAILED is deprecated and should not be used. */
Gilles Peskine7ecab3d2018-01-26 17:56:38 +010089#define MBEDTLS_ERR_DHM_HW_ACCEL_FAILED -0x3500 /**< DHM hardware accelerator failed. */
Ron Eldor9924bdc2018-10-04 10:59:13 +030090
Jaeden Amero2acbf172018-01-26 20:57:38 +000091#define MBEDTLS_ERR_DHM_SET_GROUP_FAILED -0x3580 /**< Setting the modulus and generator failed. */
Paul Bakker29b64762012-09-25 09:36:44 +000092
Paul Bakker407a0da2013-06-27 14:29:21 +020093#ifdef __cplusplus
94extern "C" {
95#endif
96
Ron Eldor4e6d55d2018-02-07 16:36:15 +020097#if !defined(MBEDTLS_DHM_ALT)
98
Paul Bakker29b64762012-09-25 09:36:44 +000099/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000100 * \brief The DHM context structure.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000101 */
Dawid Drozd428cc522018-07-24 10:02:47 +0200102typedef struct mbedtls_dhm_context
Paul Bakker5121ce52009-01-03 21:22:43 +0000103{
Rose Zadik41ad0822018-01-26 10:54:57 +0000104 size_t len; /*!< The size of \p P in Bytes. */
105 mbedtls_mpi P; /*!< The prime modulus. */
106 mbedtls_mpi G; /*!< The generator. */
107 mbedtls_mpi X; /*!< Our secret value. */
108 mbedtls_mpi GX; /*!< Our public key = \c G^X mod \c P. */
109 mbedtls_mpi GY; /*!< The public key of the peer = \c G^Y mod \c P. */
110 mbedtls_mpi K; /*!< The shared secret = \c G^(XY) mod \c P. */
111 mbedtls_mpi RP; /*!< The cached value = \c R^2 mod \c P. */
112 mbedtls_mpi Vi; /*!< The blinding value. */
113 mbedtls_mpi Vf; /*!< The unblinding value. */
114 mbedtls_mpi pX; /*!< The previous \c X. */
Paul Bakker5121ce52009-01-03 21:22:43 +0000115}
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200116mbedtls_dhm_context;
Paul Bakker5121ce52009-01-03 21:22:43 +0000117
Ron Eldor4e6d55d2018-02-07 16:36:15 +0200118#else /* MBEDTLS_DHM_ALT */
119#include "dhm_alt.h"
120#endif /* MBEDTLS_DHM_ALT */
121
Paul Bakker5121ce52009-01-03 21:22:43 +0000122/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000123 * \brief This function initializes the DHM context.
Paul Bakker8f870b02014-06-20 13:32:38 +0200124 *
Rose Zadik41ad0822018-01-26 10:54:57 +0000125 * \param ctx The DHM context to initialize.
Paul Bakker8f870b02014-06-20 13:32:38 +0200126 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200127void mbedtls_dhm_init( mbedtls_dhm_context *ctx );
Paul Bakker8f870b02014-06-20 13:32:38 +0200128
129/**
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500130 * \brief This function parses the DHM parameters in a
131 * TLS ServerKeyExchange handshake message
132 * (DHM modulus, generator, and public key).
Paul Bakker5121ce52009-01-03 21:22:43 +0000133 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500134 * \note In a TLS handshake, this is the how the client
135 * sets up its DHM context from the server's public
136 * DHM key material.
137 *
138 * \param ctx The DHM context to use. This must be initialized.
Hanno Beckerf240ea02017-10-02 15:09:14 +0100139 * \param p On input, *p must be the start of the input buffer.
140 * On output, *p is updated to point to the end of the data
141 * that has been read. On success, this is the first byte
142 * past the end of the ServerKeyExchange parameters.
143 * On error, this is the point at which an error has been
144 * detected, which is usually not useful except to debug
145 * failures.
Rose Zadik41ad0822018-01-26 10:54:57 +0000146 * \param end The end of the input buffer.
Paul Bakker5121ce52009-01-03 21:22:43 +0000147 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100148 * \return \c 0 on success.
149 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000150 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200151int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx,
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500152 unsigned char **p,
153 const unsigned char *end );
Paul Bakker5121ce52009-01-03 21:22:43 +0000154
155/**
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500156 * \brief This function generates a DHM key pair and exports its
157 * public part together with the DHM parameters in the format
158 * used in a TLS ServerKeyExchange handshake message.
Paul Bakker5121ce52009-01-03 21:22:43 +0000159 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500160 * \note This function assumes that the DHM parameters \c ctx->P
161 * and \c ctx->G have already been properly set. For that, use
Jaeden Amero9564e972018-01-30 16:56:13 +0000162 * mbedtls_dhm_set_group() below in conjunction with
163 * mbedtls_mpi_read_binary() and mbedtls_mpi_read_string().
Paul Bakker5121ce52009-01-03 21:22:43 +0000164 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500165 * \note In a TLS handshake, this is the how the server generates
166 * and exports its DHM key material.
167 *
168 * \param ctx The DHM context to use. This must be initialized
169 * and have the DHM parameters set. It may or may not
170 * already have imported the peer's public key.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100171 * \param x_size The private key size in Bytes.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500172 * \param olen The address at which to store the number of Bytes
173 * written on success. This must not be \c NULL.
174 * \param output The destination buffer. This must be a writable buffer of
175 * sufficient size to hold the reduced binary presentation of
176 * the modulus, the generator and the public key, each wrapped
177 * with a 2-byte length field. It is the responsibility of the
178 * caller to ensure that enough space is available. Refer to
179 * mbedtls_mpi_size() to computing the byte-size of an MPI.
180 * \param f_rng The RNG function. Must not be \c NULL.
181 * \param p_rng The RNG context to be passed to \p f_rng. This may be
182 * \c NULL if \p f_rng doesn't need a context parameter.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100183 *
184 * \return \c 0 on success.
185 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000186 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200187int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size,
Paul Bakker23986e52011-04-24 08:57:21 +0000188 unsigned char *output, size_t *olen,
Paul Bakkera3d195c2011-11-27 21:07:34 +0000189 int (*f_rng)(void *, unsigned char *, size_t),
190 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000191
192/**
Rose Zadikf763f2b2018-04-17 11:00:40 +0100193 * \brief This function sets the prime modulus and generator.
194 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500195 * \note This function can be used to set \c ctx->P, \c ctx->G
Rose Zadikf763f2b2018-04-17 11:00:40 +0100196 * in preparation for mbedtls_dhm_make_params().
Hanno Becker8880e752017-10-04 13:15:08 +0100197 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500198 * \param ctx The DHM context to configure. This must be initialized.
199 * \param P The MPI holding the DHM prime modulus. This must be
200 * an initialized MPI.
201 * \param G The MPI holding the DHM generator. This must be an
202 * initialized MPI.
Hanno Becker8880e752017-10-04 13:15:08 +0100203 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100204 * \return \c 0 if successful.
205 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Hanno Becker8880e752017-10-04 13:15:08 +0100206 */
207int mbedtls_dhm_set_group( mbedtls_dhm_context *ctx,
208 const mbedtls_mpi *P,
209 const mbedtls_mpi *G );
210
211/**
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500212 * \brief This function imports the raw public value of the peer.
Paul Bakker5121ce52009-01-03 21:22:43 +0000213 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500214 * \note In a TLS handshake, this is the how the server imports
215 * the Client's public DHM key.
216 *
217 * \param ctx The DHM context to use. This must be initialized and have
218 * its DHM parameters set, e.g. via mbedtls_dhm_set_group().
219 * It may or may not already have generated its own private key.
220 * \param input The input buffer containing the \c G^Y value of the peer.
221 * This must be a readable buffer of size \p ilen Bytes.
222 * \param ilen The size of the input buffer \p input in Bytes.
Paul Bakker5121ce52009-01-03 21:22:43 +0000223 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100224 * \return \c 0 on success.
225 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000226 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200227int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx,
Paul Bakker23986e52011-04-24 08:57:21 +0000228 const unsigned char *input, size_t ilen );
Paul Bakker5121ce52009-01-03 21:22:43 +0000229
230/**
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500231 * \brief This function creates a DHM key pair and exports
232 * the raw public key in big-endian format.
Paul Bakker5121ce52009-01-03 21:22:43 +0000233 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100234 * \note The destination buffer is always fully written
235 * so as to contain a big-endian representation of G^X mod P.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500236 * If it is larger than \c ctx->len, it is padded accordingly
Rose Zadikf763f2b2018-04-17 11:00:40 +0100237 * with zero-bytes at the beginning.
238 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500239 * \param ctx The DHM context to use. This must be initialized and
240 * have the DHM parameters set. It may or may not already
241 * have imported the peer's public key.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100242 * \param x_size The private key size in Bytes.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500243 * \param output The destination buffer. This must be a writable buffer of
244 * size \p olen Bytes.
245 * \param olen The length of the destination buffer. This must be at least
246 * equal to `ctx->len` (the size of \c P).
247 * \param f_rng The RNG function. This must not be \c NULL.
248 * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
249 * if \p f_rng doesn't need a context argument.
Paul Bakker5121ce52009-01-03 21:22:43 +0000250 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100251 * \return \c 0 on success.
252 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000253 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200254int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size,
Paul Bakker23986e52011-04-24 08:57:21 +0000255 unsigned char *output, size_t olen,
Paul Bakkera3d195c2011-11-27 21:07:34 +0000256 int (*f_rng)(void *, unsigned char *, size_t),
257 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000258
259/**
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500260 * \brief This function derives and exports the shared secret
261 * \c (G^Y)^X mod \c P.
Paul Bakker5121ce52009-01-03 21:22:43 +0000262 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500263 * \note If \p f_rng is not \c NULL, it is used to blind the input as
264 * a countermeasure against timing attacks. Blinding is used
265 * only if our private key \c X is re-used, and not used
266 * otherwise. We recommend always passing a non-NULL
267 * \p f_rng argument.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100268 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500269 * \param ctx The DHM context to use. This must be initialized
270 * and have its own private key generated and the peer's
271 * public key imported.
272 * \param output The buffer to write the generated shared key to. This
273 * must be a writable buffer of size \p output_size Bytes.
274 * \param output_size The size of the destination buffer. This must be at
275 * least the size of \c ctx->len (the size of \c P).
Rose Zadik41ad0822018-01-26 10:54:57 +0000276 * \param olen On exit, holds the actual number of Bytes written.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500277 * \param f_rng The RNG function, for blinding purposes. This may
278 * b \c NULL if blinding isn't needed.
279 * \param p_rng The RNG context. This may be \c NULL if \p f_rng
280 * doesn't need a context argument.
Paul Bakker5121ce52009-01-03 21:22:43 +0000281 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100282 * \return \c 0 on success.
283 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000284 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200285int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx,
Manuel Pégourié-Gonnard33352052015-06-02 16:17:08 +0100286 unsigned char *output, size_t output_size, size_t *olen,
Manuel Pégourié-Gonnard2d627642013-09-04 14:22:07 +0200287 int (*f_rng)(void *, unsigned char *, size_t),
288 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000289
Paul Bakker9a736322012-11-14 12:39:52 +0000290/**
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500291 * \brief This function frees and clears the components
292 * of a DHM context.
Paul Bakker8f870b02014-06-20 13:32:38 +0200293 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500294 * \param ctx The DHM context to free and clear. This may be \c NULL,
295 * in which case this function is a no-op. If it is not \c NULL,
296 * it must point to an initialized DHM context.
Paul Bakker5121ce52009-01-03 21:22:43 +0000297 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200298void mbedtls_dhm_free( mbedtls_dhm_context *ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000299
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200300#if defined(MBEDTLS_ASN1_PARSE_C)
Paul Bakker40ce79f2013-09-15 17:43:54 +0200301/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000302 * \brief This function parses DHM parameters in PEM or DER format.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200303 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500304 * \param dhm The DHM context to import the DHM parameters into.
305 * This must be initialized.
306 * \param dhmin The input buffer. This must be a readable buffer of
307 * length \p dhminlen Bytes.
308 * \param dhminlen The size of the input buffer \p dhmin, including the
309 * terminating \c NULL Byte for PEM data.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200310 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100311 * \return \c 0 on success.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500312 * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error
313 * code on failure.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200314 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200315int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin,
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500316 size_t dhminlen );
Paul Bakker40ce79f2013-09-15 17:43:54 +0200317
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200318#if defined(MBEDTLS_FS_IO)
Paul Bakker40ce79f2013-09-15 17:43:54 +0200319/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000320 * \brief This function loads and parses DHM parameters from a file.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200321 *
Rose Zadik41ad0822018-01-26 10:54:57 +0000322 * \param dhm The DHM context to load the parameters to.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500323 * This must be initialized.
Rose Zadik41ad0822018-01-26 10:54:57 +0000324 * \param path The filename to read the DHM parameters from.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500325 * This must not be \c NULL.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200326 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100327 * \return \c 0 on success.
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500328 * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX
329 * error code on failure.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200330 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200331int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path );
332#endif /* MBEDTLS_FS_IO */
333#endif /* MBEDTLS_ASN1_PARSE_C */
nirekh01d569ecf2018-01-09 16:43:21 +0000334
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500335#if defined(MBEDTLS_SELF_TEST)
336
Paul Bakker5121ce52009-01-03 21:22:43 +0000337/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000338 * \brief The DMH checkup routine.
Paul Bakker5121ce52009-01-03 21:22:43 +0000339 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100340 * \return \c 0 on success.
341 * \return \c 1 on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000342 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200343int mbedtls_dhm_self_test( int verbose );
Paul Bakker5121ce52009-01-03 21:22:43 +0000344
Andrzej Kurekc470b6b2019-01-31 08:20:20 -0500345#endif /* MBEDTLS_SELF_TEST */
Paul Bakker5121ce52009-01-03 21:22:43 +0000346#ifdef __cplusplus
347}
348#endif
349
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100350/**
Gilles Peskined40f0072020-02-26 19:52:04 +0100351 * RFC 3526, RFC 5114 and RFC 7919 standardize a number of
352 * Diffie-Hellman groups, some of which are included here
353 * for use within the SSL/TLS module and the user's convenience
354 * when configuring the Diffie-Hellman parameters by hand
355 * through \c mbedtls_ssl_conf_dh_param.
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100356 *
Jaeden Amero9564e972018-01-30 16:56:13 +0000357 * The following lists the source of the above groups in the standards:
358 * - RFC 5114 section 2.2: 2048-bit MODP Group with 224-bit Prime Order Subgroup
359 * - RFC 3526 section 3: 2048-bit MODP Group
360 * - RFC 3526 section 4: 3072-bit MODP Group
361 * - RFC 3526 section 5: 4096-bit MODP Group
362 * - RFC 7919 section A.1: ffdhe2048
363 * - RFC 7919 section A.2: ffdhe3072
364 * - RFC 7919 section A.3: ffdhe4096
365 * - RFC 7919 section A.4: ffdhe6144
366 * - RFC 7919 section A.5: ffdhe8192
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100367 *
368 * The constants with suffix "_p" denote the chosen prime moduli, while
369 * the constants with suffix "_g" denote the chosen generator
370 * of the associated prime field.
371 *
372 * The constants further suffixed with "_bin" are provided in binary format,
373 * while all other constants represent null-terminated strings holding the
374 * hexadecimal presentation of the respective numbers.
375 *
376 * The primes from RFC 3526 and RFC 7919 have been generating by the following
377 * trust-worthy procedure:
378 * - Fix N in { 2048, 3072, 4096, 6144, 8192 } and consider the N-bit number
379 * the first and last 64 bits are all 1, and the remaining N - 128 bits of
380 * which are 0x7ff...ff.
381 * - Add the smallest multiple of the first N - 129 bits of the binary expansion
382 * of pi (for RFC 5236) or e (for RFC 7919) to this intermediate bit-string
383 * such that the resulting integer is a safe-prime.
384 * - The result is the respective RFC 3526 / 7919 prime, and the corresponding
385 * generator is always chosen to be 2 (which is a square for these prime,
386 * hence the corresponding subgroup has order (p-1)/2 and avoids leaking a
387 * bit in the private exponent).
388 *
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100389 */
390
391#if !defined(MBEDTLS_DEPRECATED_REMOVED)
392
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100393/**
394 * \warning The origin of the primes in RFC 5114 is not documented and
395 * their use therefore constitutes a security risk!
396 *
397 * \deprecated The hex-encoded primes from RFC 5114 are deprecated and are
398 * likely to be removed in a future version of the library without
399 * replacement.
400 */
401
Jaeden Amero9564e972018-01-30 16:56:13 +0000402/**
403 * The hexadecimal presentation of the prime underlying the
404 * 2048-bit MODP Group with 224-bit Prime Order Subgroup, as defined
405 * in <em>RFC-5114: Additional Diffie-Hellman Groups for Use with
406 * IETF Standards</em>.
407 */
Jaeden Amero129f5082018-02-08 14:25:36 +0000408#define MBEDTLS_DHM_RFC5114_MODP_2048_P \
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100409 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
410 "AD107E1E9123A9D0D660FAA79559C51FA20D64E5683B9FD1" \
411 "B54B1597B61D0A75E6FA141DF95A56DBAF9A3C407BA1DF15" \
412 "EB3D688A309C180E1DE6B85A1274A0A66D3F8152AD6AC212" \
413 "9037C9EDEFDA4DF8D91E8FEF55B7394B7AD5B7D0B6C12207" \
414 "C9F98D11ED34DBF6C6BA0B2C8BBC27BE6A00E0A0B9C49708" \
415 "B3BF8A317091883681286130BC8985DB1602E714415D9330" \
416 "278273C7DE31EFDC7310F7121FD5A07415987D9ADC0A486D" \
417 "CDF93ACC44328387315D75E198C641A480CD86A1B9E587E8" \
418 "BE60E69CC928B2B9C52172E413042E9B23F10B0E16E79763" \
419 "C9B53DCF4BA80A29E3FB73C16B8E75B97EF363E2FFA31F71" \
420 "CF9DE5384E71B81C0AC4DFFE0C10E64F" )
421
Jaeden Amero9564e972018-01-30 16:56:13 +0000422/**
423 * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
424 * Group with 224-bit Prime Order Subgroup, as defined in <em>RFC-5114:
425 * Additional Diffie-Hellman Groups for Use with IETF Standards</em>.
426 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100427#define MBEDTLS_DHM_RFC5114_MODP_2048_G \
428 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
429 "AC4032EF4F2D9AE39DF30B5C8FFDAC506CDEBE7B89998CAF" \
430 "74866A08CFE4FFE3A6824A4E10B9A6F0DD921F01A70C4AFA" \
431 "AB739D7700C29F52C57DB17C620A8652BE5E9001A8D66AD7" \
432 "C17669101999024AF4D027275AC1348BB8A762D0521BC98A" \
433 "E247150422EA1ED409939D54DA7460CDB5F6C6B250717CBE" \
434 "F180EB34118E98D119529A45D6F834566E3025E316A330EF" \
435 "BB77A86F0C1AB15B051AE3D428C8F8ACB70A8137150B8EEB" \
436 "10E183EDD19963DDD9E263E4770589EF6AA21E7F5F2FF381" \
437 "B539CCE3409D13CD566AFBB48D6C019181E1BCFE94B30269" \
438 "EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179" \
439 "81BC087F2A7065B384B890D3191F2BFA" )
440
441/**
Jaeden Amero9564e972018-01-30 16:56:13 +0000442 * The hexadecimal presentation of the prime underlying the 2048-bit MODP
443 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
444 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
445 *
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100446 * \deprecated The hex-encoded primes from RFC 3625 are deprecated and
447 * superseded by the corresponding macros providing them as
448 * binary constants. Their hex-encoded constants are likely
449 * to be removed in a future version of the library.
450 *
451 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100452#define MBEDTLS_DHM_RFC3526_MODP_2048_P \
453 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
454 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
455 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
456 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
457 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
458 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
459 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
460 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
461 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
462 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
463 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
464 "15728E5A8AACAA68FFFFFFFFFFFFFFFF" )
465
Jaeden Amero9564e972018-01-30 16:56:13 +0000466/**
467 * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
468 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
469 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
470 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100471#define MBEDTLS_DHM_RFC3526_MODP_2048_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100472 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100473
Jaeden Amero9564e972018-01-30 16:56:13 +0000474/**
475 * The hexadecimal presentation of the prime underlying the 3072-bit MODP
476 * Group, as defined in <em>RFC-3072: More Modular Exponential (MODP)
477 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
478 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100479#define MBEDTLS_DHM_RFC3526_MODP_3072_P \
480 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
481 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
482 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
483 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
484 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
485 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
486 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
487 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
488 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
489 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
490 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
491 "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \
492 "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \
493 "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \
494 "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \
495 "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \
496 "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF" )
497
Jaeden Amero9564e972018-01-30 16:56:13 +0000498/**
499 * The hexadecimal presentation of the chosen generator of the 3072-bit MODP
500 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
501 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
502 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100503#define MBEDTLS_DHM_RFC3526_MODP_3072_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100504 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100505
Jaeden Amero9564e972018-01-30 16:56:13 +0000506/**
507 * The hexadecimal presentation of the prime underlying the 4096-bit MODP
508 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
509 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
510 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100511#define MBEDTLS_DHM_RFC3526_MODP_4096_P \
512 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
513 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
514 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
515 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
516 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
517 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
518 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
519 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
520 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
521 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
522 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
523 "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \
524 "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \
525 "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \
526 "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \
527 "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \
528 "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \
529 "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \
530 "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \
531 "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \
532 "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \
533 "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199" \
534 "FFFFFFFFFFFFFFFF" )
535
Jaeden Amero9564e972018-01-30 16:56:13 +0000536/**
537 * The hexadecimal presentation of the chosen generator of the 4096-bit MODP
538 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
539 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
540 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100541#define MBEDTLS_DHM_RFC3526_MODP_4096_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100542 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100543
544#endif /* MBEDTLS_DEPRECATED_REMOVED */
545
546/*
547 * Trustworthy DHM parameters in binary form
548 */
549
550#define MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN { \
551 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
552 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
553 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
554 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
555 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
556 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
557 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
558 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
559 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
560 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
561 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
562 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
563 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
564 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
565 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
566 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
567 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
568 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
569 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
570 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
571 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
572 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
573 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
574 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
575 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
576 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
577 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
578 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
579 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
580 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
581 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, \
582 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
583
584#define MBEDTLS_DHM_RFC3526_MODP_2048_G_BIN { 0x02 }
585
586#define MBEDTLS_DHM_RFC3526_MODP_3072_P_BIN { \
587 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
588 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
589 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
590 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
591 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
592 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
593 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
594 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
595 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
596 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
597 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
598 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
599 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
600 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
601 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
602 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
603 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
604 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
605 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
606 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
607 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
608 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
609 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
610 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
611 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
612 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
613 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
614 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
615 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
616 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
617 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
618 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
619 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
620 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
621 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
622 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
623 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
624 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
625 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
626 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
627 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
628 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
629 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
630 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
631 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
632 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
633 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x3A, 0xD2, 0xCA, \
634 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
635
636#define MBEDTLS_DHM_RFC3526_MODP_3072_G_BIN { 0x02 }
637
638#define MBEDTLS_DHM_RFC3526_MODP_4096_P_BIN { \
639 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
640 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
641 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
642 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
643 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
644 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
645 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
646 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
647 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
648 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
649 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
650 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
651 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
652 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
653 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
654 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
655 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
656 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
657 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
658 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
659 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
660 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
661 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
662 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
663 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
664 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
665 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
666 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
667 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
668 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
669 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
670 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
671 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
672 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
673 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
674 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
675 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
676 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
677 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
678 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
679 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
680 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
681 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
682 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
683 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
684 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
685 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x21, 0x08, 0x01, \
686 0x1A, 0x72, 0x3C, 0x12, 0xA7, 0x87, 0xE6, 0xD7, \
687 0x88, 0x71, 0x9A, 0x10, 0xBD, 0xBA, 0x5B, 0x26, \
688 0x99, 0xC3, 0x27, 0x18, 0x6A, 0xF4, 0xE2, 0x3C, \
689 0x1A, 0x94, 0x68, 0x34, 0xB6, 0x15, 0x0B, 0xDA, \
690 0x25, 0x83, 0xE9, 0xCA, 0x2A, 0xD4, 0x4C, 0xE8, \
691 0xDB, 0xBB, 0xC2, 0xDB, 0x04, 0xDE, 0x8E, 0xF9, \
692 0x2E, 0x8E, 0xFC, 0x14, 0x1F, 0xBE, 0xCA, 0xA6, \
693 0x28, 0x7C, 0x59, 0x47, 0x4E, 0x6B, 0xC0, 0x5D, \
694 0x99, 0xB2, 0x96, 0x4F, 0xA0, 0x90, 0xC3, 0xA2, \
695 0x23, 0x3B, 0xA1, 0x86, 0x51, 0x5B, 0xE7, 0xED, \
696 0x1F, 0x61, 0x29, 0x70, 0xCE, 0xE2, 0xD7, 0xAF, \
697 0xB8, 0x1B, 0xDD, 0x76, 0x21, 0x70, 0x48, 0x1C, \
698 0xD0, 0x06, 0x91, 0x27, 0xD5, 0xB0, 0x5A, 0xA9, \
699 0x93, 0xB4, 0xEA, 0x98, 0x8D, 0x8F, 0xDD, 0xC1, \
700 0x86, 0xFF, 0xB7, 0xDC, 0x90, 0xA6, 0xC0, 0x8F, \
701 0x4D, 0xF4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99, \
702 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
703
704#define MBEDTLS_DHM_RFC3526_MODP_4096_G_BIN { 0x02 }
705
706#define MBEDTLS_DHM_RFC7919_FFDHE2048_P_BIN { \
707 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
708 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
709 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
710 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
711 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
712 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
713 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
714 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
715 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
716 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
717 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
718 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
719 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
720 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
721 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
722 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
723 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
724 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
725 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
726 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
727 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
728 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
729 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
730 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
731 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
732 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
733 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
734 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
735 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
736 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
737 0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, \
738 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }
739
740#define MBEDTLS_DHM_RFC7919_FFDHE2048_G_BIN { 0x02 }
741
742#define MBEDTLS_DHM_RFC7919_FFDHE3072_P_BIN { \
743 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
744 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
745 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
746 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
747 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
748 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
749 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
750 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
751 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
752 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
753 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
754 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
755 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
756 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
757 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
758 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
759 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
760 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
761 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
762 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
763 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
764 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
765 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
766 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
767 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
768 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
769 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
770 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
771 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
772 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
773 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
774 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
775 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
776 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
777 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
778 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
779 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
780 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
781 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
782 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
783 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
784 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
785 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
786 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
787 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
788 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
789 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0xC6, 0x2E, 0x37, \
790 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
791
792#define MBEDTLS_DHM_RFC7919_FFDHE3072_G_BIN { 0x02 }
793
794#define MBEDTLS_DHM_RFC7919_FFDHE4096_P_BIN { \
795 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
796 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
797 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
798 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
799 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
800 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
801 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
802 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
803 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
804 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
805 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
806 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
807 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
808 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
809 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
810 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
811 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
812 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
813 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
814 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
815 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
816 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
817 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
818 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
819 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
820 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
821 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
822 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
823 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
824 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
825 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
826 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
827 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
828 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
829 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
830 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
831 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
832 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
833 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
834 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
835 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
836 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
837 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
838 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
839 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
840 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
841 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
842 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
843 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
844 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
845 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
846 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
847 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
848 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
849 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
850 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
851 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
852 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
853 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
854 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
855 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
856 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
857 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x65, 0x5F, 0x6A, \
858 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
859
860#define MBEDTLS_DHM_RFC7919_FFDHE4096_G_BIN { 0x02 }
861
862#define MBEDTLS_DHM_RFC7919_FFDHE6144_P_BIN { \
863 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
864 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
865 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
866 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
867 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
868 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
869 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
870 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
871 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
872 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
873 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
874 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
875 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
876 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
877 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
878 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
879 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
880 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
881 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
882 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
883 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
884 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
885 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
886 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
887 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
888 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
889 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
890 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
891 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
892 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
893 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
894 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
895 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
896 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
897 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
898 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
899 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
900 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
901 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
902 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
903 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
904 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
905 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
906 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
907 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
908 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
909 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
910 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
911 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
912 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
913 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
914 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
915 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
916 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
917 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
918 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
919 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
920 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
921 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
922 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
923 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
924 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
925 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
926 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
927 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
928 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
929 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
930 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
931 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
932 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
933 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
934 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
935 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
936 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
937 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
938 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
939 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
940 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
941 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
942 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
943 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
944 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
945 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
946 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
947 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
948 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
949 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
950 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
951 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
952 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
953 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
954 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
955 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
956 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
957 0xA4, 0x0E, 0x32, 0x9C, 0xD0, 0xE4, 0x0E, 0x65, \
958 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
959
960#define MBEDTLS_DHM_RFC7919_FFDHE6144_G_BIN { 0x02 }
961
962#define MBEDTLS_DHM_RFC7919_FFDHE8192_P_BIN { \
963 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
964 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
965 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
966 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
967 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
968 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
969 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
970 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
971 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
972 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
973 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
974 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
975 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
976 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
977 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
978 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
979 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
980 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
981 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
982 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
983 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
984 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
985 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
986 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
987 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
988 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
989 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
990 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
991 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
992 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
993 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
994 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
995 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
996 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
997 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
998 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
999 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
1000 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
1001 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
1002 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
1003 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
1004 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
1005 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
1006 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
1007 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
1008 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
1009 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
1010 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
1011 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
1012 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
1013 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
1014 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
1015 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
1016 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
1017 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
1018 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
1019 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
1020 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
1021 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
1022 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
1023 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
1024 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
1025 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
1026 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
1027 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
1028 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
1029 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
1030 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
1031 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
1032 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
1033 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
1034 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
1035 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
1036 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
1037 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
1038 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
1039 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
1040 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
1041 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
1042 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
1043 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
1044 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
1045 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
1046 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
1047 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
1048 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
1049 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
1050 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
1051 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
1052 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
1053 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
1054 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
1055 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
1056 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
1057 0xA4, 0x0E, 0x32, 0x9C, 0xCF, 0xF4, 0x6A, 0xAA, \
1058 0x36, 0xAD, 0x00, 0x4C, 0xF6, 0x00, 0xC8, 0x38, \
1059 0x1E, 0x42, 0x5A, 0x31, 0xD9, 0x51, 0xAE, 0x64, \
1060 0xFD, 0xB2, 0x3F, 0xCE, 0xC9, 0x50, 0x9D, 0x43, \
1061 0x68, 0x7F, 0xEB, 0x69, 0xED, 0xD1, 0xCC, 0x5E, \
1062 0x0B, 0x8C, 0xC3, 0xBD, 0xF6, 0x4B, 0x10, 0xEF, \
1063 0x86, 0xB6, 0x31, 0x42, 0xA3, 0xAB, 0x88, 0x29, \
1064 0x55, 0x5B, 0x2F, 0x74, 0x7C, 0x93, 0x26, 0x65, \
1065 0xCB, 0x2C, 0x0F, 0x1C, 0xC0, 0x1B, 0xD7, 0x02, \
1066 0x29, 0x38, 0x88, 0x39, 0xD2, 0xAF, 0x05, 0xE4, \
1067 0x54, 0x50, 0x4A, 0xC7, 0x8B, 0x75, 0x82, 0x82, \
1068 0x28, 0x46, 0xC0, 0xBA, 0x35, 0xC3, 0x5F, 0x5C, \
1069 0x59, 0x16, 0x0C, 0xC0, 0x46, 0xFD, 0x82, 0x51, \
1070 0x54, 0x1F, 0xC6, 0x8C, 0x9C, 0x86, 0xB0, 0x22, \
1071 0xBB, 0x70, 0x99, 0x87, 0x6A, 0x46, 0x0E, 0x74, \
1072 0x51, 0xA8, 0xA9, 0x31, 0x09, 0x70, 0x3F, 0xEE, \
1073 0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C, \
1074 0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, \
1075 0x99, 0xE9, 0xE3, 0x16, 0x50, 0xC1, 0x21, 0x7B, \
1076 0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9, \
1077 0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, \
1078 0xA1, 0xFE, 0x30, 0x75, 0xA5, 0x77, 0xE2, 0x31, \
1079 0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57, \
1080 0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, \
1081 0xB6, 0x85, 0x5D, 0xFE, 0x72, 0xB0, 0xA6, 0x6E, \
1082 0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30, \
1083 0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, \
1084 0x2F, 0x74, 0x1E, 0xF8, 0xC1, 0xFE, 0x86, 0xFE, \
1085 0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D, \
1086 0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, \
1087 0x08, 0x22, 0xE5, 0x06, 0xA9, 0xF4, 0x61, 0x4E, \
1088 0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C, \
1089 0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, \
1090 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
1091
1092#define MBEDTLS_DHM_RFC7919_FFDHE8192_G_BIN { 0x02 }
1093
Paul Bakker9af723c2014-05-01 13:03:14 +02001094#endif /* dhm.h */